:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: #d1fae5;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
}
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #34d399;
    --accent-hover: #10b981;
    --accent-light: #064e3b;
    --border: #334155;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}
.container { max-width: 700px; margin: 0 auto; padding: 2rem 1rem; }
header { text-align: center; margin-bottom: 2rem; }
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tagline { color: var(--text-secondary); font-size: 1rem; margin-bottom: 1rem; }
.trust-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
.badge {
    padding: 0.35rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.mode-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.mode-tab:hover { border-color: var(--accent); color: var(--accent); }
.mode-tab.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

/* Timer Card */
.timer-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}
.mode-content { display: none; }
.mode-content.active { display: block; }

/* Progress Ring */
.progress-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
}
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-bg { fill: none; stroke: var(--bg-tertiary); stroke-width: 8; }
.progress-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s ease;
}
.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Time Inputs */
.time-inputs { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.input-group { display: flex; flex-direction: column; align-items: center; }
.input-group input {
    width: 70px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.input-group input:focus { outline: none; border-color: var(--accent); }
.input-group label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.separator { font-size: 2rem; font-weight: 700; color: var(--text-muted); margin-bottom: 1.25rem; }

/* Presets */
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.preset {
    padding: 0.5rem 0.875rem;
    border: 2px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.preset:hover { border-color: var(--accent); color: var(--accent); }
.preset.active { border-color: var(--accent); background: var(--accent); color: white; }

/* Date Countdown */
.date-countdown-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    min-width: 80px;
}
.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.date-inputs { margin-bottom: 1.5rem; }
.date-input-group { margin-bottom: 1rem; }
.date-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.date-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
}
.date-input-group input:focus { outline: none; border-color: var(--accent); }
.date-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }

/* Controls */
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border); }
.hidden { display: none !important; }

/* Options */
.options { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.option { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; }
.option input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Use Cases */
.use-cases-section {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}
.use-cases-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.use-case {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}
.use-case-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.use-case h3 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.use-case p { font-size: 0.75rem; color: var(--text-muted); }

/* FAQ */
.faq-section { margin-top: 2rem; }
.faq-section h2 { font-size: 1.5rem; margin-bottom: 1.25rem; text-align: center; }
.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}
.faq-item summary { padding: 1rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--text-muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1rem 1rem; color: var(--text-secondary); }

/* Footer */
footer { text-align: center; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.875rem; }
footer a { color: var(--accent); text-decoration: none; }
.footer-links { margin-top: 0.5rem; font-size: 0.8rem; }
.footer-links a { color: var(--text-secondary); }

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    font-size: 1.25rem;
    z-index: 100;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
}
.modal-content h3 { margin-bottom: 1rem; }
.modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.modal-buttons { display: flex; gap: 0.75rem; }
.modal-buttons button { flex: 1; }

/* Full Screen */
.fullscreen-mode {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    padding: 2rem;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.fullscreen-mode header,
.fullscreen-mode .mode-tabs,
.fullscreen-mode .use-cases-section,
.fullscreen-mode .faq-section,
.fullscreen-mode footer { display: none; }
.fullscreen-mode .timer-card {
    max-width: 600px;
    margin: 0 auto;
}
.fullscreen-mode .timer-display { font-size: 6rem; }
.fullscreen-mode .progress-container { width: 300px; height: 300px; }
.fullscreen-mode .countdown-value { font-size: 4rem; }

/* Complete State */
.complete .timer-display { animation: pulse 0.5s ease infinite alternate; color: #ef4444; }
.complete .progress-fill { stroke: #ef4444; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.5; } }

/* Responsive */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    .timer-display { font-size: 2.5rem; }
    .progress-container { width: 180px; height: 180px; }
    .input-group input { width: 60px; height: 48px; font-size: 1.25rem; }
    .countdown-value { font-size: 1.75rem; }
    .countdown-unit { padding: 0.75rem 1rem; min-width: 65px; }
    .controls { flex-direction: column; }
    .controls button { width: 100%; }
    .fullscreen-mode .timer-display { font-size: 3.5rem; }
    .fullscreen-mode .progress-container { width: 200px; height: 200px; }
}
