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

:root {
    /* Ultra-modern color palette with gradient accents */
    --primary-gradient: linear-gradient(135deg, #24245c 0%, #2d2d6e 100%);
    --primary-color: #24245c;
    --primary-hover: #1e1e4a;
    --primary-light: rgba(36, 36, 92, 0.08);
    --primary-glow: rgba(36, 36, 92, 0.4);
    
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-color: #f093fb;
    
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --card-bg: #ffffff;
    --card-hover: #fcfcfd;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    --shadow-glow: 0 0 50px rgba(36, 36, 92, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark mode - Elegant and sophisticated */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-gradient: linear-gradient(135deg, #24245c 0%, #2d2d6e 100%);
        --primary-color: #3a3a7c;
        --primary-hover: #24245c;
        --primary-light: rgba(36, 36, 92, 0.1);
        --primary-glow: rgba(36, 36, 92, 0.5);
        
        --accent-gradient: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
        --accent-color: #ec4899;
        
        --bg-color: #030712;
        --bg-secondary: #111827;
        --bg-tertiary: #1e293b;
        --card-bg: #0f172a;
        --card-hover: #1e293b;
        
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-tertiary: #64748b;
        
        --border-color: #1e293b;
        --border-light: #0f172a;
        
        --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.2);
        --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.6);
        --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.8);
        
        --shadow-glow: 0 0 60px rgba(36, 36, 92, 0.4);
    }

    /* Optimised stripes for dark mode – smoother and light-balanced */
    header h1 {
        background: linear-gradient(
            120deg,
            #5052ce 0%,  #5052ce 4%,
            #5e60d4 4%,  #5e60d4 8%,
            #6d6fe0 8%,  #6d6fe0 12%,
            #7e80e6 12%,  #7e80e6 16%,
            #8688eb 16%,  #8688eb 20%,
            #a2a4f5 20%,  #a2a4f5 24%,
            #b3b4f9 24%,  #b3b4f9 28%,
            #d2d3ff 28%,  #d2d3ff 32%,
            #a2a4f5 32%,  #a2a4f5 36%,
            #8688eb 36%,  #8688eb 40%,
            #6d6fe0 40%,  #6d6fe0 44%,
            #5e60d4 44%,  #5e60d4 48%,
            #5052ce 48%,  #5052ce 52%,
            #6d6fe0 52%,  #6d6fe0 56%,
            #8688eb 56%,  #8688eb 60%,
            #a2a4f5 60%,  #a2a4f5 64%,
            #b3b4f9 64%,  #b3b4f9 68%,
            #a2a4f5 68%,  #a2a4f5 72%,
            #8688eb 72%,  #8688eb 76%,
            #6d6fe0 76%,  #6d6fe0 80%,
            #5e60d4 80%,  #5e60d4 84%,
            #5052ce 84%,  #5052ce 100%
        );
    }
}

/* Base styles with improved typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding-top: 68px; /* Space for fixed navbar */
    position: relative;
    overflow-x: hidden;
}

/* Navigation Bar - Clean and Minimal */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: 68px;
}

.nav-container {
    max-width: 1440px;
    width: 90%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    padding: 0 16px;
    height: 60px;
    border-bottom: 3px solid transparent;
}

.nav-brand:hover {
    color: #24245c;
    border-bottom-color: #24245c;
}

.nav-brand:hover .nav-title {
    color: #24245c;
}

