/* ===== Easy2Sound 全局样式 ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background-image: url('background_board.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #e0e0e0;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* ===== 导航栏 ===== */
.nav-container {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px;
    background: rgba(12, 12, 28, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 16px 20px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav a.active {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #60a5fa);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== 右上角用户区域 ===== */
.user-info {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-box {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(167, 139, 250, 0.5);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.avatar-box:hover {
    border-color: #a78bfa;
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.4);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username-display {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.logout-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.login-entrance {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}

.login-entrance:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

/* ===== 玻璃卡片 ===== */
.glass-card {
    background: rgba(20, 20, 40, 0.82);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    margin: 30px auto;
    max-width: 1100px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
}

.glass-card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #e0e0e0;
}

.glass-card p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 15px;
}

/* ===== 内容区域（兼容旧样式） ===== */
.content-box {
    background: rgba(20, 20, 40, 0.82);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    margin: 30px auto;
    max-width: 1100px;
    color: white;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.content-box h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-box p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 14px;
    font-size: 15px;
}

/* ===== 弹窗样式 ===== */
.login-modal,
.avatar-setting-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.login-modal.active,
.avatar-setting-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-container,
.avatar-setting-container {
    background: rgba(22, 22, 42, 0.96);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 36px;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 标签切换 */
.tabs {
    display: flex;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 8px;
}

.tab {
    padding: 10px 24px;
    cursor: pointer;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -1px;
}

.tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.tab.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

.form-section {
    display: none;
}

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

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 15px;
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

input:focus {
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
    font-family: inherit;
}

.form-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

.form-btn:active {
    transform: translateY(0);
}

/* 消息提示 */
.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    display: none;
    font-size: 14px;
}

.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: block;
}

.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
}

/* ===== 头像设置 ===== */
.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid rgba(167, 139, 250, 0.4);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-tips {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    font-size: 14px;
}

.upload-box {
    margin: 16px 0;
    padding: 20px;
    border: 2px dashed rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(167, 139, 250, 0.05);
}

.upload-box:hover {
    border-color: rgba(167, 139, 250, 0.5);
    background: rgba(167, 139, 250, 0.1);
}

.upload-text {
    color: #a78bfa;
    font-size: 14px;
    margin-bottom: 4px;
}

#avatarFile {
    display: none;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

/* ===== 表格 ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

th {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-muted { color: rgba(255, 255, 255, 0.5); }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

/* ===== 特色卡片 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-card {
    background: rgba(30, 30, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(35, 35, 65, 0.8);
    border-color: rgba(167, 139, 250, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-card .icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

/* ===== 下载按钮组 ===== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.download-card {
    background: rgba(30, 30, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.download-card:hover {
    background: rgba(35, 35, 65, 0.85);
    border-color: rgba(167, 139, 250, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.download-card .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.download-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.download-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.5);
}

/* ===== SPA 页面过渡 ===== */
.page-view {
    animation: pageFadeIn 0.4s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .glass-card,
    .content-box {
        margin: 16px;
        padding: 24px;
        border-radius: 16px;
    }

    .glass-card h1,
    .content-box h1 {
        font-size: 1.5rem;
    }

    .user-info {
        position: static;
        transform: none;
        padding: 12px 0;
        justify-content: center;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-container,
    .avatar-setting-container {
        margin: 16px;
        padding: 24px;
    }
}
