/* ============================================
   基于 SonicDream Generator React 组件的样式
   ============================================ */

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

/* 品牌色定义 */
:root {
    --brand-primary: #6366f1;
    --brand-secondary: #a855f7;
    --brand-accent: #ec4899;
    --glass-100: rgba(255, 255, 255, 0.05);
    --glass-200: rgba(255, 255, 255, 0.1);
    --glass-300: rgba(255, 255, 255, 0.2);
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background:#07111f;
    color: var(--slate-200);
    min-height: 100vh;
    padding: 0;
    padding-top: 80px; /* 只保留导航栏高度，标签栏是sticky定位 */
}

/* 移动端调整body的padding-top */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* 移动端navbar高度是60px */
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Slider thumb reset */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* ============================================
   Navbar 导航栏
   ============================================ */
.community-page{width:100%;max-width:1240px;margin:0 auto;padding:38px 24px 72px}.community-hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.7fr);gap:44px;align-items:center;padding:48px 52px;border:1px solid #203149;border-radius:24px;background:#0b1829;box-shadow:0 24px 60px rgba(0,0,0,.22)}.hero-copy{max-width:660px}.eyebrow{display:inline-block;margin-bottom:16px;color:#67e8f9;font-size:13px;font-weight:800;letter-spacing:.14em}.community-hero h2,.page-heading h2{font-size:clamp(36px,5vw,64px);line-height:1.06;color:#f8fafc;letter-spacing:-.045em}.community-hero p,.page-heading p{max-width:760px;margin-top:18px;color:#a7b5c8;font-size:17px;line-height:1.7}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.portal-action{border:1px solid #2b3d56;border-radius:11px;background:#122137;color:#eaf2ff;padding:12px 18px;font-size:15px;font-weight:750;cursor:pointer}.portal-action.primary{border-color:#22d3ee;background:#22d3ee;color:#062b36}.hero-side{display:grid;grid-template-columns:1fr;gap:12px}.points-card{display:flex;flex-direction:column;padding:24px;border:1px solid #31425a;border-radius:18px;background:#101f33;color:#eaf2ff}.points-card span{font-size:14px;color:#67e8f9;font-weight:800}.points-card strong{margin:10px 0 8px;font-size:22px;line-height:1.3}.points-card small{color:#93a4b8;font-size:13px;line-height:1.55}.points-card button{align-self:flex-start;margin-top:18px;border:0;background:transparent;color:#67e8f9;font-weight:800;cursor:pointer}.hero-stat{display:flex;align-items:center;gap:16px;padding:18px 22px;border-radius:18px;background:#f5b942;color:#231803}.hero-stat strong{font-size:32px}.hero-stat span{font-size:14px;font-weight:700;line-height:1.45}.portal-grid,.classroom-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.portal-card{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:16px;min-height:116px;padding:20px;text-align:left;border:1px solid #1e3048;border-radius:17px;background:#0c192a;color:#f8fafc;cursor:pointer;transition:.2s transform,.2s border-color,.2s background}.portal-card:hover{transform:translateY(-3px);border-color:#22d3ee;background:#102238}.portal-card .card-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#132b43;color:#67e8f9;font-size:16px;font-weight:900}.portal-card h3{margin:0 0 7px;font-size:18px}.portal-card p{min-height:0;color:#8495aa;font-size:13px;line-height:1.45}.portal-card b{align-self:start;color:#42546b;font-size:12px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:26px}.page-heading h2{font-size:clamp(28px,4vw,48px)}.classroom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.classroom-card{padding:30px;border:1px solid rgba(255,255,255,.1);border-radius:24px;background:#111c31}.classroom-card h3{margin:16px 0 12px;font-size:28px;color:#fff}.classroom-card p{color:#b6c2d3;font-size:16px;line-height:1.8}.classroom-card a{display:inline-block;margin-top:24px;color:#7dd3fc;font-weight:800;text-decoration:none}.tool-label{padding:7px 10px;border-radius:999px;background:rgba(56,189,248,.12);color:#7dd3fc;font-size:13px;font-weight:800}.integration-note{display:flex;gap:18px;margin-top:20px;padding:18px 22px;border-radius:16px;background:rgba(255,255,255,.05);color:#cbd5e1}.resource-toolbar{display:flex;gap:12px;margin-bottom:20px}.content-feed{display:grid;gap:14px}.resource-item,.forum-post-item{padding:22px;border:1px solid rgba(255,255,255,.09);border-radius:18px;background:#111c31}.resource-item h3,.forum-post-item h3{color:#fff;font-size:20px}.forum-sections{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.forum-section-btn{padding:9px 14px;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:transparent;color:#cbd5e1;cursor:pointer}.forum-section-btn.active{background:#22d3ee;color:#062b36;border-color:#22d3ee}.modal-input,.modal-textarea{margin-bottom:14px}.main-tabs{overflow-x:auto;white-space:nowrap}@media(max-width:980px){.community-hero{grid-template-columns:1fr;padding:34px}.hero-side{grid-template-columns:1.4fr 1fr}.portal-grid{grid-template-columns:repeat(2,1fr)}.page-heading{align-items:flex-start;flex-direction:column}}@media(max-width:620px){.community-page{padding:20px 14px 54px}.community-hero{padding:26px 22px;gap:28px}.hero-side,.portal-grid,.classroom-grid{grid-template-columns:1fr}.community-hero h2{font-size:39px}.portal-card{min-height:104px}.integration-note{flex-direction:column}.resource-toolbar{flex-direction:column}}

