/* ============================================
   基于 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-color: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    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 导航栏
   ============================================ */
.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;
}

.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媒体查询中定义 */

