/* ===== 基础变量 ===== */
:root {
    --color-primary: #3b82f6;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-danger: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.85);
    --bg-card-light: rgba(255, 255, 255, 0.05);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: rgba(99, 102, 241, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.2);
    
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-full: 50%;
    
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    
    --transition: all 0.3s ease;
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* 主容器 */
.container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

/* 主卡片 */
.main-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.main-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 倒计时跳转区域 */
.redirect-section {
    width: 100%;
}

.countdown-section {
    text-align: center;
}

/* 倒计时头部 */
.countdown-header {
    margin-bottom: var(--spacing-lg);
}

.countdown-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.time-remaining {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.1rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* 倒计时显示 */
.countdown-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.countdown-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.countdown-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.countdown-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 6;
}

.countdown-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339;
    stroke-dashoffset: 339;
    transition: stroke-dashoffset 0.5s ease;
}

.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.countdown-info {
    max-width: 300px;
}

.countdown-info p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.countdown-info strong {
    color: var(--color-primary);
    font-weight: 600;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 跳转控制 */
.jump-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) var(--spacing-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-resume {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.btn-resume:hover {
    background: linear-gradient(135deg, #0da271, #047857);
}

.btn-lg {
    font-size: 1.1rem;
    padding: 16px 32px;
}

.control-buttons {
    width: 100%;
    max-width: 280px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }
    
    .main-card {
        padding: var(--spacing-md);
    }
    
    .countdown-circle {
        width: 100px;
        height: 100px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .countdown-header h3 {
        font-size: 1.3rem;
    }
    
    .btn-lg {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .redirect-section {
        padding: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
    }
    
    .footer {
        padding: var(--spacing-md) 0;
    }
}