.builder-studio{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:26px;margin-top:20px;padding:28px;border:1px solid rgba(251,191,36,.25);border-radius:24px;background:linear-gradient(120deg,rgba(251,191,36,.09),rgba(15,23,42,.65))}.builder-studio h3{font-size:26px;color:#fff}.builder-studio p{margin-top:8px;max-width:850px;color:#aebbcf;line-height:1.7}.builder-modal{max-width:620px}.builder-hint{margin-top:12px;color:#94a3b8;font-size:13px}.beta-studio .portal-action{min-width:128px}.beta-apply-modal .modal-label{display:block;margin:4px 0 8px;color:#cbd5e1;font-size:13px;font-weight:700}@media(max-width:760px){.builder-studio{grid-template-columns:1fr}.builder-studio .portal-action{width:100%}}

/* 教师资源与论坛：默认紧凑菜单，点开后显示详情。 */
.content-feed{gap:8px}.resource-menu-item,.forum-menu-item{padding:0!important;border-radius:12px!important;overflow:hidden}.resource-menu-details,.forum-menu-details{width:100%}.resource-menu-summary,.forum-menu-summary{display:grid;align-items:center;gap:12px;min-height:56px;padding:12px 16px;cursor:pointer;list-style:none}.resource-menu-summary{grid-template-columns:minmax(180px,1fr) auto 54px}.forum-menu-summary{grid-template-columns:auto minmax(180px,1fr) auto 54px}.resource-menu-summary::-webkit-details-marker,.forum-menu-summary::-webkit-details-marker{display:none}.resource-menu-summary:hover,.forum-menu-summary:hover{background:rgba(255,255,255,.035)}.resource-menu-title,.forum-menu-title{overflow:hidden;color:#f8fafc;font-size:15px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.resource-menu-meta,.forum-menu-meta{color:#8fa1b7;font-size:12px;white-space:nowrap}.resource-menu-action,.forum-menu-action{color:#67e8f9;font-size:12px;font-weight:800;text-align:right}.resource-menu-details[open] .resource-menu-action,.forum-menu-details[open] .forum-menu-action{font-size:0}.resource-menu-details[open] .resource-menu-action::after,.forum-menu-details[open] .forum-menu-action::after{content:'收起';font-size:12px}.resource-menu-body,.forum-menu-body{padding:4px 16px 16px;border-top:1px solid rgba(255,255,255,.06)}.resource-menu-body .resource-description,.forum-menu-body .post-content{margin:12px 0;color:#cbd5e1;font-size:14px;line-height:1.7}.resource-menu-body .resource-files{gap:8px}.resource-menu-body .resource-file-link{padding:9px 12px}.resource-menu-empty{padding:12px 0;color:#64748b;font-size:13px}.forum-menu-summary .section-badge{white-space:nowrap}.forum-menu-body .post-actions{margin-top:10px;padding-top:10px}.forum-menu-item h3,.resource-menu-item h3{margin:0}.forum-menu-item .post-content{margin-bottom:0}@media(max-width:720px){.resource-menu-summary{grid-template-columns:minmax(0,1fr) 48px}.forum-menu-summary{grid-template-columns:auto minmax(0,1fr) 48px}.resource-menu-meta,.forum-menu-meta{display:none}.resource-menu-title,.forum-menu-title{font-size:14px}}
.game-strip{display:flex;align-items:center;gap:16px;width:100%;margin-top:12px;padding:16px 20px;border:1px solid #294160;border-radius:17px;background:linear-gradient(90deg,#10233b,#0b1829);color:#fff;text-align:left;cursor:pointer}.game-mark{padding:9px 11px;border-radius:10px;background:#f5b942;color:#231803;font-size:12px;font-weight:900}.game-strip div{display:flex;flex:1;flex-direction:column;gap:4px}.game-strip strong{font-size:17px}.game-strip small{color:#8fa1b7}.game-strip b{color:#67e8f9}.games-hero{display:grid;grid-template-columns:minmax(0,1.35fr) 340px;gap:32px;align-items:center;padding:46px;border:1px solid #203149;border-radius:24px;background:#0b1829}.games-hero h2{font-size:clamp(38px,5vw,62px);line-height:1.08;color:#f8fafc;letter-spacing:-.045em}.games-hero p{max-width:700px;margin-top:18px;color:#a7b5c8;font-size:17px;line-height:1.75}.games-hero a{text-decoration:none}.game-pass{padding:28px;border-radius:22px;background:#f5b942;color:#231803}.game-pass>span{font-weight:800}.game-pass div{margin:16px 0}.game-pass strong{font-size:52px}.game-pass small{font-weight:800}.game-pass ul{display:grid;gap:9px;margin:0 0 22px 18px;line-height:1.5}.game-pass button{width:100%;padding:13px;border:0;border-radius:11px;background:#07111f;color:#fff;font-weight:800;cursor:pointer}.security-panel{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}.security-panel div{display:flex;flex-direction:column;gap:8px;padding:20px;border:1px solid #1e3048;border-radius:16px;background:#0c192a}.security-panel strong{color:#eaf2ff}.security-panel span{color:#8495aa;font-size:14px;line-height:1.6}.subscription-summary{display:flex;flex-direction:column;gap:6px;margin-bottom:18px;padding:22px;border-radius:16px;background:#0c192a;color:#fff}.subscription-summary strong{font-size:38px;color:#f5b942}@media(max-width:800px){.games-hero,.security-panel{grid-template-columns:1fr}.game-strip{align-items:flex-start;flex-wrap:wrap}.game-strip b{width:100%}}
.tool-topline,.classroom-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.free-trial-badge{padding:7px 10px;border:1px solid rgba(52,211,153,.28);border-radius:999px;background:rgba(52,211,153,.1);color:#6ee7b7;font-size:12px;font-weight:800}.classroom-actions{justify-content:flex-start;margin-top:24px}.trial-btn,.text-action{padding:11px 15px;border-radius:10px;font-size:14px;font-weight:800;cursor:pointer}.trial-btn{border:1px solid #22d3ee;background:#22d3ee;color:#062b36}.text-action{border:1px solid #2b3d56;background:transparent;color:#cbd5e1}
.classroom-tool-link{text-decoration:none;display:inline-flex;align-items:center;gap:9px}.classroom-card.word-video{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:36px;min-height:260px;padding:38px 44px;background:radial-gradient(circle at 85% 18%,rgba(34,211,238,.14),transparent 34%),linear-gradient(145deg,#102137,#111c31 62%);border-color:rgba(34,211,238,.24)}.classroom-card.word-video .word-video-copy{max-width:780px}.classroom-card.word-video h3{font-size:34px}.classroom-card.word-video .classroom-actions{margin:0}.classroom-card a.trial-btn{margin:0;padding:15px 22px;border:1px solid #67e8f9;background:linear-gradient(135deg,#22d3ee,#67e8f9);color:#062b36;box-shadow:0 12px 30px rgba(34,211,238,.18);transition:transform .2s,box-shadow .2s}.classroom-card a.trial-btn:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(34,211,238,.28);color:#062b36}@media(max-width:620px){.classroom-card.word-video{grid-template-columns:1fr;gap:22px;padding:28px 24px}.classroom-card.word-video .classroom-actions{justify-content:stretch}.classroom-card.word-video .trial-btn{width:100%;justify-content:center}}
.game-payment-qr{margin:16px 0;padding:16px;border-radius:14px;background:#fff;color:#0f172a;text-align:center}.game-payment-qr img{display:block;width:220px;max-width:100%;margin:12px auto}.game-payment-qr small{color:#64748b}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .navbar {
        padding: 0 32px;
    }
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    font-size: 20px;
}

.navbar-title {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, var(--slate-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: none;
}

@media (min-width: 640px) {
    .navbar-title {
        display: block;
    }
}

.navbar-title-light {
    font-weight: 300;
    color: var(--brand-primary);
    -webkit-text-fill-color: var(--brand-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    padding: 4px 4px 4px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 8px;
}

.user-name {
    font-size: 12px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.user-stats {
    font-size: 10px;
    color: var(--slate-400);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.user-stat {
    font-size: 10px;
}

.free-stat {
    color: #4ade80;
}

.credits-stat {
    color: var(--brand-secondary);
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: currentColor;
}

.recharge-btn-nav {
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
}

.recharge-btn-nav:hover {
    background: rgba(99, 102, 241, 0.4);
}

.recharge-btn-nav-text {
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.recharge-btn-nav-text:hover {
    background: rgba(99, 102, 241, 0.4);
}

.messages-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    background: var(--slate-800);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--slate-700);
    transition: all 0.3s;
}

.message-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: var(--slate-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mark-read-btn {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-read-btn:hover {
    background: var(--brand-secondary);
    transform: scale(1.05);
}

.logout-btn-nav {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-btn-nav:hover {
    background: rgba(239, 68, 68, 0.3);
}

.guest-info-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guest-text {
    font-size: 12px;
    color: var(--slate-500);
    margin-right: 8px;
    display: none;
}

@media (min-width: 640px) {
    .guest-text {
        display: inline;
    }
}

.auth-btn-nav {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--slate-200);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.free-songs-badge {
    background-color: #0066ff;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.credits-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.auth-button {
    padding: 8px 20px;
    background-color: #0066ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.auth-button:hover {
    background-color: #0052cc;
}

/* ============================================
   Modal 模态框
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 448px;
    background: #1a1a2e;
    border: 1px solid var(--glass-200);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideIn 0.2s;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* 歌词生成模态框特殊处理 */
.lyrics-generator-modal-container {
    max-width: 500px;
}

.lyrics-generator-modal-container .recharge-modal-header {
    flex-shrink: 0; /* header不缩小 */
    padding: 24px 24px 16px 24px;
}

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

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--slate-500);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: white;
}

.modal-header {
    padding: 32px 32px 16px;
    text-align: center;
    border-bottom: 1px solid var(--glass-100);
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--slate-400);
    font-size: 14px;
}

.modal-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
}

.modal-tab-btn {
    flex: 1;
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: transparent;
    color: var(--slate-400);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.modal-tab-btn:hover {
    color: var(--slate-200);
}

.modal-tab-btn.active {
    color: var(--brand-primary);
    background: rgba(99, 102, 241, 0.1);
    border-bottom-color: var(--brand-primary);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.modal-label {
    font-size: 12px;
    color: var(--slate-400);
}

.modal-input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-500);
    pointer-events: none;
}

.modal-input {
    width: 100%;
    padding: 10px 16px;
    padding-left: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-200);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
}

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

.modal-input::placeholder {
    color: var(--slate-500);
}

.modal-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--brand-primary);
    color: white;
    font-weight: bold;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    margin-top: 8px;
}

.modal-submit-btn:hover:not(:disabled) {
    background: var(--brand-secondary);
    transform: translateY(-2px);
}

.modal-submit-btn.register-btn {
    background: var(--brand-secondary);
}

.modal-submit-btn.register-btn:hover:not(:disabled) {
    background: var(--brand-accent);
}

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

.recharge-modal-container {
    max-width: 384px;
    padding: 24px;
}

.recharge-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.recharge-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.recharge-icon {
    color: #4ade80;
}

.recharge-title {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.recharge-subtitle {
    font-size: 12px;
    color: var(--slate-400);
    margin-top: 4px;
}

.recharge-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recharge-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-200);
    border-radius: 12px;
    color: white;
    text-align: center;
    letter-spacing: 0.1em;
    font-size: 14px;
    transition: all 0.2s;
}

.recharge-input:focus {
    outline: none;
    border-color: #22c55e;
}

/* 支付方式选择 */
.recharge-payment-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.recharge-payment-method {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-200);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.recharge-payment-method input[type="radio"] {
    display: none;
}

.recharge-payment-method span {
    color: var(--slate-300);
    font-size: 14px;
    font-weight: 500;
}

.recharge-payment-method.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.recharge-payment-method.active span {
    color: #4ade80;
}

.recharge-payment-method:hover:not(.active) {
    border-color: var(--glass-300);
    background: rgba(255, 255, 255, 0.05);
}

/* 充值方式切换 */
.recharge-section {
    display: none;
}

.recharge-section.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 金额选择网格 */
.recharge-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.recharge-amount-option {
    position: relative;
    cursor: pointer;
}

.recharge-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amount-option-content {
    padding: 16px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-200);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.recharge-amount-option:hover .amount-option-content {
    border-color: var(--glass-300);
    background: rgba(255, 255, 255, 0.05);
}

.recharge-amount-option input[type="radio"]:checked + .amount-option-content {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.amount-option-price {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.amount-option-credits {
    font-size: 12px;
    color: var(--slate-400);
}

/* 二维码容器 */
.recharge-qrcode-container {
    text-align: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
}

.qrcode-title {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin-bottom: 16px;
}

.recharge-qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.recharge-qrcode img {
    max-width: 100%;
    max-height: 100%;
}

.qrcode-hint {
    font-size: 12px;
    color: var(--slate-400);
    margin-bottom: 16px;
}

.recharge-check-status-btn {
    padding: 10px 24px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--brand-primary);
    border-radius: 8px;
    color: var(--brand-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.recharge-check-status-btn:hover {
    background: rgba(99, 102, 241, 0.3);
}

.recharge-submit-btn {
    width: 100%;
    padding: 12px;
    background: #22c55e;
    color: white;
    font-weight: bold;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.recharge-submit-btn:hover:not(:disabled) {
    background: #16a34a;
}

.auth-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 26, 0.5);
}

.auth-tab-btn {
    flex: 1;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    position: relative;
}

.auth-tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.auth-tab-btn.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tab-icon {
    font-size: 18px;
}

.auth-form {
    display: none;
    padding: 30px;
}

.auth-form.active {
    display: block;
    animation: fadeInForm 0.3s;
}

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

.form-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    text-align: center;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: block;
}

.form-message.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    display: block;
}

.input-wrapper {
    margin-bottom: 20px;
}

.input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    padding-left: 5px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background-color: rgba(26, 26, 26, 0.8);
    border: 2px solid #3a3a3a;
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: rgba(26, 26, 26, 1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.auth-input::placeholder {
    color: #666;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-loading {
    display: inline-block;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 14px;
}

.switch-tab-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.3s;
}

.switch-tab-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Custom Mode优化 */
.mode-hint {
    font-size: 12px;
    color: #4a9eff;
    margin-left: 10px;
    font-weight: normal;
    display: block;
    margin-top: 5px;
    padding: 5px 10px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 5px;
    border-left: 3px solid #4a9eff;
}

.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 8px;
    margin-bottom: 15px;
}

.toggle-group label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 200px;
}

.toggle-group label span:first-child {
    font-weight: 600;
    margin-bottom: 8px;
    color: #e0e0e0;
}

/* 生成按钮优化 */
.generate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.credits-info {
    font-size: 12px;
    opacity: 0.8;
}

.free-notice {
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(56, 142, 60, 0.2) 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.credits-notice {
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 111, 0.2) 100%);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

/* ============================================
   Main Content 主内容区域
   ============================================ */
.main-content {
    padding-top: 0;
    padding-bottom: 32px;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 1600px;
    margin: 0 auto;
    margin-top: 85px; /* 为sticky标签栏留出空间 (20px padding + 48px button + 12px padding + 5px buffer) */
    height: calc(100vh - 285px); /* 80px navbar + 85px tabs margin + 120px padding */
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 1024px) {
    .main-content {
        margin-top: 85px;
        height: calc(100vh - 285px); /* 统一高度计算 */
    }
}

.input-section-wrapper {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 285px); /* 80px navbar + 85px tabs margin + 120px padding */
}

