@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

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

:root {
    --primary: #e2e8f0;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --danger: #f87171;
    --success: #4ade80;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

.panel.hidden {
    display: none;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 36px;
    font-weight: 300;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #0ea5e9);
    color: white;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Countdown Panel */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.btn-small {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Progress Ring */
.progress-section {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
}

.progress-ring-container {
    position: relative;
    width: 200px;
    height: 200px;
}

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

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 12;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#progress-gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text .percent {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.progress-text .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Precise Countdown */
.precise-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.time-unit {
    text-align: center;
    min-width: 70px;
}

.time-value {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: 2px;
}

.time-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.time-separator {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-top: -16px;
}

/* Quote */
.quote {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* SVG Gradient Definition */
.progress-ring-defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .panel {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-value {
        font-size: 2rem;
    }
    
    .time-unit {
        min-width: 50px;
    }
    
    .progress-ring-container {
        width: 160px;
        height: 160px;
    }
    
    .progress-text .percent {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel {
    animation: fadeIn 0.6s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.time-value {
    animation: pulse 1s ease infinite;
}
