/* ========== Base ==========\ */
:root {
    --bg-focus: #c74650;
    --bg-dark: #22252b;
    --white: #ffffff;
    --white-soft: rgba(255, 255, 255, 0.16);
    --white-soft-2: rgba(255, 255, 255, 0.28);
    --text-main: #2c3340;
    --text-muted: #6b7280;
    --shadow-main: 0 18px 45px rgba(0, 0, 0, 0.25);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --transition-fast: 0.18s ease-out;
    --transition-slow: 0.35s ease-in-out;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--white);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* ========== Themes & Hero ==========\ */

/* body фон базовый по теме */
body.theme-solid {
    background: radial-gradient(circle at top, #e86d72 0, #c74650 32%, #822d34 100%);
}

body.theme-image {
    background: #000;
}

/* Hero блок, занимает 1 экран */
.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* фон для solid темы */
body.theme-solid .hero {
    background: radial-gradient(circle at top, #e86d72 0, #c74650 32%, #822d34 100%);
}

/* фон‑картинка first.png для image темы */
body.theme-image .hero {
    background-image: url("/first.png");
    background-size: cover;        /* растягиваем, кадрируем по краям */
    background-position: center;   /* держим центр композиции */
    background-repeat: no-repeat;
}

/* затемнение поверх картинки/фона, чтобы цифры читались */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0.55)
    );
    pointer-events: none;
}

/* Контент поверх hero */
.header,
.timer-container {
    position: relative;
    z-index: 1;
}

/* ========== Header ==========\ */

.header {
    max-width: 960px;
    width: 100%;
    padding: 16px 20px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 16px;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    opacity: 0.92;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Переключатель обоев */

.bg-switch {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    padding: 3px;
    backdrop-filter: blur(10px);
}

.bg-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.bg-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.bg-btn-active {
    background: #ffffff;
    color: var(--bg-focus);
    font-weight: 600;
}

/* Language nav */

.lang-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.24);
    padding: 4px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.lang-link {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: background var(--transition-fast), color var(--transition-fast),
        transform 0.08s ease-out;
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    transform: translateY(-1px);
}

.lang-link.active {
    background: var(--white);
    color: var(--bg-focus);
    font-weight: 600;
}

/* ========== Timer Card ==========\ */

.timer-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px 32px;
}

.timer-box {
    width: 100%;
    max-width: 520px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-xl);
    padding: 26px 24px 28px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(18px);
}

/* Timer display */

.timer-display {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.timer-digits {
    font-size: 96px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Quick buttons */

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
}

.quick-btn {
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--white-soft);
    color: var(--white);
    transition: background var(--transition-fast), transform 0.08s ease-out,
        box-shadow var(--transition-fast);
}

.quick-btn:hover {
    background: var(--white-soft-2);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.quick-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
}

/* Main & reset buttons */

.main-btn {
    flex: 1;
    border: none;
    outline: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.55);      /* тёмный, вписанный в фон */
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 12px 18px;
    border-radius: 999px;
    box-shadow: none;                     /* без тени */
    transition: background 0.15s ease-out, transform 0.06s ease-out;
}

.main-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.main-btn:active {
    transform: translateY(1px) scale(0.99);
}



.reset-btn {
    display: block;
    margin: 0 auto;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.reset-btn:hover {
    color: var(--white);
}

/* ========== Info Section ==========\ */

.info-section {
    background: #f9fafb;
    color: var(--text-main);
    padding: 40px 16px 48px;
}

.content-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.info-section h1 {
    font-size: 28px;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.info-block {
    margin-top: 26px;
}

.info-block h2 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.info-block p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

.features-list,
.steps-list {
    margin-top: 8px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.features-list li + li,
.steps-list li + li {
    margin-top: 4px;
}

/* ========== Footer ==========\ */

.footer {
    background: #f3f4f6;
    padding: 14px 16px 18px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}
/* ========== Tasks Under Timer ========== */

.tasks-section {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tasks-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tasks-input {
    flex: 1;
    border-radius: 999px;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    outline: none;
}

.tasks-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.tasks-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);   /* вместо белого */
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;                  /* без тени */
    transition: background 0.15s ease-out, transform 0.06s ease-out;
}

.tasks-add-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.tasks-add-btn:active {
    transform: translateY(1px) scale(0.97);
}

.tasks-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 2px;
}

.tasks-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease-out, opacity 0.15s ease-out;
}

.tasks-item:hover {
    background: rgba(0, 0, 0, 0.25);
}

.tasks-item-active {
    background: rgba(255, 255, 255, 0.18);
}

.tasks-item-completed .tasks-title {
    opacity: 0.45;
    text-decoration: line-through;
}

.tasks-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    flex-shrink: 0;
}

.tasks-title {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tasks-badge {
    font-size: 12px;
    opacity: 0.8;
    flex-shrink: 0;
}

.tasks-empty {
    font-size: 12px;
    opacity: 0.7;
    padding: 4px 0;
}

/* ========== Buttons tweak ========== */



/* RESET в нашем стиле как secondary */
.secondary-btn {
    width: 48px;
    border-radius: 14px;                       /* почти квадрат, слегка скруглённый */
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;                           /* символ ■ */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease-out, transform 0.06s ease-out;
    flex-shrink: 0;
}

.secondary-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.secondary-btn:active {
    transform: translateY(1px) scale(0.97);
}
.controls-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 6px;
}
/* На мобильных для темы image используем firstmobile.png */
@media (max-width: 768px) {
    body.theme-image .hero {
        background-image: url("/firstmobile.jpg");
    }
}