@media (min-width: 1024px) {
    .input-section-wrapper {
        width: 450px;
        flex-shrink: 0;
    }
}

.input-section-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-100);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-200);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.output-section-wrapper {
    flex: 1;
    height: 100%;
    max-height: calc(100vh - 285px); /* 80px navbar + 85px tabs margin + 120px padding */
    min-width: 0;
}

.output-section-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-100);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-200);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   Section Header 区域标题
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--glass-200);
    background: var(--glass-100);
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    flex-shrink: 0;
}

.tab-switcher {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.output-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.my-music-search-wrap {
    width: min(320px, 34vw);
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 11px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 9px;
    background: rgba(2, 6, 23, .42);
    color: var(--slate-400);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.my-music-search-wrap:focus-within {
    border-color: rgba(99, 102, 241, .78);
    background: rgba(2, 6, 23, .62);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.my-music-search-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
}

.my-music-search-wrap input::placeholder { color: var(--slate-500); }
.my-music-search-wrap input::-webkit-search-cancel-button { display: none; }

.my-music-search-count {
    flex: 0 0 auto;
    color: #a5b4fc;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.my-music-search-clear {
    display: none;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(148, 163, 184, .12);
    color: var(--slate-300);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.my-music-search-wrap.has-query .my-music-search-clear {
    display: inline-grid;
    place-items: center;
}

.my-music-search-clear:hover {
    background: rgba(148, 163, 184, .22);
    color: #fff;
}

@media (max-width: 900px) {
    .section-header { align-items: flex-start; gap: 12px; }
    .output-header-actions { flex-wrap: wrap; }
    .my-music-search-wrap { width: min(290px, 58vw); }
}

.tab-switch-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: transparent;
    color: var(--slate-400);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.tab-switch-btn:hover {
    color: white;
}

.tab-switch-btn.active {
    background: var(--glass-300);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-content-area {
    position: relative;
    background: rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    padding: 8px 20px;
    background-color: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background-color: #3a3a3a;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.json-textarea {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-200);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--brand-secondary);
    resize: none;
    outline: none;
}

/* ============================================
   Form Fields 表单字段
   ============================================ */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-300);
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    flex-shrink: 0;
}

.required {
    color: #f87171;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-200);
    border-radius: 12px;
    color: var(--slate-200);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--slate-500);
}

.form-textarea {
    min-height: 96px;
    max-height: 400px;
    resize: none;
    overflow-y: auto;
}

.lyrics-textarea {
    min-height: 160px;
    max-height: 400px;
    font-family: 'Courier New', monospace;
    resize: none;
    overflow-y: auto;
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--slate-400);
    font-size: 12px;
}

.form-select {
    appearance: none;
    padding-right: 40px;
    background: rgba(15, 23, 42, 0.9) !important;
}

.form-select option {
    background: #ef4444;
    background-image: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: white;
    padding: 10px;
    white-space: normal;
    word-wrap: break-word;
    font-weight: 500;
}

/* 为不同浏览器提供兼容性 */
.form-select option:nth-child(1) {
    background: #ef4444;
}

.form-select option:nth-child(2) {
    background: #f97316;
}

.form-select option:nth-child(3) {
    background: #f59e0b;
}

.form-select option:nth-child(4) {
    background: #eab308;
}

