:root {
    color-scheme: light;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-alt: #eef2fb;
    --text-primary: #0f172a;
    --text-secondary: #43506a;
    --text-muted: #66748c;
    --border: rgba(11, 17, 32, 0.08);
    --border-strong: rgba(11, 17, 32, 0.18);
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: rgba(79, 70, 229, 0.1);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 28px 70px -28px rgba(67, 56, 202, 0.35);
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

body[data-theme="dark"] {
    color-scheme: dark;
    --bg: #060b1a;
    --surface: #0b1223;
    --surface-alt: #101b31;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.28);
    --accent: #818cf8;
    --accent-strong: #6366f1;
    --accent-soft: rgba(129, 140, 248, 0.18);
    --shadow-soft: 0 22px 60px rgba(7, 12, 27, 0.65);
    --shadow-strong: 0 28px 70px -30px rgba(99, 102, 241, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 55%), var(--bg);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

header.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

body[data-theme="dark"] header.site-header {
    background: rgba(6, 11, 26, 0.78);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.nav-links {
    display: inline-flex;
    gap: 0.9rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.theme-toggle,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.48rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-secondary);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transition: border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover,
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.locale-select {
    position: relative;
}

.locale-select::after {
    content: '\25BE';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
}

.locale-select select {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.48rem 2.5rem 0.48rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text-secondary);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.locale-select select:hover,
.locale-select select:focus {
    border-color: var(--accent);
    color: var(--accent-strong);
    outline: none;
}

body[data-theme="dark"] .locale-select select {
    background: var(--surface-alt);
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: 0.9rem 2.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: var(--shadow-strong);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

main.site-content {
    padding: clamp(3rem, 5vw, 4rem) 1.75rem clamp(4rem, 6vw, 5rem);
}

footer.site-footer {
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    padding: 1.75rem;
    text-align: center;
    font-size: 0.85rem;
}

body.timer-body {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.12), transparent 60%), var(--bg);
}

.timer-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 3.5rem) 1.4rem;
}

.timer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.timer-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.timer-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-alt);
    box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.25);
}

.timer-link:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.hero {
    max-width: 1100px;
    margin: 0 auto 4.5rem;
    display: grid;
    gap: clamp(2rem, 5vw, 3rem);
    align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-text { display: grid; gap: 1.5rem; }

.hero-title {
    margin: 0;
    font-size: clamp(2.6rem, 6.5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text-primary);
}

.hero-lead {
    margin: 0;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-demo {
    justify-self: center;
    width: min(360px, 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 1.5rem;
    text-align: center;
}

.hero-demo span.time {
    font-size: clamp(2.8rem, 8vw, 4rem);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.section-title {
    max-width: 1100px;
    margin: 0 auto 1.25rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
}

.feature-grid {
    max-width: 1100px;
    margin: 0 auto 4rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 1.75rem;
    box-shadow: 0 26px 60px -32px rgba(15, 23, 42, 0.2);
    display: grid;
    gap: 0.9rem;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.metrics {
    max-width: 1100px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.metric-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 1.5rem;
    display: grid;
    gap: 0.4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.metric-card strong {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.seo-section {
    max-width: 1100px;
    margin: 0 auto 4.5rem;
    display: grid;
    gap: 1.8rem;
}

.seo-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.seo-copy {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: clamp(1.6rem, 3vw, 2.2rem);
    box-shadow: 0 24px 55px -28px rgba(15, 23, 42, 0.18);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.seo-copy h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--text-primary);
}

.seo-copy ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.faq {
    max-width: 1100px;
    margin: 0 auto 4.5rem;
}

.faq-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.faq-item {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 1.4rem;
    box-shadow: 0 20px 50px -30px rgba(15, 23, 42, 0.2);
}

.faq-item h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-item p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.cta-panel {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(79, 70, 229, 0.22);
    padding: clamp(2.4rem, 5vw, 3rem);
    display: grid;
    gap: 1.1rem;
    text-align: center;
}

.cta-panel h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600; }

.cta-panel p { margin: 0; color: var(--text-muted); font-size: 1rem; }

.cta-panel .actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


.timer-shell {
    width: min(380px, 92%);
    margin: 0 auto;
    padding: clamp(1.6rem, 5vw, 2.2rem);
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.timer-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-locale-select {
    position: relative;
}

.timer-locale-select::after {
    content: '\25BE';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    pointer-events: none;
}

.timer-locale-select select {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.32rem 2.1rem 0.32rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--surface-alt);
    color: var(--text-secondary);
    box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.25);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.timer-locale-select select:hover,
.timer-locale-select select:focus {
    border-color: var(--accent);
    color: var(--accent-strong);
    outline: none;
}

body[data-theme="dark"] .timer-locale-select select {
    background: var(--surface);
}

.timer-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-alt);
    box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.25);
}

.timer-link:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.timer-link.is-current {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    cursor: default;
}

.timer-theme,
.timer-sound {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-size: 0.85rem;
    background: var(--surface-alt);
    color: var(--text-secondary);
}

.timer-theme:hover,
.timer-sound:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.timer-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--surface-alt);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0.2rem;
}

.timer-tabs button {
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.timer-tabs button.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.35);
}

.timer-face {
    font-size: clamp(2.9rem, 10vw, 4.6rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--text-primary);
    word-spacing: 0.15rem;
    padding: 0 0.5rem;
}

.timer-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.timer-input {
    display: grid;
    gap: 0.45rem;
}

.timer-input label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.timer-input input {
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface-alt);
    text-align: center;
    appearance: none;
}

.timer-input input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.timer-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-controls button {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.timer-action {
    min-width: 180px;
    border: none;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: var(--shadow-strong);
}

.timer-action:hover { transform: translateY(-2px); }
.timer-action.is-paused { background: linear-gradient(135deg, #ef4444, #dc2626); }

.timer-button {
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface-alt);
}

.timer-button:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.timer-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
}

.timer-presets button {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.45rem 0.8rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.timer-presets button:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
    transform: translateY(-1px);
}

.timer-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-text { justify-items: center; }
    .hero-actions { justify-content: center; }
}

@media (max-width: 720px) {
    .header-inner { padding: 1rem 1.2rem; }
    .nav-links { display: none; }
}

@media (max-width: 600px) {
    main.site-content { padding: 2.5rem 1.2rem 3.5rem; }
    .hero-demo { width: 100%; }
    .timer-shell { padding: 1.6rem 1.3rem; border-radius: 22px; }
    .timer-inputs { flex-direction: column; }
    .timer-controls { flex-direction: column; }
    .timer-action { width: 100%; }
    .timer-button { width: 100%; }
}
