/* TK AI视频生成平台 - 主样式表 */

/* ===== CSS变量 ===== */
:root {
    /* 主色调 - TikTok风格渐变 */
    --primary-gradient: linear-gradient(135deg, #fe2c55 0%, #ff0050 50%, #ff6f91 100%);
    --primary: #fe2c55;
    --primary-dark: #d91a47;
    --primary-light: #ff6f91;
    
    /* 辅助色 - 霓虹青色 */
    --accent: #25f4ee;
    --accent-dark: #00c4bf;
    --accent-light: #7fffff;
    
    /* 中性色 */
    --bg-dark: #0a0a0f;
    --bg-card: #16161d;
    --bg-card-hover: #1e1e28;
    --bg-input: #0d0d12;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    
    --border-color: #2a2a38;
    --border-light: #3a3a4a;
    
    /* 状态色 */
    --success: #00d26a;
    --warning: #ffaa00;
    --error: #ff4757;
    --info: #3b82f6;
    
    /* 尺寸 */
    --navbar-height: 72px;
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-full: 9999px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(254, 44, 85, 0.3);
    
    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ===== 背景动效 ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(254, 44, 85, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(37, 244, 238, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 50, 150, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: -2;
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(254, 44, 85, 0.1);
}

.nav-auth {
    display: flex;
    gap: 12px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-credits {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-full);
    font-weight: 600;
}

.credits-icon {
    font-size: 16px;
}

.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(254, 44, 85, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(254, 44, 85, 0.5);
}

.btn-outline {
    border: 2px solid var(--border-light);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(254, 44, 85, 0.1);
}

.btn-ghost {
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== 主内容区 ===== */
.main-content {
    padding-top: var(--navbar-height);
}

/* ===== Hero区域 ===== */
.hero {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 60px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

.hero-visual {
    flex-shrink: 0;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1a1a24;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid #2a2a38;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.tiktok-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.tiktok-action {
    font-size: 12px;
    color: white;
    text-align: center;
}

/* ===== 通用段落 ===== */
.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 100px 24px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

/* ===== 功能特点 ===== */
.features {
    background: rgba(22, 22, 29, 0.5);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 工作流程 ===== */
.workflow {
    background: linear-gradient(180deg, transparent 0%, rgba(254, 44, 85, 0.05) 50%, transparent 100%);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.workflow-step {
    flex: 1;
    max-width: 300px;
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.step-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

.workflow-arrow {
    font-size: 32px;
    color: var(--primary);
}

/* ===== 模板展示 ===== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.template-preview {
    aspect-ratio: 9/16;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.template-info {
    padding: 16px;
}

.template-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.template-category {
    font-size: 13px;
    color: var(--text-muted);
}

.templates-more {
    text-align: center;
}

/* ===== 定价 ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: '推荐';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    padding: 4px 16px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 600;
}

.pricing-card:hover {
    border-color: var(--primary);
}

.pricing-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pricing-credits {
    font-size: 48px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-credits-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pricing-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 24px;
}

/* ===== CTA ===== */
.cta {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-opacity="0.1" stroke-width="0.5"/></svg>');
    background-size: 100px;
    opacity: 0.5;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 40px 0;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 60px 24px 30px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== 表单元素 ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23a0a0b0" viewBox="0 0 16 16"><path d="M8 11L3 6h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 13px;
    color: var(--error);
    margin-top: 6px;
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
}

.card-header {
    margin-bottom: 24px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
}

.card-subtitle {
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ===== 状态徽章 ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--border-radius-full);
}

.badge-pending {
    background: rgba(255, 170, 0, 0.15);
    color: var(--warning);
}

.badge-processing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-completed {
    background: rgba(0, 210, 106, 0.15);
    color: var(--success);
}

.badge-failed {
    background: rgba(255, 71, 87, 0.15);
    color: var(--error);
}

/* ===== 加载动画 ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
}

/* ===== 消息提示 ===== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.toast-success {
    border-color: var(--success);
}

.toast-error {
    border-color: var(--error);
}

.toast-warning {
    border-color: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pricing-card.popular {
        transform: none;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 60px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workflow-steps {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }
}