.form-select option:nth-child(5) {
    background: #f59e0b;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--slate-500);
}

.hint-text {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 4px;
}

select.form-control {
    height: 45px;
    font-size: 14px;
    padding: 10px 15px;
}

/* 模型选择框优化 */
.model-select {
    font-size: 14px;
    padding: 10px 15px;
    height: 45px;
}

.model-select option {
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: white;
    padding: 10px;
    white-space: normal;
    word-wrap: break-word;
    min-height: 40px;
    font-weight: 500;
}

.textarea-small {
    height: 100px;
    resize: vertical;
}

.textarea-large {
    height: 200px;
    resize: vertical;
}

.json-textarea {
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* ============================================
   Toggle Switches 切换开关
   ============================================ */
.toggle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .toggle-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.toggle-card {
    background: var(--glass-100);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.toggle-card:hover {
    border-color: var(--brand-primary);
}

.toggle-info {
    flex: 1;
}

.toggle-title {
    font-weight: 500;
    color: var(--slate-200);
    margin-bottom: 4px;
}

.toggle-desc {
    font-size: 12px;
    color: var(--slate-400);
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--slate-700);
    border-radius: 9999px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--brand-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* 小尺寸开关（用于Custom Mode和Instrumental） */
.switch-small {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin-top: 0;
    flex-shrink: 0;
}

.switch-small .slider {
    height: 20px;
    border-radius: 20px;
}

.switch-small .slider:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

.switch-small input:checked + .slider:before {
    transform: translateX(16px);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-top: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    transition: 0.3s;
    border-radius: 26px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

input:checked + .slider:before {
    transform: translateX(24px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input:hover + .slider {
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.char-counter {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.hint-text {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

/* 生成按钮组 */
.generate-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

/* ============================================
   Section Footer & Generate Button
   ============================================ */
.section-footer {
    padding: 24px;
    border-top: 1px solid var(--glass-200);
    background: var(--glass-100);
}

.cost-notice {
    margin-bottom: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid;
}

.cost-notice.free {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.cost-notice.credits {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--brand-primary);
}

.cost-notice.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.generate-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 0.025em;
    color: white;
}

.generate-btn:not(:disabled) {
    background: linear-gradient(to right, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
}

.generate-btn:not(:disabled):hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    transform: scale(1.02);
}

.generate-btn:disabled {
    background: var(--slate-700);
    cursor: not-allowed;
    opacity: 0.8;
}

.generate-icon {
    flex-shrink: 0;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.generate-btn:hover:not(:disabled)::before {
    transform: translateY(0);
}

/* ============================================
   Output Content 输出内容
   ============================================ */
.output-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    opacity: 0.6;
}

.empty-icon {
    margin-bottom: 16px;
    color: var(--slate-700);
}

.empty-state p {
    font-size: 14px;
}

/* ============================================
   Music Player Card 音乐播放器卡片
   ============================================ */
.music-item {
    background: var(--glass-200);
    border: 1px solid var(--glass-200);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.2s;
}

.music-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.thumbnail {
    width: 96px;
    height: 96px;
    background: linear-gradient(to bottom right, var(--slate-700), var(--slate-900));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-200);
}

.music-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.music-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.music-title {
    font-weight: bold;
    color: var(--slate-100);
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    flex: 1;
}

.music-tags {
    font-size: 10px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.play-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: none;
    background: var(--brand-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.play-btn:hover {
    background: var(--brand-secondary);
}

.progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-slider {
    width: 100%;
    height: 4px;
    background: var(--slate-700);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.progress-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--slate-400);
}

.download-btn,
.view-lyrics-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--glass-300);
    color: var(--slate-300);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.download-btn:hover:not(:disabled),
.view-lyrics-btn:hover:not(:disabled) {
    background: var(--glass-200);
}

.download-btn:disabled,
.view-lyrics-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 歌词预览模态框样式 */
.lyrics-preview-modal-container {
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lyrics-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px 16px 0 0;
}

.lyrics-preview-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--slate-100);
    margin: 0;
    flex: 1;
}

.lyrics-preview-download-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.3));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 8px;
    color: #a5b4fc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lyrics-preview-download-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.4));
    border-color: var(--brand-primary);
    color: #c7d2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.lyrics-preview-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* 歌词预览内容滚动条样式 */
.lyrics-preview-content::-webkit-scrollbar {
    width: 8px;
}

.lyrics-preview-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.lyrics-preview-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.lyrics-preview-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.lyrics-text-content {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Courier New', monospace;
    font-size: 15px;
    line-height: 2;
    color: var(--slate-200);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    padding: 0;
    letter-spacing: 0.3px;
}

.lyrics-display {
    margin-top: 15px;
    padding: 15px;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lyrics-display .lyrics-content {
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-top: 8px;
}

/* 歌词预览（播放器下方） */
.lyrics-preview {
    margin-top: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.lyrics-preview-content {
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--slate-300);
    font-family: 'Courier New', monospace;
}

/* 歌词预览滚动条样式 */
.lyrics-preview::-webkit-scrollbar {
    width: 6px;
}

.lyrics-preview::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.lyrics-preview::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 3px;
}

.lyrics-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* 统一歌词预览容器 */
.lyrics-preview-container {
    margin-top: 20px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.lyrics-preview-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--slate-200);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lyrics-song-section {
    margin-bottom: 20px;
}

.lyrics-song-section:last-child {
    margin-bottom: 0;
}

.lyrics-song-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

.lyrics-section {
    margin-top: 15px;
    padding: 15px;
    background-color: #1a1a1a;
    border-radius: 5px;
}

.lyrics-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.lyrics-text {
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #ccc;
    max-height: 200px;
    overflow-y: auto;
}

.log-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.log-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.clear-log-btn {
    font-size: 12px;
    color: var(--slate-400);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.clear-log-btn:hover {
    color: white;
}

.log-content {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-entry {
    color: var(--slate-300);
}

.log-entry.success {
    color: #4ade80;
}

.log-entry.error {
    color: #f87171;
}

.log-entry.warning {
    color: #fbbf24;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

/* ============================================
   歌词生成功能样式
   ============================================ */
.generate-lyrics-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.generate-lyrics-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: var(--brand-primary);
}

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

.lyrics-generator-modal-container {
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 防止整体滚动 */
}

/* 歌词生成模态框的body区域 - 可滚动 */
.lyrics-generator-modal-container .recharge-modal-body,
#lyrics-generator-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* 重要：允许flex子元素缩小 */
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    padding: 24px;
    padding-bottom: 12px; /* 底部留点空间 */
}

/* 歌词生成模态框的footer - 固定在底部 */
.lyrics-generator-footer {
    flex-shrink: 0; /* 不缩小 */
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a2e; /* 与模态框背景色一致 */
    position: relative;
    z-index: 10;
    margin-top: auto; /* 推到容器底部 */
}

.lyrics-generator-footer .recharge-submit-btn {
    width: 100%;
    margin: 0;
}

.lyrics-generator-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.lyrics-generator-field .modal-input {
    padding-left: 16px;
}

.lyrics-units-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--glass-200);
}

.lyrics-unit-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lyrics-unit-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lyrics-unit-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.lyrics-unit-checkbox label {
    font-size: 13px;
    color: var(--slate-300);
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.lyrics-language-mode {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--glass-200);
}

/* 音乐风格预设选择样式 */
.style-preset-modal-container {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.style-preset-body {
    padding: 20px;
}

.style-preset-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.style-preset-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.style-preset-category-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-200);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-200);
}

.style-preset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-preset-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-200);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--slate-300);
    user-select: none;
}

.style-preset-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-primary);
}

.style-preset-tag input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--brand-primary);
    margin: 0;
}

.style-preset-tag.checked {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.style-preset-selected {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--glass-200);
}

.style-preset-selected-label {
    font-size: 13px;
    color: var(--slate-400);
    margin-bottom: 10px;
}

.style-preset-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 30px;
}

.style-preset-selected-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--brand-primary);
    border-radius: 16px;
    font-size: 12px;
    color: var(--brand-primary);
}

.style-preset-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.style-preset-clear-btn {
    padding: 12px 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.style-preset-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--slate-300);
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.radio-label span {
    flex: 1;
}

