/* ============================================
   py.peiyin.fun - 专业级视觉设计
   配色：深空黑 + 琥珀金 + 翡翠绿
   ============================================ */

/* CSS Variables - 高级质感配色 */
:root {
    /* 主色调 - 琥珀金 */
    --primary: #d4af37;
    --primary-light: #e6c05a;
    --primary-dark: #b8972b;
    --primary-glow: rgba(212, 175, 55, 0.15);
    
    /* 辅助色 - 翡翠绿 */
    --accent: #10b981;
    --accent-light: #34d399;
    
    /* 背景色 - 深空质感 */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 46, 0.6);
    --bg-card-hover: rgba(40, 40, 60, 0.8);
    --bg-glass: rgba(26, 26, 46, 0.7);
    --bg-glass-border: rgba(212, 175, 55, 0.1);
    
    /* 文字色 */
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-gold: #d4af37;
    
    /* 边框与阴影 */
    --border-color: rgba(212, 175, 55, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 32px rgba(212, 175, 55, 0.1);
    
    /* 圆角与过渡 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浅色主题 */
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(248, 248, 248, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.9);
    --bg-glass-border: rgba(212, 175, 55, 0.2);
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --border-color: rgba(212, 175, 55, 0.25);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 0 32px rgba(212, 175, 55, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 400;
}

/* ============================================
   高级质感背景
   ============================================ */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(30, 30, 46, 0.8) 0%, var(--bg-primary) 100%);
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* ============================================
   导航栏 - 精致简约
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid var(--bg-glass-border);
    padding: 14px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.brand-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-suffix {
    font-size: 19px;
    font-weight: 300;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ============================================
   Hero 区域 - 优雅留白
   ============================================ */
.hero-section {
    padding: 180px 24px 90px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: clamp(38px, 6.5vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin-bottom: 28px;
}

.title-line {
    display: block;
}

.title-accent {
    color: var(--text-gold);
}

.hero-subtitle {
    font-size: clamp(16px, 2.3vw, 19px);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.75;
    font-weight: 400;
}

/* ============================================
   工具区 - 卡片质感
   ============================================ */
.tool-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 90px;
}

.tool-container {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    margin-bottom: 36px;
}

.tool-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 30px;
    transition: var(--transition-base);
}

.tool-panel:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-gold);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.panel-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.panel-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

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

/* 文本输入区 */
.textarea-wrapper {
    position: relative;
}

.main-textarea {
    width: 100%;
    height: 300px;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.85;
    font-family: var(--font-sans);
    resize: vertical;
    transition: var(--transition-base);
    outline: none;
}

.main-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.main-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.textarea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.char-count.warning { color: #f59e0b; }
.char-count.danger { color: #ef4444; }

.quick-actions {
    display: flex;
    gap: 8px;
}

.quick-btn {
    padding: 5px 13px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* 设置面板 */
.settings-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.setting-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    background: rgba(212, 175, 55, 0.12);
    padding: 3px 11px;
    border-radius: var(--radius-full);
}

/* 自定义选择框 - 精致质感 */
.custom-select {
    width: 100%;
    padding: 13px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    appearance: none;
    background-image: url("image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.custom-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px;
}

/* 滑块 - 精致设计 */
.slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: var(--border-subtle);
    outline: none;
    transition: var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
}

.custom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* 声音标签 */
.voice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.voice-tag {
    padding: 4px 11px;
    border-radius: var(--radius-full);
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary-light);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.voice-tag:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary);
}

/* 生成按钮 - 琥珀金质感 */
.generate-section {
    text-align: center;
    margin-bottom: 36px;
}

.generate-btn {
    position: relative;
    padding: 17px 56px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-base);
    overflow: hidden;
    letter-spacing: -0.2px;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: var(--transition-slow);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    border-color: var(--primary-light);
}

.generate-btn:hover::before {
    left: 100%;
}

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

.generate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-content, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
}

.btn-text {
    font-weight: 600;
}

/* ============================================
   音频播放器 - 精致卡片
   ============================================ */
.player-section {
    margin-top: 36px;
    animation: slideUp 0.45s ease-out;
}

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

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.player-visual {
    position: relative;
    height: 100px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.04), transparent);
    overflow: hidden;
}

#visualizer {
    width: 100%;
    height: 100%;
}

.playing-indicator {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 22px;
}

.playing-indicator.hidden { display: none; }

.playing-indicator .bar {
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
    animation: barBounce 0.75s ease-in-out infinite;
}

.bar-1 { height: 7px; animation-delay: 0s; }
.bar-2 { height: 14px; animation-delay: 0.12s; }
.bar-3 { height: 22px; animation-delay: 0.24s; }
.bar-4 { height: 14px; animation-delay: 0.36s; }
.bar-5 { height: 7px; animation-delay: 0.48s; }

@keyframes barBounce {
    0%, 100% { transform: scaleY(0.35); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

.player-controls {
    padding: 18px 26px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.player-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.player-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
}

.progress-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.time-display {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border-subtle);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--primary);
    left: 0%;
    transition: left 0.1s linear;
    opacity: 0;
}

.progress-bar:hover .progress-thumb {
    opacity: 1;
}

.player-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.player-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-fast);
}

.player-action-btn:hover {
    background: var(--primary);
    color: var(--bg-primary);
    border-color: var(--primary);
}

/* ============================================
   功能特性 - 优雅网格
   ============================================ */
.features-section, .guide-section, .voices-section {
    padding: 85px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    transition: var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color);
    box-shadow: var(--shadow-gold);
}

.feature-icon-wrapper {
    margin-bottom: 20px;
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: rgba(212, 175, 55, 0.12);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.feature-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   使用指南 - 步骤流程
   ============================================ */
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 26px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: var(--transition-base);
}

.step-item:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-connector {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.4;
}

/* ============================================
   热门声音 - 精选卡片
   ============================================ */
.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.voice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
}

.voice-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.voice-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
    border: 1px solid var(--border-subtle);
}

.voice-card-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.voice-card-locale {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.voice-card-gender {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.voice-card-gender.male {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

.voice-card-gender.female {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
}

/* ============================================
   页脚 - 简约专业
   ============================================ */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 52px 24px 28px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-gold);
}

.footer-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

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

.footer-separator {
    color: var(--border-subtle);
    font-weight: 300;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   Toast 通知 - 精致提示
   ============================================ */
.toast-container {
    position: fixed;
    top: 85px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 13px 19px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.28s ease-out;
    box-shadow: var(--shadow-md);
    max-width: 340px;
}

.toast.removing {
    animation: toastOut 0.25s ease-in forwards;
}

.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: var(--primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(80px); }
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .tool-container {
        grid-template-columns: 1fr;
    }
    
    .settings-panel {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .hero-section {
        padding: 140px 20px 70px;
    }
    
    .hero-title {
        letter-spacing: -1px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .voices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generate-btn {
        width: 100%;
        padding: 16px 32px;
    }
    
    .tool-panel {
        padding: 24px;
    }
    
    .main-textarea {
        height: 220px;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-connector {
        width: 2px;
        height: 36px;
    }
    
    .player-controls {
        flex-wrap: wrap;
    }
    
    .progress-wrapper {
        width: 100%;
        order: 3;
    }
    
    .player-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .voices-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   加载与交互状态
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 2.5px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

.loader-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   滚动条 - 精致设计
   ============================================ */
::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   文本选择与焦点
   ============================================ */
::selection {
    background: rgba(212, 175, 55, 0.25);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* 输入框自动填充样式 */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}