.nav-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* DeepL-style pricing link */
.nav-link-deepl {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 60px;
    padding: 0 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.nav-link-deepl:hover {
    color: #24245c;
    border-bottom-color: #24245c;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link.nav-primary {
    background: #1c1c1e;
    color: white;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 
                0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.nav-link.nav-primary:hover {
    background: #2c2c2e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 
                0 3px 10px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.nav-link.nav-primary:active {
    transform: scale(0.98);
    background: #151517;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User Menu in Navbar */
.nav-user {
    display: flex;
    align-items: center;
}

.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
}

.nav-user-btn:hover {
    background: var(--bg-secondary);
    border-color: #24245c;
}

.nav-user-avatar {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-user-avatar svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.nav-user-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.nav-user-progress {
    width: 100%;
    height: 6px; /* 恢复原来的厚度 */
    background: var(--border-color); /* 用掉的部分显示为适配主题的颜色 */
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.nav-user-progress-bar {
    height: 100%;
    background: #24245c;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.nav-dropdown-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
}

.nav-dropdown-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.nav-dropdown-tier {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.nav-dropdown-credits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.nav-credits-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.nav-credits-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #24245c;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.nav-dropdown-item:hover {
    background: var(--bg-secondary);
}

.nav-dropdown-item.nav-logout {
    color: var(--error-color);
}

/* Removed animated background gradient */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Remove old header styles - replaced by navbar */

/* Header content layout */
.header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-top: -25px;
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    /* Optimised multi-stripe palette – subtle progression, edges remain mid-dark */
    background: linear-gradient(
        120deg,
        #25276c 0%,   #25276c 4%,
        #414385 4%,   #414385 8%,
        #6264a6 8%,   #6264a6 12%,
        #7071b1 12%,  #7071b1 16%,
        #9496c4 16%,  #9496c4 20%,
        #b0b2d6 20%,  #b0b2d6 24%,
        #dddfec 24%,  #dddfec 28%,
        #9496c4 28%,  #9496c4 32%,
        #7071b1 32%,  #7071b1 36%,
        #6264a6 36%,  #6264a6 40%,
        #4b4f94 40%,  #4b4f94 44%,
        #414385 44%,  #414385 48%,
        #25276c 48%,  #25276c 52%,
        #414385 52%,  #414385 56%,
        #6264a6 56%,  #6264a6 60%,
        #7071b1 60%,  #7071b1 64%,
        #9496c4 64%,  #9496c4 68%,
        #b0b2d6 68%,  #b0b2d6 72%,
        #9496c4 72%,  #9496c4 76%,
        #6264a6 76%,  #6264a6 80%,
        #414385 80%,  #414385 84%,
        #25276c 84%,  #25276c 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    animation: fadeInUpCentered 0.8s ease forwards 0.2s;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

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

@keyframes fadeInUpCentered {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 90px;
    animation: fadeInUp 0.8s ease forwards 0.4s;
    opacity: 0;
}

@media (max-width: 768px) {
    main {
        gap: 20px;
        padding-top: 48px;
    }
}

/* Enhanced translation container with glass morphism */
.translation-container {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) auto minmax(360px, 1fr);
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

.text-box-wrapper {
    display: flex;
    flex-direction: column;
}

.text-box {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
    border: 1.5px solid var(--border-color);
    border-bottom: none;
    min-height: 360px;
}

.text-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Enhanced language selector with subtle animations */
.language-selector,
.language-display {
    background: var(--bg-secondary);
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    height: 72px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.language-display {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 24px;
    height: 72px;
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Ultra-modern button styles */
.lang-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.lang-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
    font-weight: 600;
}

/* Style selector */
.selector-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
    margin: 0 8px;
}

.style-selector {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.style-buttons {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 24px;
}

.style-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    position: relative;
    white-space: nowrap;
    height: 36px;
    min-width: 55px;
}

.style-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.style-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.style-btn:hover svg {
    transform: scale(1.1);
}

.style-btn.active {
    background: #3d3c6d;
    color: white;
    box-shadow: none;
}

/* Dark mode for style buttons */
@media (prefers-color-scheme: dark) {
    .style-btn.active {
        background: #37375d;
        color: white;
    }
    
    .language-display {
        background: var(--bg-secondary);
    }
    
    .style-buttons {
        background: var(--bg-tertiary);
    }
    
    .style-selector {
        background: var(--bg-secondary);
    }
}

.style-btn.active svg {
    stroke: white;
}

/* Responsive: Hide text on small screens */
@media (max-width: 1200px) {
    .style-btn span {
        display: none;
    }
    
    .style-btn {
        padding: 9px;
        min-width: 40px;
        justify-content: center;
        border-radius: 20px;
        height: 36px;
    }
    
    .style-buttons {
        gap: 4px;
        padding: 4px;
    }
}

/* Enhanced textarea with smooth focus transitions */
textarea {
    border: none;
    outline: none !important;
    resize: none;
    padding: 32px 48px 32px 32px; /* 右侧：仅清空按钮空间 */
    font-size: 17px;
    font-family: inherit;
    line-height: 1.4;
    color: var(--text-primary);
    min-height: 288px;
    background: transparent;
    overflow-y: auto; /* 自动滚动但隐藏滚动条 */
    height: 288px;
    display: block;
    width: 100%;
    transition: var(--transition);
    box-sizing: border-box;
}

textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

textarea::placeholder {
    color: var(--text-tertiary);
    transition: var(--transition);
}

textarea:focus::placeholder {
    opacity: 0.5;
    transform: translateX(4px);
}

/* Floating character count */
.char-count {
    position: absolute;
    bottom: 20px;
    right: 32px;
    font-size: 13px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    white-space: nowrap; /* Prevent line breaks */
    display: inline-flex; /* Ensure inline display */
    align-items: center;
    gap: 4px;
}

/* Removed char count hover effect */

/* Simple and elegant swap button */
.translate-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 0 -12px;
}

.swap-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.swap-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--card-hover);
}

.swap-btn:active {
    transform: scale(0.95);
}

.swap-btn svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

/* Beautiful output text area */
.output-text {
    padding: 32px;
    min-height: 288px;
    height: 288px;
    flex: 1;
    overflow-y: auto;
    font-size: 17px;
    line-height: 1.4;
    background: transparent;
    transition: var(--transition);
}

.output-text.placeholder {
    background: transparent;
}


/* Modern TTS button */
.tts-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.tts-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.tts-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tts-btn.playing {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Unified text actions style */
.text-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    align-items: center;
    min-height: 64px;
    margin-bottom: 24px;
}

/* Enhanced clear button */
.clear-btn-inside {
    position: absolute;
    top: 16px;
    right: 16px; /* 调整到更合适的位置 */
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    z-index: 10; /* 提高z-index确保按钮在最上层 */
    opacity: 0;
    visibility: hidden;
}

.text-box:hover .clear-btn-inside {
    opacity: 1;
    visibility: visible;
}

.clear-btn-inside:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.clear-btn-inside svg {
    width: 20px;
    height: 20px;
}

/* Beautiful copy button */
.copy-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.copy-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}



.copy-btn svg {
    transition: var(--transition);
}

.copy-btn span {
    transition: var(--transition);
}

/* Enhanced error message */
.error-message {
    background: #fef2f2;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Loading state completely hidden */
.loading {
    display: none !important;
}

/* Ensure buttons stay visible */
.tts-btn.loading {
    opacity: 0.8;
    display: flex !important;
    transform: scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* TTS spinner */
.tts-btn .spin {
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Remove outline on all interactive elements */
button:focus,
textarea:focus {
    outline: none !important;
}

/* Enhanced file upload button */
.upload-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-weight: 500;
    gap: 8px;
}

.upload-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Attachments area with modern design */
.attachments {
    display: none;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Compact attachment preview */
.attachment-preview-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
}

.attachment-preview-compact:hover {
    border-color: var(--primary-color);
}

.attachment-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

.attachment-icon-compact {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    color: white;
}

.attachment-info-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.attachment-info-compact .attachment-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-info-compact .attachment-size {
    font-size: 13px;
    color: var(--text-tertiary);
}

.attachment-remove-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--card-bg);
    color: var(--text-tertiary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.attachment-remove-btn:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.1);
}

/* Drop hint with glassmorphism */
.drop-hint {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.05);
    backdrop-filter: blur(10px);
    border: 3px dashed var(--primary-color);
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    z-index: 10;
    pointer-events: none;
    border-radius: var(--radius-xl);
    animation: fadeIn 0.3s ease;
}

/* Pricing Link in Header */
.pricing-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.pricing-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Pricing Page Styles */
.pricing-content {
    padding: 2rem 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Pricing Table */
.pricing-comparison {
    overflow-x: auto;
    margin-bottom: 3rem;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pricing-table th,
.pricing-table td {
    padding: 1rem 1.5rem;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.pricing-table th:last-child,
.pricing-table td:last-child {
    border-right: none;
}

.pricing-table thead tr {
    background: var(--bg-secondary);
}

.pricing-table tbody tr {
    border-top: 1px solid var(--border-color);
}

.pricing-table tbody tr:hover {
    background: var(--bg-secondary);
}

.plan-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.plan-price .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-price .period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.plan-badge {
    display: inline-block;
    background: #24245c;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.pricing-table .featured {
    background: var(--bg-secondary);
    position: relative;
}

.feature-name {
    text-align: left !important;
    font-weight: 500;
    color: var(--text-primary);
}

.check {
    color: var(--success-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.cross {
    color: var(--text-tertiary);
    font-size: 1rem;
}

.action-row td {
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
@media (min-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}


.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: #24245c;
    box-shadow: var(--shadow-lg);
    border-width: 2px;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #24245c;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.pricing-amount .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-amount .period {
    color: var(--text-secondary);
    font-size: 1rem;
}

.pricing-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.feature-item svg {
    color: var(--success-color);
    flex-shrink: 0;
}

.feature-item.disabled {
    opacity: 0.5;
}

.feature-item.disabled svg {
    color: var(--text-tertiary);
}

.pricing-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pricing-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.pricing-btn.primary {
    background: #24245c;
    color: white;
    border: none;
}

.pricing-btn.primary:hover {
    background: #1e1f4c;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pricing-btn.pro-blue {
    background: #3b82f6;
    color: white;
    border: none;
}

.pricing-btn.pro-blue:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pricing-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pricing Details Section */
.pricing-details {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.pricing-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.points-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.points-row:last-child {
    border-bottom: none;
}

.points-type {
    color: var(--text-primary);
    font-weight: 500;
}

.points-cost {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Modern footer */
footer {
    text-align: center;
    padding: 48px 0;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--border-light);
}

/* Contact email styling - simplified */
.contact-info {
    margin-top: 8px;
}

.email-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 14px;
}

.email-link:hover {
    color: var(--primary-color);
}

.email-icon {
    display: none;
}

/* Responsive design with smooth transitions */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        width: 95%;
    }
    
    .translation-container { grid-template-columns: 1fr; gap: 12px; }
    
    header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    /* 确保内容不被顶栏遮挡 */
    body {
        padding-top: 64px;
    }
    
    /* Navbar responsive */
    .navbar {
        height: 64px;
    }
    
    .nav-title {
        font-size: 1.3rem;
    }
    
    .nav-badge {
        display: none;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .nav-user-info {
        display: none;
    }
    
    .nav-user-name {
        display: none;
    }
    
    .translation-container { grid-template-columns: 1fr; gap: 8px; }
    .text-actions { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
    .upload-btn, .copy-btn, .tts-btn { height: 40px; border-radius: 16px; }
    .copy-btn { flex: 1 1 100%; order: 3; }
    .upload-btn { order: 2; }
    .tts-btn { order: 1; }
    textarea, .output-text { padding: 20px; min-height: 220px; height: 220px; font-size: 16px; }
    .language-selector, .language-display { height: auto; padding: 12px 16px; }
    
    .text-actions {
        margin-bottom: 12px;
        padding: 12px 16px;
        gap: 8px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .translate-btn-container {
        display: none !important;
    }
    
    .swap-btn {
        width: 44px;
        height: 44px;
    }
    
    /* Mobile style selector adjustments */
    .language-selector {
        flex-wrap: wrap;
        height: auto;
        padding: 16px;
        gap: 8px;
    }
    
    .language-display {
        height: auto;
        padding: 16px;
    }
    
    .style-selector {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
    }
    
    .style-buttons {
        width: 100%;
        justify-content: space-between;
        gap: 2px;
        padding: 3px;
        flex-wrap: wrap;
    }
    
    .style-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        border-radius: 20px;
        height: 36px;
    }
    
    .style-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .selector-divider {
        display: none;
    }
    
    .swap-btn svg {
        width: 18px;
        height: 18px;
    }
    
    header {
        padding: 32px 0 24px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .logo {
        width: 80px;
        height: 80px;
        margin-top: 0;
    }
    
    header h1 {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    textarea,
    .output-text {
        min-height: 180px;
        height: 180px;
        padding: 20px 40px 20px 20px; /* 移动端：仅清空按钮空间 */
        font-size: 16px;
    }
    
    .text-box {
        min-height: 260px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .language-selector,
    .language-display {
        padding: 14px 16px;
        height: auto;
        min-height: 56px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .lang-btn {
        font-size: 13px;
        padding: 8px 14px;
        border-radius: 20px;
        height: 36px;
    }
    
    .upload-btn {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .upload-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .clear-btn-inside {
        top: 12px;
        right: 12px; /* 移动端调整到更合适的位置 */
        width: 28px;
        height: 28px;
    }
    
    .char-count {
        bottom: 16px;
        right: 20px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .copy-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .tts-btn {
        width: 38px;
        height: 38px;
    }
    
    .tts-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 超小屏优化，避免顶栏溢出与被遮挡，不影响桌面端 */
@media (max-width: 480px) {
    /* 顶栏与主体间距同步 */
    .navbar {
        height: 56px;
    }
    body {
        padding-top: 56px;
    }

    .nav-container {
        width: 100%;
        padding: 0 12px;
        gap: 8px;
    }
    .nav-left { gap: 12px; }
    .nav-right { gap: 12px; }

    .nav-brand { padding: 0 8px; height: 52px; }
    .nav-logo { width: 36px; height: 36px; }
    .nav-title { font-size: 1.1rem; }
    .nav-badge { display: none; }
    .nav-link-deepl { display: none; }

    .nav-link { font-size: 0.95rem; padding: 6px 10px; }
    .nav-link.nav-primary {
        min-width: 72px;
        height: 36px;
        padding: 8px 14px;
        border-radius: 14px;
    }

    .nav-user-btn { min-width: 140px; padding: 6px 10px; }
    .nav-user-avatar { width: 24px; height: 24px; }
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbars for Firefox */
* {
    scrollbar-width: none;
}

/* Ensure scrolling works but scrollbars are hidden */
textarea, .output-text {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Selection styles */
::selection {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Focus styles removed for cleaner look */
*:focus-visible {
    outline: none;
}

/* Ensure smooth transitions don't affect layout - removed global transition to fix input issue */

/* Prevent layout shift from transforms */
.tts-btn,
.lang-btn,
.copy-btn,
.swap-btn,
.upload-btn,
.clear-btn-inside {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* High performance GPU acceleration */
.input-section,
.output-section,
.swap-btn,
.copy-btn {
    transform: translateZ(0);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced mobile touch targets and interactions */
@media (max-width: 768px) {
    /* Improved touch targets */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better visual feedback on mobile */
    .style-btn:active,
    .lang-btn:active,
    .copy-btn:active,
    .swap-btn:active,
    .tts-btn:active,
    .upload-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Prevent double-tap zoom on buttons */
    button {
        touch-action: manipulation;
    }
    
    /* Improved scrolling on mobile */
    textarea,
    .output-text {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Better spacing for mobile */
    .container {
        padding: 0 8px;
    }
    
    footer {
        padding: 32px 0;
        font-size: 13px;
    }
    
    /* Optimize error message for mobile */
    .error-message {
        padding: 16px 20px;
        font-size: 14px;
        margin: 0 8px;
        border-radius: var(--radius-md);
    }
}

/* 呼吸灯效果 - 简洁版 */
@keyframes breathe {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

/* 输入框呼吸灯样式 - 简洁版 */
.input-breathing {
    position: relative;
}

.input-breathing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.03);
    animation: shimmer 3s ease-in-out infinite;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.input-breathing textarea {
    position: relative;
    z-index: 2;
}

/* 翻译框呼吸灯样式 - 简洁版 */
.output-breathing {
    position: relative;
}

.output-breathing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(240, 147, 251, 0.03);
    animation: shimmer 3s ease-in-out infinite;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.output-breathing .output-text {
    position: relative;
    z-index: 2;
}

/* 呼吸灯占位符文字 - 简洁版 */
.input-breathing textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
    font-style: italic;
}

.output-breathing .output-text.placeholder::after {
    content: '正在处理中...';
    color: var(--text-tertiary);
    opacity: 0.7;
    font-style: italic;
}

/* 输入框处理中状态 */
.input-processing {
    position: relative;
}

.input-processing textarea {
    color: var(--text-tertiary) !important;
    pointer-events: none;
    user-select: none;
}

.input-processing textarea::after {
    content: '正在处理中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-tertiary);
    font-style: italic;
    opacity: 0.8;
    pointer-events: none;
}

/* 减少动画对性能的影响 */
.input-breathing::before,
.output-breathing::before {
    will-change: opacity;
    backface-visibility: hidden;
}

/* 在有内容时移除呼吸灯效果 */
.input-breathing.has-content::before,
.output-breathing.has-content::before {
    display: none;
}

.input-breathing.has-content textarea,
.output-breathing.has-content .output-text {
    animation: none;
    background: var(--card-bg);
}

/* ================================== */
/* 认证系统样式 */
/* ================================== */

/* 头部布局更新 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* 认证按钮 */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auth-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.auth-btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

/* 用户菜单 */
.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* 整合的用户信息块 */
.user-info-integrated {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 280px;
}

.user-info-integrated:hover {
    border-color: var(--primary-color);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.quota-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
    flex: 1;
}

/* 保持原有样式兼容性 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info:hover {
    border-color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-tier {
    font-size: 12px;
    color: var(--text-tertiary);
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition-fast);
}

.dropdown-btn:hover {
    color: var(--primary-color);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-item.logout {
    color: var(--error-color);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* 配额显示 */
.quota-display {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    min-width: 160px;
}

.quota-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quota-text {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.quota-progress {
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.quota-progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    animation: modalSlideIn 0.3s ease-out forwards;
    border: 1px solid var(--border-color);
    position: relative;
}

/* 移除渐变顶部条 */
.modal-content::before {
    display: none;
}

@keyframes modalSlideIn {
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* 表单样式 */
.auth-form {
    padding: 24px;
    position: relative;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s ease;
    background: var(--bg-color);
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 移除默认的 invalid 样式，只在用户交互后显示错误 */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
}

/* 显式的错误状态类 */
.form-group input.error {
    border-color: var(--error-color);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.form-description {
    margin-bottom: 24px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 密码输入框 */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    border-radius: 1px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.strength-text {
    font-size: 11px;
    font-weight: 500;
    min-width: 50px;
}

/* 复选框样式 - 更大更易点击 */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    padding: 20px 16px;
    margin: -12px -16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    min-height: 64px;
    border: 2px solid transparent;
}

.checkbox-label:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0px;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.checkmark:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* 按钮样式 */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
    position: relative;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 14px 24px;
    font-size: 15px;
    border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单动作区域 */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

.form-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.form-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.form-links span {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 错误和成功消息 */
.form-error {
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: var(--error-color);
    font-size: 13px;
    margin-top: 12px;
}

.form-success {
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    color: var(--success-color);
    font-size: 13px;
    margin-top: 12px;
}

/* 页面覆盖层（用户中心） */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 1500;
    overflow-y: auto;
    opacity: 0;
    animation: pageSlideIn 0.3s ease-out forwards;
}

@keyframes pageSlideIn {
    to {
        opacity: 1;
    }
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.page-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
    text-decoration: none;
}

.page-back:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.page-close:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 定价页面特殊布局 */
.pricing-page-content {
    padding-top: 80px !important; /* 避免被导航栏遮挡 */
}

.pricing-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.pricing-page-header .page-close {
    position: static;
    transform: none;
}

/* 定价页面关闭按钮 - 简洁版本 */
.pricing-close-btn {
    position: absolute;
    top: 80px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 1100;
}

.pricing-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 低调的Credit说明 */
.pricing-notes {
    margin-top: 40px;
    text-align: center;
}

.pricing-notes-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-weight: 500;
}

.pricing-notes-content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.pricing-notes-content span {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* 用户中心内容 - 充分利用屏幕空间的网格布局 */
.user-center-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    grid-template-areas: 
        "profile stats"
        "actions subscription"
        "actions subscription";
}

/* 指定每个卡片的网格位置 */
.profile-overview-card {
    grid-area: profile;
}

.usage-stats-card {
    grid-area: stats;
}

.quick-actions-card {
    grid-area: actions;
}

.subscription-card {
    grid-area: subscription;
}

/* 卡片基础样式 */
.profile-overview-card,
.usage-stats-card,
.quick-actions-card,
.subscription-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    position: relative;
}

.avatar-circle {
    width: 72px;
    height: 72px;
    background: #24245c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(36, 36, 92, 0.15);
}

.profile-details h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.profile-details p {
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.tier-info {
    display: flex;
    align-items: center;
}

.tier-badge {
    background: #24245c;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 使用统计卡片样式 */

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.stats-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stats-period {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 8px;
}

.primary-stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #24245c;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-unit {
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* 进度条 */
.usage-progress {
    margin-top: 16px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #24245c;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* 快捷操作卡片样式 */

.quick-actions-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.action-item:hover {
    background: var(--card-hover);
    border-color: #24245c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 36, 92, 0.1);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: #24245c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.action-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 订阅卡片样式 */

.subscription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.subscription-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.current-plan-badge {
    background: #24245c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.subscription-content {
    margin-bottom: 24px;
    min-height: 60px;
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.primary-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: #24245c;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.primary-action-btn:hover {
    background: #1a1a45;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 36, 92, 0.25);
}

.secondary-actions {
    display: flex;
    gap: 12px;
    justify-content: stretch;
}

.secondary-actions .secondary-action-btn {
    flex: 1;
}

.secondary-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-action-btn:hover {
    color: var(--text-primary);
    border-color: #24245c;
    background: var(--bg-secondary);
}

.secondary-action-btn.danger:hover {
    color: var(--error-color);
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

/* 中等屏幕 - 调整网格布局 */
@media (max-width: 1200px) {
    .user-center-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: 
            "profile stats"
            "actions subscription";
        max-width: 1000px;
    }
}

/* 平板屏幕 - 简化布局 */
@media (max-width: 900px) {
    .user-center-content {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 
            "profile"
            "stats"
            "actions"
            "subscription";
        gap: 20px;
        padding: 0 20px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, min(100%, 1fr)));
    }
}

/* 移动设备 - 完全竖向布局 */
@media (max-width: 768px) {
    .user-center-content {
        gap: 16px;
        padding: 0 16px;
    }
    
    .profile-overview-card,
    .usage-stats-card,
    .quick-actions-card,
    .subscription-card {
        padding: 24px;
        border-radius: 12px;
    }
    
    .profile-main {
        gap: 16px;
    }
    
    .avatar-circle {
        width: 60px;
        height: 60px;
    }
    
    .profile-details h1 {
        font-size: 24px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-item {
        padding: 16px;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
    }
    
    .secondary-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .user-center-content {
        padding: 0 12px;
        gap: 12px;
    }
    
    .profile-overview-card,
    .usage-stats-card,
    .quick-actions-card,
    .subscription-card {
        padding: 20px;
    }
    
    .profile-main {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

/* 独立个人中心页面样式 */
.profile-page-standalone {
    max-width: 1400px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.page-header-standalone {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.back-to-home {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.back-to-home:hover {
    background: var(--card-hover);
    color: var(--text-primary);
    border-color: #24245c;
    text-decoration: none;
    transform: translateX(-2px);
}

.page-header-standalone h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

/* 独立页面的用户中心内容样式调整 */
.profile-page-standalone .user-center-content {
    margin-top: 0;
}

/* 导航栏活跃状态 */
.nav-dropdown-item.active {
    background: var(--primary-light);
    color: #24245c;
    font-weight: 600;
}

/* 头像字母显示 */
.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #24245c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.avatar-circle {
    width: 72px;
    height: 72px;
    background: #24245c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(36, 36, 92, 0.15);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 表单样式 */
.modal-content form {
    padding: 24px 32px 32px;
}

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

.form-group:last-of-type {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #24245c;
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(36, 36, 92, 0.1);
}

.form-group input.error {
    border-color: var(--error-color);
    background: #fef2f2;
}

.form-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-help {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.btn-primary {
    background: #24245c;
    color: white;
}

.btn-primary:hover {
    background: #1a1a45;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 36, 92, 0.25);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-hover);
    color: var(--text-primary);
    border-color: #24245c;
}

.form-error {
    background: #fef2f2;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
}

/* 响应式设计 - 独立页面 */
@media (max-width: 768px) {
    .profile-page-standalone {
        margin-top: 30px;
        padding: 0 16px;
    }
    
    .page-header-standalone {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .page-header-standalone h1 {
        font-size: 24px;
    }
    
    .back-to-home {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .profile-page-standalone {
        margin-top: 20px;
        padding: 0 12px;
    }
    
    .page-header-standalone {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
}

/* 通知系统 - 简约大气设计 */
.notification-container {
    position: fixed;
    top: 28px;
    right: 28px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid rgba(36, 36, 92, 0.06);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(36, 36, 92, 0.10);
    animation: notificationSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-primary);
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
}

@keyframes notificationSlideIn {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.notification-success { color: #0f5132; }

.notification-success::before { background: linear-gradient(135deg, #10b981, #059669); }

.notification-error { color: #842029; }

.notification-error::before { background: linear-gradient(135deg, #ef4444, #dc2626); }

.notification-info { color: #24245c; }

.notification-info::before { background: linear-gradient(135deg, #24245c, #1e1e4f); }

.notification-content { padding-right: 10px; }

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: currentColor;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: 16px;
    padding: 2px 8px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.notification-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }

/* 隐藏动画 */
.notification-hide { transform: translateY(-6px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .header-left {
        position: relative;
        left: auto;
        transform: none;
        justify-content: center;
    }
    
    .header-right {
        justify-content: center;
        margin-left: 0;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .user-info-integrated {
        min-width: auto;
        max-width: 250px;
        gap: 12px;
        padding: 8px 12px;
    }
    
    .user-section {
        gap: 8px;
    }
    
    .quota-section {
        min-width: 60px;
    }
    
    .quota-text {
        font-size: 10px;
    }
    
    .quota-display {
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .notification-container { left: 12px; right: 12px; top: 12px; max-width: none; }
    
    .notification { padding: 14px 16px; border-radius: 12px; }
    
    /* 移动端复选框进一步增大 */
    .checkmark {
        width: 36px;
        height: 36px;
        margin-top: 0;
        border-width: 3px;
    }
    
    .checkbox-label {
        gap: 20px;
        padding: 24px 20px;
        font-size: 17px;
        margin: -16px -20px;
        min-height: 72px;
    }
    
    .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
        left: 12px;
        top: 6px;
        width: 8px;
        height: 14px;
        border-width: 0 3px 3px 0;
    }
    
    /* 移动端定价关闭按钮调整 */
    .pricing-close-btn {
        top: 70px;
        right: 16px;
        width: 28px;
        height: 28px;
    }
}

/* 字符计数器样式 */
.character-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    z-index: 10;
}

/* 配额警告模态框样式 */
.quota-modal {
    max-width: 500px;
    text-align: center;
}

.quota-content {
    padding: 20px;
}

.quota-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.quota-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.quota-details {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.quota-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.quota-actions .btn {
    min-width: 120px;
}

/* 配额进度条增强样式 */
.quota-display {
    transition: all 0.3s ease;
}

.quota-progress-fill {
    transition: all 0.5s ease;
}

/* 配额警告状态 */
.quota-warning {
    animation: pulse 2s infinite;
}

.quota-critical {
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* 限制提示工具提示 */
.limit-tooltip {
    position: relative;
    cursor: help;
}

.limit-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.limit-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 升级提示按钮 */
.upgrade-prompt {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.upgrade-prompt:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* 配额状态指示器 */
.quota-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.quota-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24245c;
}

.quota-status-dot.warning {
    background: #ff9800;
}

.quota-status-dot.critical {
    background: #f44336;
}

/* 独立定价页面样式 */
.pricing-comparison {
    display: none !important;
}

.pricing-page-standalone {
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.pricing-page-standalone .pricing-content {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-bottom: 32px;
}

.pricing-page-standalone .pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-page-standalone .pricing-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pricing-page-standalone .pricing-header p {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
}

.pricing-cta {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-top: 40px;
}

.pricing-cta p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.back-to-home-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-to-home-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* 大屏幕进一步优化 */
@media (min-width: 1200px) {
    .pricing-page-standalone {
        margin-top: 32px;
    }
}

/* 中等屏幕优化 */
@media (max-width: 1199px) and (min-width: 769px) {
    .pricing-page-standalone {
        margin-top: 36px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pricing-page-standalone {
        margin-top: 30px;
        padding: 0 16px;
    }
    
    .pricing-page-standalone .pricing-content {
        padding: 24px;
    }
    
    .pricing-page-standalone .pricing-header h2 {
        font-size: 24px;
    }
    
    .pricing-page-standalone .pricing-header p {
        font-size: 16px;
    }
}

/* 优惠券输入区域 */
.coupon-section {
    max-width: 400px;
    margin: 1.5rem auto 2rem;
    text-align: center;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    text-transform: uppercase;
    transition: border-color 0.2s;
}

.coupon-input:focus {
    outline: none;
    border-color: #ff5722;
}

.apply-coupon-btn {
    padding: 12px 24px;
    background: #24245c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-coupon-btn:hover {
    background: #2d2d6e;
    transform: translateY(-1px);
}

.coupon-message {
    font-size: 14px;
    margin-top: 8px;
}

.coupon-message.success {
    color: #10b981;
}

.coupon-message.error {
    color: #ef4444;
}

/* 折扣标记 */
.discount-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.discounted-price {
    color: #10b981;
    font-weight: 700;
}

.price del {
    color: #9ca3af;
    font-size: 0.85em;
    margin-right: 8px;
}

/* 订阅通知 */
.subscription-notice {
    max-width: 600px;
    margin: 2rem auto;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.subscription-notice.warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.subscription-notice p {
    margin: 0;
    flex: 1;
}

.subscription-notice .btn {
    flex-shrink: 0;
}

/* 当前计划按钮样式 */
.pricing-btn.current-plan {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.pricing-btn.current-plan:hover {
    transform: none;
    box-shadow: none;
}

/* 禁用按钮样式 */
.pricing-btn.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.pricing-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    background: #f3f4f6;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: white;
    font-size: 18px;
    margin: 0;
}

/* 订阅管理样式 */
.subscription-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.subscription-status {
    margin-bottom: 24px;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.status-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary);
}

.plan-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.plan-badge.free {
    background: #e0e7ff;
    color: #3730a3;
}

.plan-badge.basic {
    background: #fef3c7;
    color: #92400e;
}

.plan-badge.premium {
    background: #d1fae5;
    color: #065f46;
}

.subscription-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.subscription-desc .warning {
    color: #dc2626;
    font-weight: 500;
}

.subscription-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subscription-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.subscription-features li:before {
    margin-right: 8px;
}

.subscription-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.action-btn.danger {
    color: #dc2626;
    border-color: #fee2e2;
}

.action-btn.danger:hover {
    background: #fee2e2;
}

.action-btn.success {
    color: #059669;
    border-color: #d1fae5;
}

.action-btn.success:hover {
    background: #d1fae5;
}