/* ============================================
   移动端响应式样式 (Mobile Responsive Styles)
   ============================================ */

/* 针对手机屏幕的媒体查询 (最大宽度768px) */
@media (max-width: 768px) {
    /* Navbar 导航栏适配 */
    .navbar {
        height: 60px;
        padding: 0 12px;
    }
    
    .navbar-title {
        font-size: 14px;
    }
    
    .navbar-title-light {
        display: none; /* 手机端隐藏副标题 */
    }
    
    /* 用户信息显示区域优化 */
    .user-info-display {
        gap: 6px;
        padding: 4px 4px 4px 10px;
    }
    
    /* 主标签页容器优化 */
    .main-tabs-container {
        padding: 12px 16px 8px 16px;
        top: 60px; /* 适配较小的navbar高度 */
    }
    
    /* 主内容区域优化 - 垂直布局，增加间距 */
    .main-content {
        margin-top: 60px; /* 减小margin-top，适配较小的标签栏 */
        padding-top: 0;
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 20px;
        height: auto;
        min-height: calc(100vh - 140px);
        gap: 16px;
    }
    
    /* 确保主标签内容在移动端是垂直布局 */
    .main-tab-content.active {
        flex-direction: column;
        gap: 16px;
        height: auto;
    }
    
    /* Input和Output区域在移动端占满宽度 */
    .input-section-wrapper {
        width: 100%;
        height: auto;
        max-height: none;
    }
    
    .output-section-wrapper {
        width: 100%;
        height: auto;
        max-height: none;
        flex: none;
    }
    
    /* Section卡片在移动端调整高度 */
    .input-section-card,
    .output-section-card {
        height: auto;
        min-height: 400px;
        max-height: none;
    }
    
    /* Section Header 优化 */
    .section-header {
        padding: 12px 16px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    /* Section Content 优化 - 增加padding */
    .section-content {
        padding: 16px;
        overflow-y: auto;
    }
    
    /* Form Content 优化 - 增加间距 */
    .form-content {
        gap: 16px;
    }
    
    /* Form Field 优化 - 增加间距 */
    .form-field {
        margin-bottom: 16px;
        gap: 8px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* 输入框和选择框优化 - 增大点击区域 */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px 14px;
        font-size: 16px; /* iOS Safari需要至少16px避免自动缩放 */
        min-height: 44px; /* 增大触摸目标 */
    }
    
    .form-textarea {
        min-height: 120px;
    }
    
    /* Toggle Grid 优化 */
    .toggle-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .toggle-card {
        padding: 14px;
    }
    
    /* 生成按钮优化 */
    .generate-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px; /* 增大触摸目标 */
    }
    
    /* Tab Switcher 优化 */
    .tab-switcher {
        gap: 4px;
    }
    
    .tab-switch-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .user-info-content {
        margin-right: 4px;
    }
    
    .user-name {
        font-size: 11px;
    }
    
    .user-stats {
        font-size: 9px;
        gap: 6px;
    }
    
    .recharge-btn-nav-text {
        padding: 5px 10px;
        font-size: 11px;
        gap: 4px;
    }
    
    .recharge-btn-nav-text svg {
        width: 12px;
        height: 12px;
    }
    
    .icon-btn {
        width: 28px;
        height: 28px;
    }
    
    .icon-btn svg {
        width: 12px;
        height: 12px;
    }
    
    /* 主内容区域适配已在上面定义，这里不重复定义 */
    
    /* Credits Info 优化 */
    .credits-info {
        font-size: 11px;
        margin-top: 8px;
        text-align: center;
    }
    
    /* 输出内容区域适配 */
    .output-content {
        padding: 12px;
        gap: 12px;
    }
    
    /* 音乐项适配 - 解决"我的生成"显示混乱问题 */
    .music-item {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }
    
    .thumbnail {
        width: 80px;
        height: 80px;
        font-size: 32px;
        align-self: flex-start;
    }
    
    .music-info {
        width: 100%;
    }
    
    .music-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .music-title {
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
    }
    
    .music-tags {
        max-width: 100%;
        font-size: 11px;
    }
    
    /* 音频播放器适配 */
    .audio-player {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
    }
    
    .progress-wrapper {
        width: 100%;
        order: 2;
    }
    
    .play-btn {
        order: 0;
        width: 36px;
        height: 36px;
    }
    
    .download-btn,
    .view-lyrics-btn {
        order: 1;
        width: 36px;
        height: 36px;
    }
    
    /* 视频操作容器适配 */
    .video-action-container {
        margin-top: 12px !important;
        padding-top: 12px !important;
    }
    
    .video-preview-container video {
        max-width: 100% !important;
    }
    
    /* 模态框适配 */
    .modal {
        padding: 8px;
    }
    
    .modal-container {
        max-width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        display: flex;
        flex-direction: column;
    }
    
    /* 关闭按钮适配 - 确保可以点击 */
    .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        z-index: 100;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 8px;
        padding: 8px;
    }
    
    .modal-close svg {
        width: 24px;
        height: 24px;
    }
    
    /* 歌词生成模态框适配 */
    .lyrics-generator-modal-container {
        max-width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        display: flex;
        flex-direction: column;
        overflow: hidden; /* 防止整体滚动 */
    }
    
    .recharge-modal-header {
        flex-shrink: 0;
        padding: 16px;
    }
    
    .recharge-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
        min-height: 0; /* 允许flex子元素缩小 */
    }
    
    /* 歌词生成模态框body在移动端的优化 */
    .lyrics-generator-modal-container .recharge-modal-body,
    #lyrics-generator-modal-body {
        padding: 16px;
        max-height: none; /* 移除最大高度限制，使用flex自动计算 */
    }
    
    /* 歌词生成模态框header在移动端 */
    .lyrics-generator-modal-container .recharge-modal-header {
        padding: 16px;
        flex-shrink: 0;
    }
    
    /* 歌词生成模态框footer在移动端 */
    .lyrics-generator-footer {
        flex-shrink: 0;
        padding: 12px 16px 16px 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: #1a1a2e;
        position: relative;
        z-index: 10;
        margin-top: auto;
    }
    
    /* 单元选择容器适配 */
    .lyrics-units-container {
        grid-template-columns: 1fr; /* 手机端单列显示 */
        max-height: 250px; /* 增加最大高度 */
        gap: 6px;
        padding: 12px;
    }
    
    /* 充值模态框适配 */
    .recharge-modal-container {
        max-width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
        display: flex;
        flex-direction: column;
    }
    
    /* 金额选择网格适配 */
    .recharge-amount-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* 支付方式选择适配 */
    .recharge-payment-methods {
        flex-direction: column;
        gap: 8px;
    }
    
    /* 表单输入适配 */
    .form-input,
    .form-textarea,
    .modal-input {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    /* 按钮适配 */
    .recharge-submit-btn {
        padding: 14px;
        font-size: 16px;
    }
    
    /* 音乐风格选择器适配 */
    #music-type-select {
        font-size: 14px;
    }
    
    /* 标签切换器适配 */
    .tab-switcher {
        gap: 4px;
    }
    
    .tab-switch-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 针对小屏幕手机 (最大宽度480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }
    
    .navbar-title {
        font-size: 13px;
    }
    
    /* 主标签页容器进一步优化 */
    .main-tabs-container {
        padding: 10px 12px 6px 12px;
    }
    
    .main-tab-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* 主内容区域 - 保持合理的padding，不要太小 */
    .main-content {
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 16px;
        margin-top: 55px;
        gap: 12px;
    }
    
    /* 用户信息显示区域进一步优化 */
    .user-info-display {
        gap: 4px;
        padding: 3px 3px 3px 8px;
    }
    
    .recharge-btn-nav-text {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .recharge-btn-nav-text span {
        display: none; /* 小屏幕隐藏文字，只显示图标 */
    }
    
    .icon-btn {
        width: 26px;
        height: 26px;
    }
    
    /* Section Header 进一步优化 */
    .section-header {
        padding: 10px 12px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    /* Section Content 进一步优化 */
    .section-content {
        padding: 12px;
    }
    
    /* Form Content 进一步优化 */
    .form-content {
        gap: 14px;
    }
    
    /* Form Field 进一步优化 */
    .form-field {
        gap: 8px;
        margin-bottom: 14px;
    }
    
    /* 输入框在小屏幕上保持足够大小 */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px;
        font-size: 16px; /* 保持16px避免iOS缩放 */
        min-height: 44px;
    }
    
    /* Section卡片在小屏幕上调整最小高度 */
    .input-section-card,
    .output-section-card {
        min-height: 350px;
    }
    
    /* 生成按钮在小屏幕上 */
    .generate-btn {
        padding: 12px 18px;
        font-size: 15px;
        min-height: 46px;
    }
    
    /* 标签页进一步优化 */
    .main-tabs-container {
        padding: 10px 12px 0 12px;
    }
    
    .main-tab-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .music-item {
        padding: 10px;
    }
    
    .thumbnail {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
    
    .music-title {
        font-size: 13px;
    }
    
    .audio-player {
        gap: 6px;
    }
    
    .play-btn,
    .download-btn,
    .view-lyrics-btn {
        width: 32px;
        height: 32px;
    }
    
    .recharge-amount-grid {
        grid-template-columns: 1fr;
    }
    
    .lyrics-units-container {
        max-height: 200px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }
    
    .recharge-modal-header {
        padding: 12px;
    }
    
    .recharge-title {
        font-size: 18px;
    }
    
    .recharge-subtitle {
        font-size: 11px;
    }
}

/* ============================================
   意见反馈相关样式
   ============================================ */
.feedback-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 30;
    padding: 12px 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.modal-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--slate-100);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-textarea::placeholder {
    color: var(--slate-400);
}

