/* ========================================
   公共弹窗样式 - 登录/注册/错误提示
   用于: index, search, category, resource, vip 等页面
   ======================================== */

/* 登录/注册弹窗样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-modal-header {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.login-modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.login-modal-close:hover {
    opacity: 1;
}

/* 登录/注册标签 */
.login-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.login-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab.active {
    background: #fff;
    color: #FF6B35;
    border-bottom: 2px solid #FF6B35;
}

/* 表单样式 */
.login-form {
    display: none;
    padding: 20px;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.captcha-group {
    display: flex;
    gap: 8px;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    width: 80px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #E55A2B, #E68A1A);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 错误弹窗样式 */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.error-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 85%;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: errorModalSlideIn 0.3s ease-out;
}

@keyframes errorModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.error-modal-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 20px;
}

.error-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.error-modal-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.error-modal-close:hover {
    opacity: 1;
}

.error-modal-body {
    padding: 24px 20px;
    text-align: center;
}

.error-modal-body p {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.error-modal-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.error-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #d63031);
    transform: translateY(-1px);
}

/* 响应式设计 - 弹窗 */
@media (max-width: 480px) {
    .login-modal-content {
        width: 95%;
        margin: 0 10px;
        max-width: 320px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .captcha-img {
        width: 70px;
        height: 40px;
    }
}

/* ========================================
   公共导航栏样式 - 移动端底部导航
   ======================================== */

/* 移动端底部导航栏样式 */
.mobile-bottom-bar-icons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    height: 62px;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    padding: 0 5px;
}

.mobile-bottom-bar-icons.compact {
    height: 54px;
    min-height: 0;
    padding: 0 2px;
    box-shadow: 0 -1px 6px rgba(0,0,0,0.03);
}

/* 普通按钮样式 */
.mobile-bar-btn {
    flex: 1;
    text-align: center;
    background: none;
    border: none;
    outline: none;
    font-size: 12px;
    color: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1px;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    min-width: 0;
}

.mobile-bar-btn.active {
    color: #e74c3c;
}

/* 主按钮样式（搜索/开通会员） */
.mobile-bar-btn-main {
    color: #fff;
    background: #e74c3c;
    border-radius: 18px;
    margin: 0 1px;
    font-weight: bold;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 70px;
    box-shadow: 0 2px 8px rgba(231,76,60,0.08);
    border: none;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 0 6px;
    transition: all 0.3s ease;
}

.mobile-bar-btn-main:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.2);
}

/* 按钮文字样式 */
.mobile-bar-btn div {
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    text-decoration: none;
    display: block !important;
    color: #444 !important;
}

.mobile-bar-btn.active div {
    color: #e74c3c !important;
}

/* 图标样式 */
.svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.svg-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* 底部导航 PC端隐藏 */
@media (min-width: 701px) {
    .mobile-bottom-bar-icons {
        display: none !important;
    }

    body {
        padding-bottom: 0;
    }
}

/* 移动端 */
@media (max-width: 700px) {
    .mobile-bottom-bar-icons {
        display: flex !important;
    }

    body {
        padding-bottom: 70px;
    }
}
