/* MagiDiva 网站样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366F1;
    --secondary-color: #8B5CF6;
    --accent-color: #A855F7;
    --bg-dark: #0F0F14;
    --bg-card: #16161E;
    --bg-hover: #1F1F2E;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border-color: #2A2A38;
    --success-color: #10B981;
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-hero: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.brand-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.btn-nav {
    background: var(--gradient-primary);
    padding: 8px 20px !important;
    border-radius: 8px;
    color: white !important;
    font-weight: 500;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* 英雄区域 */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #131318 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 24px;
}

.highlight {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-unit {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-image {
    position: relative;
}

.demo-card {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.demo-before,
.demo-after {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

.demo-before {
    left: 0;
}

.demo-after {
    right: 0;
}

.demo-before img,
.demo-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    cursor: ew-resize;
}

/* 价格方案 */
.pricing {
    padding: 80px 0;
    background: var(--bg-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    border-width: 2px;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.price-amount {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
}

.price-unit {
    font-size: 16px;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.btn-pricing {
    display: block;
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
}

.btn-pricing:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.pricing-note {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.pricing-note p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 功能特性 */
.features {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #131318 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 使用流程 */
.how-it-works {
    padding: 80px 0;
    background: var(--bg-dark);
}

.steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.step {
    flex: 1;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 20px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.step p {
    font-size: 14px;
    color: var(--text-secondary);
}

.step-arrow {
    font-size: 32px;
    color: var(--primary-color);
}

/* 下载区域 */
.download {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #131318 100%);
}

.download-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.download-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.download-content > p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.download-buttons {
    margin-bottom: 24px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--gradient-primary);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.download-icon {
    font-size: 24px;
}

.download-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.download-label {
    font-size: 16px;
    font-weight: 500;
}

.download-size {
    font-size: 13px;
    opacity: 0.8;
}

.download-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        order: -1;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* ══════ 弹窗 ══════ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 420px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-payment {
    width: 520px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    padding: 32px 32px 16px;
}

.modal-header h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 0 32px 32px;
}

/* ── 表单 ── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group.inline {
    flex: 1;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-full {
    width: 100%;
    text-align: center;
    padding: 14px;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ── 充值弹窗 ── */
.balance-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.balance-icon {
    font-size: 20px;
}

.balance-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.balance-text strong {
    color: #A5B4FC;
    font-size: 18px;
    font-weight: 600;
}

/* ── 充值方案卡片 ── */
.payment-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.plan-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.plan-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.plan-popular {
    border-color: var(--primary-color);
    border-width: 2px;
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 2px 12px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
}

.plan-name {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.plan-credits {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-unit {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── 自定义充值 ── */
.custom-recharge {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.custom-recharge h3 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.custom-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* ── 二维码 ── */
.qr-box {
    text-align: center;
    padding: 24px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
}

.qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    min-height: 180px;
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.qr-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.qr-order {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── 导航栏用户信息 ── */
.user-info-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-credits {
    font-size: 13px;
    color: #A5B4FC;
    font-weight: 500;
}

.btn-nav-outline {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
}

.btn-nav-outline:hover {
    border-color: var(--primary-color) !important;
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    animation: toastIn 0.3s ease;
    color: white;
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: #EF4444;
}

.toast-info {
    background: var(--primary-color);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── 响应式弹窗 ── */
@media (max-width: 640px) {
    .payment-plans {
        grid-template-columns: 1fr;
    }
    
    .custom-row {
        flex-direction: column;
    }
    
    .modal-box {
        width: 95vw;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 24px 20px 12px;
    }
    
    .modal-body {
        padding: 0 20px 24px;
    }
}