@media (max-width: 640px) {
    .feedback-btn {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   主标签页切换样式
   ============================================ */
.main-tabs-container {
    padding: 20px 20px 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
    position: sticky;
    top: 80px;
    z-index: 10;
    margin-bottom: 0;
}

.main-tabs {
    display: flex;
    gap: 8px;
}

.main-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--slate-400);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.main-tab-btn:hover {
    color: var(--slate-200);
}

.main-tab-btn.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.main-tab-content {
    display: none;
    width: 100%;
    height: 100%;
}

.main-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .main-tab-content.active {
        flex-direction: row;
    }
}

/* ============================================
   对口型功能样式
   ============================================ */


.lipsync-upload-area {
    position: relative;
    border: 2px dashed var(--glass-200);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.2);
}

.lipsync-upload-area:hover {
    border-color: var(--brand-primary);
    background: rgba(99, 102, 241, 0.1);
}

.lipsync-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--slate-400);
}

.lipsync-upload-content svg {
    color: var(--slate-500);
}

.lipsync-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.lipsync-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.lipsync-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
}

.lipsync-audio-preview {
    margin-top: 12px;
}

.lipsync-audio-duration {
    margin-top: 8px;
    font-size: 12px;
    color: var(--slate-400);
    text-align: center;
}


.lipsync-output-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--slate-400);
}

.lipsync-tag {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.lipsync-video-container {
    margin-bottom: 16px;
}

.lipsync-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--slate-500);
}

.lipsync-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.lipsync-download-btn {
    padding: 10px 16px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

.lipsync-download-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.lipsync-download-btn svg {
    flex-shrink: 0;
}

.lipsync-download-btn span {
    display: inline-block;
    line-height: 1;
}

/* 对口型视频下载按钮（在"我的生成"中使用） */
.lipsync-video-download-btn {
    padding: 8px 16px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

.lipsync-video-download-btn:hover:not(:disabled) {
    background: #4f46e5;
    transform: translateY(-1px);
}

.lipsync-video-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lipsync-video-download-btn svg {
    flex-shrink: 0;
}

.lipsync-video-download-btn span {
    display: inline-block;
    line-height: 1;
}

.lipsync-history-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--slate-300);
    border: 1px solid var(--glass-200);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}


/* ============================================
   フォーラム投稿スタイル
   ============================================ */
.forum-section-btn {
    padding: 10px 20px;
    background: var(--slate-700);
    color: var(--slate-300);
    border: 1px solid var(--slate-600);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.forum-section-btn:hover {
    background: var(--slate-600);
    border-color: var(--brand-primary);
    color: var(--slate-100);
}

.forum-section-btn.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-color: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.forum-post-item {
    background: var(--glass-200);
    border: 1px solid var(--glass-200);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.forum-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.forum-post-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: var(--glass-300);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.forum-post-item:hover::before {
    opacity: 1;
}

.forum-post-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--slate-100);
    line-height: 1.4;
}

.forum-post-item .post-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--slate-400);
}

.forum-post-item .post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.forum-post-item .post-meta .section-badge {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--brand-primary);
    font-weight: 500;
    font-size: 12px;
}

.forum-post-item .post-content {
    font-size: 15px;
    color: var(--slate-300);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 16px;
}

.forum-post-item .post-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-200);
}

.forum-edit-btn,
.forum-delete-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forum-edit-btn {
    background: rgba(99, 102, 241, 0.2);
    color: var(--brand-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.forum-edit-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.forum-delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.forum-delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

/* リソース共有スタイル */
.resource-item {
    background: var(--glass-200);
    border: 1px solid var(--glass-200);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.resource-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: var(--glass-300);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.resource-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--slate-100);
}

.resource-item .resource-description {
    font-size: 14px;
    color: var(--slate-400);
    margin-bottom: 16px;
    line-height: 1.6;
}

.resource-item .resource-files {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-item .resource-file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--slate-700);
    border-radius: 8px;
    text-decoration: none;
    color: var(--brand-primary);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.resource-item .resource-file-link:hover {
    background: var(--slate-600);
    border-color: var(--brand-primary);
    transform: translateX(4px);
}

.resource-item .resource-file-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.resource-item .resource-meta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-200);
    font-size: 12px;
    color: var(--slate-500);
}

/* 标签页移动端适配已在上面768px和480px媒体查询中定义 */

/* 社区首页使用独立文档流，覆盖旧生成器的桌面双栏规则。 */
.main-tab-content.community-page.active {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
}
.community-page .community-hero,
.community-page .portal-grid,
.community-page .game-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.community-page .portal-card,
.community-page .portal-card > * {
    min-width: 0;
    writing-mode: horizontal-tb !important;
    word-break: normal;
}
.community-page .portal-card h3,
.community-page .portal-card p {
    white-space: normal;
}
/* 旧生成器的空状态使用全屏绝对定位；社区列表必须回到自身文档流，
   否则透明空状态层会覆盖标题、发帖和筛选按钮。 */
.community-page .content-feed > .empty-state {
    position: static;
    inset: auto;
    width: 100%;
    min-height: 260px;
    pointer-events: none;
}
@media (min-width: 1024px) {
    .main-tab-content.community-page.active {
        flex-direction: initial !important;
    }
}

/* ============================================
   高级版 MV
   ============================================ */
.advanced-mv-modal-container {
    width: min(1180px, calc(100vw - 96px));
    max-width: 1180px;
    max-height: calc(100vh - 72px);
    overflow: auto;
}
.advanced-mv-header {
    padding: 28px 40px 14px;
    margin-bottom: 10px;
}
.advanced-mv-body {
    padding: 8px 40px 40px;
}
.advanced-mv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    gap: 32px;
    align-items: start;
}
.advanced-mv-settings,
.advanced-mv-preview-panel {
    min-width: 0;
}
.advanced-mv-lyrics {
    min-height: 190px;
}
.advanced-mv-option-row {
    margin: 8px 0 18px;
}
.advanced-mv-progress {
    margin-top: 14px;
    padding: 14px 15px 13px;
    border: 1px solid rgba(99, 102, 241, .32);
    border-radius: 12px;
    background: rgba(15, 23, 42, .58);
}
.advanced-mv-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
    color: var(--slate-200);
    font-size: 13px;
    font-weight: 700;
}
.advanced-mv-progress-head strong {
    flex: 0 0 auto;
    color: #a5b4fc;
    font-variant-numeric: tabular-nums;
}
.advanced-mv-progress-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.advanced-mv-progress-bar {
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1, #8b5cf6 55%, #22c55e);
    box-shadow: 0 0 14px rgba(99, 102, 241, .42);
    transition: width .45s ease;
}
.advanced-mv-progress-detail {
    margin-top: 8px;
    color: var(--slate-400);
    font-size: 12px;
    line-height: 1.45;
}
.advanced-mv-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--slate-200);
    cursor: pointer;
}
.advanced-mv-checkbox input {
    width: 17px;
    height: 17px;
}
.advanced-mv-ratio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.advanced-mv-ratio-group label {
    position: relative;
    cursor: pointer;
}
.advanced-mv-ratio-group input {
    position: absolute;
    opacity: 0;
}
.advanced-mv-ratio-group span {
    display: block;
    padding: 12px 14px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--glass-300);
    background: rgba(15, 23, 42, .55);
    color: var(--slate-300);
    transition: .2s ease;
}
.advanced-mv-ratio-group input:checked + span {
    border-color: var(--brand-primary);
    color: white;
    background: rgba(99, 102, 241, .18);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, .18);
}
.advanced-mv-background-field { margin-top: 16px; }
.advanced-mv-background-presets {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}
.advanced-mv-bg-option {
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(15,23,42,.72);
    color: var(--slate-300);
    cursor: pointer;
    transition: .18s ease;
}
.advanced-mv-bg-option img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.advanced-mv-bg-option span {
    display: block;
    padding: 7px 4px;
    font-size: 11px;
    white-space: nowrap;
}
.advanced-mv-bg-option:hover,
.advanced-mv-bg-option.is-active {
    border-color: var(--brand-primary);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(99,102,241,.2);
}
.advanced-mv-custom-bg-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 11px;
}
.advanced-mv-upload-bg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 9px;
    border: 1px solid rgba(99,102,241,.55);
    background: rgba(99,102,241,.12);
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.advanced-mv-background-name {
    color: var(--slate-400);
    font-size: 12px;
}
@media (max-width: 720px) {
    .advanced-mv-background-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.advanced-mv-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 4px 0 20px;
}
.advanced-mv-colors label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--glass-200);
    border-radius: 10px;
    color: var(--slate-300);
    font-size: 13px;
}
.advanced-mv-colors input[type="color"] {
    width: 38px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
}
.advanced-mv-preview-panel {
    border: 1px solid var(--glass-200);
    border-radius: 16px;
    padding: 22px;
    background: rgba(2, 6, 23, .42);
}
.advanced-mv-preview-empty {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: var(--slate-400);
}
.advanced-mv-preview-empty strong {
    color: var(--slate-200);
}
.advanced-mv-preview-empty span {
    max-width: 280px;
    font-size: 13px;
    line-height: 1.6;
}
.advanced-mv-preview-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(168,85,247,.25));
    color: #c4b5fd;
    font-weight: 800;
    letter-spacing: .08em;
}
.advanced-mv-preview-trigger {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    background: #050816;
}
.advanced-mv-preview-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(99,102,241,.45);
}
#advanced-mv-canvas {
    display: block;
    width: 100%;
    max-height: 58vh;
    object-fit: contain;
    border-radius: 12px;
    background: #050816;
    box-shadow: 0 12px 35px rgba(0,0,0,.35);
}
.advanced-mv-play-overlay {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px 7px 8px;
    border-radius: 999px;
    color: white;
    background: rgba(15,23,42,.78);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
    text-shadow: 0 2px 8px rgba(0,0,0,.6);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.advanced-mv-preview-trigger.is-playing .advanced-mv-play-overlay {
    opacity: 0;
}
.advanced-mv-preview-trigger:hover .advanced-mv-play-overlay {
    transform: translateY(-1px);
}
.advanced-mv-play-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding-left: 2px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    font-size: 13px;
}
.advanced-mv-play-overlay span:last-child {
    font-size: 12px;
    font-weight: 700;
}
.advanced-mv-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 2px 4px;
    color: var(--slate-400);
    font-size: 12px;
}
.advanced-mv-seek-wrap {
    margin: 8px 2px 2px;
}
.advanced-mv-seek {
    width: 100%;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #ffd54a;
}
.advanced-mv-seek:disabled {
    cursor: default;
    opacity: .45;
}
.advanced-mv-export-btn {
    margin-top: 8px;
}
.advanced-mv-export-hint {
    margin-top: 8px;
    text-align: center;
}
.mv-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mv-action-btn {
    padding: 8px 13px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mv-action-btn.normal {
    background: #6366f1;
    color: white;
}
.mv-action-btn.advanced {
    color: #fef3c7;
    background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(245,158,11,.18));
    border-color: rgba(216,180,254,.35);
}
.mv-action-btn.professional {
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(37,99,235,.30), rgba(6,182,212,.20));
    border-color: rgba(125,211,252,.42);
}
.mv-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
@media (max-width: 820px) {
    .advanced-mv-modal-container {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }
    .advanced-mv-header {
        padding: 20px 18px 10px;
    }
    .advanced-mv-body {
        padding: 8px 18px 24px;
    }
    .advanced-mv-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .advanced-mv-preview-panel {
        padding: 14px;
    }
    .advanced-mv-preview-empty {
        min-height: 260px;
    }
    .advanced-mv-preview-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* 推广送积分 */
.referral-modal-container{max-width:620px}.referral-rule-card{padding:16px 18px;border:1px solid rgba(34,211,238,.24);border-radius:14px;background:rgba(34,211,238,.08)}.referral-rule-card strong{color:#67e8f9;font-size:16px}.referral-rule-card p{margin-top:8px;color:#cbd5e1;line-height:1.65;font-size:14px}.referral-rule-card b{color:#fbbf24}.referral-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0 20px}.referral-stats-grid>div{padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.04);text-align:center}.referral-stats-grid span,.referral-stats-grid small{display:block;color:#94a3b8;font-size:12px}.referral-stats-grid strong{display:inline-block;margin:5px 4px;color:#fff;font-size:27px}.referral-copy-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start}.referral-copy-row .modal-input{margin-bottom:14px}.referral-code-input{font-weight:800;letter-spacing:.12em}.referral-copy-row .portal-action{height:42px;white-space:nowrap}@media(max-width:620px){.referral-stats-grid{grid-template-columns:1fr}.referral-copy-row{grid-template-columns:1fr}.referral-copy-row .portal-action{margin-top:-6px;margin-bottom:12px}}

/* 鲸鲸学英语游戏 · 视频宣传首屏 */
.games-hero.games-hero-video{grid-template-columns:minmax(360px,.82fr) minmax(520px,1.18fr);gap:38px;padding:38px;background:radial-gradient(circle at 78% 15%,rgba(34,211,238,.09),transparent 38%),linear-gradient(145deg,#0b1829,#091524);overflow:hidden}.games-hero-copy{position:relative;z-index:2}.games-hero-copy h2{font-size:clamp(38px,4.2vw,58px)}.games-hero-copy p{max-width:620px}.game-promo-stage{position:relative;min-height:390px;aspect-ratio:16/9;border-radius:26px;overflow:hidden;border:1px solid rgba(103,232,249,.22);background:#050b13;box-shadow:0 30px 80px rgba(0,0,0,.42),0 0 0 1px rgba(255,255,255,.025) inset}.game-promo-glow{position:absolute;inset:-28%;background:radial-gradient(circle,rgba(34,211,238,.23),transparent 58%);filter:blur(28px);z-index:0;pointer-events:none}.game-promo-video{position:relative;z-index:1;display:block;width:100%;height:100%;object-fit:cover;background:#050b13}.game-promo-shade{position:absolute;z-index:2;inset:0;background:linear-gradient(180deg,transparent 52%,rgba(2,8,17,.88) 100%);pointer-events:none}.game-promo-caption{position:absolute;z-index:3;left:22px;bottom:20px;display:flex;flex-direction:column;gap:3px;text-shadow:0 2px 14px rgba(0,0,0,.7);pointer-events:none}.game-promo-caption span{color:#67e8f9;font-size:12px;font-weight:900;letter-spacing:.13em}.game-promo-caption strong{color:#fff;font-size:20px}.game-video-control{position:absolute;z-index:4;right:16px;top:16px;display:flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(4,12,22,.68);backdrop-filter:blur(12px);color:#fff;font-size:12px;font-weight:800;cursor:pointer}.game-video-control:hover{background:rgba(8,24,40,.86);border-color:rgba(103,232,249,.38)}.game-video-play{position:absolute;z-index:5;left:50%;top:50%;width:70px;height:70px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.28);border-radius:50%;background:rgba(3,12,22,.76);backdrop-filter:blur(10px);color:#fff;font-size:28px;cursor:pointer;box-shadow:0 12px 30px rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.2s}.game-video-play.visible{opacity:1;pointer-events:auto}.game-price-strip{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;margin-top:24px;padding:14px 16px;border:1px solid rgba(245,185,66,.28);border-radius:16px;background:linear-gradient(90deg,rgba(245,185,66,.12),rgba(245,185,66,.04));box-shadow:0 14px 34px rgba(0,0,0,.16)}.game-price-strip>span{color:#f8e6ad;font-size:13px;font-weight:800}.game-price-strip strong{color:#f5b942;font-size:28px;white-space:nowrap}.game-price-strip small{margin-left:3px;color:#cfb977;font-size:12px}.game-price-strip button{padding:10px 13px;border:0;border-radius:10px;background:#f5b942;color:#1e1606;font-weight:900;cursor:pointer;white-space:nowrap}.game-price-strip button:hover{transform:translateY(-1px);filter:brightness(1.05)}
@media(max-width:1100px){.games-hero.games-hero-video{grid-template-columns:1fr;gap:28px}.game-promo-stage{min-height:0}.game-price-strip{max-width:680px}}
@media(max-width:620px){.games-hero.games-hero-video{padding:20px}.games-hero-copy h2{font-size:36px}.game-price-strip{grid-template-columns:1fr auto}.game-price-strip button{grid-column:1/-1;width:100%}.game-promo-stage{border-radius:18px}.game-promo-caption{left:14px;bottom:14px}.game-promo-caption strong{font-size:16px}.game-video-control span{display:none}.game-video-control{padding:9px 11px}}

/* 鲸鲸学英语游戏 · 第二版布局修正 */
.games-hero.games-hero-video{
    grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);
    gap:42px;
    align-items:center;
    padding:46px 48px;
    overflow:hidden;
    background:linear-gradient(145deg,#0b1829 0%,#0a1727 55%,#0b1b2c 100%);
}
.games-hero-copy,.game-promo-stage{min-width:0}
.games-hero-copy h2{font-size:clamp(40px,4vw,54px);line-height:1.06;letter-spacing:-.04em}
.games-hero-copy p{max-width:590px;font-size:16px;line-height:1.75}
.game-promo-stage{
    width:100%;
    max-width:760px;
    min-height:0;
    aspect-ratio:16/9;
    justify-self:end;
    box-sizing:border-box;
    border-radius:22px;
    overflow:hidden;
    border:1px solid rgba(148,163,184,.18);
    background:#07111d;
    box-shadow:0 24px 58px rgba(0,0,0,.32),0 0 0 1px rgba(255,255,255,.02) inset;
}
.game-promo-glow{display:none}
.game-promo-video{width:100%;height:100%;object-fit:contain;background:#07111d}
.game-promo-shade,.game-promo-caption{display:none!important}
.game-video-control{
    right:14px;
    top:14px;
    padding:8px 11px;
    background:rgba(5,13,24,.68);
    border-color:rgba(255,255,255,.14);
    box-shadow:0 8px 22px rgba(0,0,0,.22);
}
.game-video-play{width:58px;height:58px;font-size:22px;background:rgba(5,13,24,.78)}
.game-price-strip{
    grid-template-columns:minmax(0,1fr) auto auto;
    max-width:590px;
    gap:12px;
    margin-top:20px;
    padding:12px 14px;
    border-radius:14px;
    border-color:rgba(245,185,66,.22);
    background:rgba(245,185,66,.065);
    box-shadow:none;
}
.game-price-strip>span{font-size:12px;color:#e8d8a6}
.game-price-strip strong{font-size:25px}
.game-price-strip button{padding:9px 12px;border-radius:9px;font-size:13px}
@media(max-width:1180px){
    .games-hero.games-hero-video{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:28px;padding:36px}
    .games-hero-copy h2{font-size:44px}
}
@media(max-width:980px){
    .games-hero.games-hero-video{grid-template-columns:1fr;gap:28px;padding:30px}
    .game-promo-stage{justify-self:stretch;max-width:none}
    .game-price-strip{max-width:none}
}
@media(max-width:620px){
    .games-hero.games-hero-video{padding:20px 16px;gap:22px}
    .games-hero-copy h2{font-size:34px}
    .games-hero-copy p{font-size:14px}
    .game-price-strip{grid-template-columns:1fr auto;padding:11px 12px}
    .game-price-strip button{grid-column:1/-1}
    .game-promo-stage{border-radius:16px}
}

/* 宣传视频原始比例为 2304×1440（16:10）：按原比例展示即可去掉浏览器补出的左右黑边。 */
.game-promo-stage{
    aspect-ratio:8/5;
    background:#eaf3fa;
    cursor:pointer;
}
.game-promo-video{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
    background:#eaf3fa;
    cursor:pointer;
}
.game-promo-stage:hover{border-color:rgba(103,232,249,.30)}
.game-video-play.visible{display:flex;align-items:center;justify-content:center}

/* 智能歌词 · 教材/自定义单词双模式 */
.lyrics-generation-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.lyrics-mode-card{display:flex;align-items:flex-start;gap:10px;padding:13px 14px;border:1px solid rgba(148,163,184,.18);border-radius:12px;background:rgba(255,255,255,.035);cursor:pointer;transition:.18s}.lyrics-mode-card:hover{border-color:rgba(99,102,241,.4);background:rgba(99,102,241,.07)}.lyrics-mode-card.active{border-color:rgba(99,102,241,.75);background:rgba(99,102,241,.13);box-shadow:0 0 0 1px rgba(99,102,241,.16) inset}.lyrics-mode-card input{margin-top:3px;accent-color:#6366f1}.lyrics-mode-card span{display:flex;flex-direction:column;gap:3px;color:#e5e7eb}.lyrics-mode-card b{font-size:14px}.lyrics-mode-card small{color:#94a3b8;font-size:12px;line-height:1.45}#lyrics-textbook-options{transition:.18s}#lyrics-textbook-options.disabled{opacity:.38;filter:saturate(.55);pointer-events:none}.lyrics-custom-words{min-height:128px;resize:vertical;line-height:1.6}.lyrics-custom-hint{margin-top:7px;color:#94a3b8;font-size:12px;line-height:1.55}.lyrics-generator-field select:disabled,.lyrics-generator-field textarea:disabled{cursor:not-allowed;opacity:.55}@media(max-width:620px){.lyrics-generation-mode{grid-template-columns:1fr}}


/* 鲸鲸学英语游戏 · 暂时隐藏宣传视频并优化单栏布局 */
#games-tab .game-promo-stage[hidden]{display:none !important}
#games-tab .games-hero.games-hero-video{
    grid-template-columns:minmax(0,1fr);
    gap:0;
    padding:58px clamp(28px,5vw,76px);
    min-height:0;
}
#games-tab .games-hero-copy{
    width:min(100%,980px);
    margin:0 auto;
}
#games-tab .games-hero-copy h2{
    max-width:820px;
    margin-top:18px;
    font-size:clamp(42px,5vw,66px);
    line-height:1.08;
}
#games-tab .games-hero-copy p{
    max-width:760px;
    margin-top:24px;
    font-size:18px;
    line-height:1.85;
}
#games-tab .games-hero-copy .hero-actions{margin-top:30px}
#games-tab .game-price-strip{
    width:min(100%,760px);
    max-width:none;
    margin-top:30px;
}
#games-tab .games-hero-copy .builder-hint{
    max-width:760px;
    margin-top:16px;
}
@media(max-width:620px){
    #games-tab .games-hero.games-hero-video{padding:34px 20px}
    #games-tab .games-hero-copy h2{font-size:40px}
    #games-tab .games-hero-copy p{font-size:15px;line-height:1.75}
}
