/* ============================================================
   FocusNoise.net — Design System & Styles
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
    --bg-primary: #0A1F16;
    --bg-secondary: #112B1F;
    --bg-tertiary: #0E2419;
    --accent: #1DC973;
    --accent-dim: rgba(29, 201, 115, 0.15);
    --accent-border: rgba(29, 201, 115, 0.1);
    --accent-glow: rgba(29, 201, 115, 0.25);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-body: rgba(255, 255, 255, 0.8);
    --border-card: rgba(255, 255, 255, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --player-height: 80px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-body);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: calc(var(--player-height) + 20px);

    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 201, 115, 0.3) transparent;
}

/* Webkit (Chrome, Edge, Safari) scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 201, 115, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 201, 115, 0.5);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
    color: var(--text-primary);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.hidden {
    display: none !important;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 31, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--accent-border);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.header__logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.header__nav {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.header__placeholder {
    flex: 1;
}

.header__nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
    padding: 4px 0;
}

.header__nav-link:hover {
    color: var(--text-primary);
}

.header__nav-link--active {
    color: var(--accent);
}

.header__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.header__profile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition);
}

.header__profile:hover {
    border-color: var(--accent);
}

/* ============================================================
   MAIN / SECTIONS
   ============================================================ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px 40px;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ============================================================
   CARDS GRID
   ============================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ---------- Card ---------- */
.card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.card:hover {
    border-color: rgba(29, 201, 115, 0.3);
    background: rgba(17, 43, 31, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(29, 201, 115, 0.08);
}

/* Ambient card hover — orange */
.card--ambient:hover {
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.04);
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.06);
}

/* Binaural card hover — purple */
.card--binaural:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.04);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.06);
}

.card--active {
    border-color: var(--accent) !important;
    background: rgba(29, 201, 115, 0.06) !important;
    box-shadow: 0 0 0 1px var(--accent), 0 8px 40px rgba(29, 201, 115, 0.12) !important;
}

.card__icon {
    width: 48px;
    height: 48px;
    background: var(--accent-dim);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 18px;
    transition: background var(--transition);
}

.card--active .card__icon {
    background: var(--accent);
    color: var(--bg-primary);
}

.card__playing-indicator {
    position: absolute;
    top: 28px;
    right: 28px;
    opacity: 0;
    transition: opacity var(--transition);
}

.card--active .card__playing-indicator {
    opacity: 1;
}

/* Base playing indicator color (Noises stay green) */
.card__playing-indicator svg rect {
    fill: #1DC973;
    transition: fill var(--transition);
}

/* Ambient playing indicator — orange */
.card--ambient-active .card__playing-indicator {
    opacity: 1;
}
.card--ambient-active .card__playing-indicator svg rect {
    fill: #F97316;
}

/* Binaural playing indicator — purple */
.card--binaural-active .card__playing-indicator {
    opacity: 1;
}
.card--binaural-active .card__playing-indicator svg rect {
    fill: #A855F7;
}

.card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card__desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
}

.card__status {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-top: 12px;
    height: 16px;
    opacity: 0;
    transition: opacity var(--transition);
}

.card--active .card__status {
    opacity: 1;
}

.card--active .card__status::before {
    content: 'CURRENTLY PLAYING';
}

.card__freq {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.card__freq strong {
    color: var(--text-body);
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section__divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 48px 0 16px;
}

.section__divider-line {
    flex: 1;
    height: 1px;
    background: var(--accent-border);
}

.section__divider-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* ============================================================
   PLAYER BAR
   ============================================================ */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--player-height);
    background: rgba(10, 31, 22, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 200;
}

.player__info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 260px;
    flex-shrink: 0;
}

.player__icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player__track {
    display: flex;
    flex-direction: column;
}

.player__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent);
}

.player__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Controls */
.player__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 auto;
}

.player__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition), transform var(--transition);
}

.player__btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.player__btn:active {
    transform: scale(0.92);
}

.player__btn--play {
    width: 48px;
    height: 48px;
    background: var(--play-bg, rgba(255, 255, 255, 0.15));
    color: white;
}

.player__btn--play:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.player__btn--play svg {
    fill: black !important;
}

/* Right side */
.player__right {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 260px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.player__volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player__btn--vol {
    width: 28px;
    height: 28px;
}

/* Volume Slider */
.player__slider {
    width: 100px;
    height: 4px;
    cursor: pointer;
}

.player__slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.player__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -5px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(29, 201, 115, 0.4);
    transition: transform var(--transition);
}

.player__slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.player__slider::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    border: none;
}

.player__slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(29, 201, 115, 0.4);
}

/* Timer button in player */
.player__timer-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: border-color var(--transition), color var(--transition);
}

.player__timer-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.player__timer-btn svg {
    flex-shrink: 0;
}

.player__timer-btn span {
    min-width: 62px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    display: inline-block;
}

/* Progress bar at bottom of player */
.player__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.player__progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #24e080);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* ============================================================
   TIMER SECTION
   ============================================================ */
.timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 40px 0;
}

.timer__circle {
    position: relative;
    width: 240px;
    height: 240px;
}

.timer__svg {
    width: 100%;
    height: 100%;
}

.timer__display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.timer__presets {
    display: flex;
    gap: 12px;
}

.timer__preset {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition);
}

.timer__preset:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.timer__preset--active,
.timer__preset--active:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.timer__controls {
    display: flex;
    gap: 16px;
}

.timer__btn {
    padding: 12px 36px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition);
}

.timer__btn--start {
    background: var(--accent);
    color: var(--bg-primary);
}

.timer__btn--start:hover {
    background: #24e080;
    box-shadow: 0 4px 20px rgba(29, 201, 115, 0.3);
}

.timer__btn--reset {
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.timer__btn--reset:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   POMODORO SECTION
   ============================================================ */
.pomodoro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 32px 0;
}

.pomodoro__phase {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    background: rgba(29, 201, 115, 0.08);
    border: 1px solid rgba(29, 201, 115, 0.2);
    border-radius: var(--radius-pill);
    transition: all 0.4s ease;
}

.pomodoro__phase--break {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
}

.pomodoro__phase--long {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
}

.pomodoro__phase-emoji {
    font-size: 1.4rem;
}

.pomodoro__phase-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    text-transform: uppercase;
    transition: color 0.4s ease;
}

.pomodoro__phase--break .pomodoro__phase-label {
    color: #F59E0B;
}

.pomodoro__phase--long .pomodoro__phase-label {
    color: #3B82F6;
}

.pomodoro__round {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.pomodoro__circle {
    position: relative;
    width: 240px;
    height: 240px;
}

.pomodoro__svg {
    width: 100%;
    height: 100%;
}

.pomodoro__progress {
    transition: stroke 0.4s ease;
}

.pomodoro__display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

/* Seek slider */
.pomodoro__seek-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 280px;
}

.pomodoro__seek-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    opacity: 0.6;
}

.pomodoro__seek {
    width: 100%;
    height: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.pomodoro__seek::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.pomodoro__seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -5px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(29, 201, 115, 0.4);
}

.pomodoro__seek::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    border: none;
}

.pomodoro__seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

/* Presets */
.pomodoro__presets {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.pomodoro__preset-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pomodoro__preset-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.pomodoro__preset-row {
    display: flex;
    gap: 8px;
}

.pomodoro__preset {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition);
}

.pomodoro__preset:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pomodoro__preset--active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* Controls */
.pomodoro__controls {
    display: flex;
    gap: 12px;
}

.pomodoro__btn {
    padding: 12px 32px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition);
}

.pomodoro__btn--start {
    background: var(--accent);
    color: var(--bg-primary);
}

.pomodoro__btn--start:hover {
    background: #24e080;
    box-shadow: 0 4px 20px rgba(29, 201, 115, 0.3);
}

.pomodoro__btn--skip {
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.pomodoro__btn--skip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pomodoro__btn--reset {
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.pomodoro__btn--reset:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ============================================================
   SETTINGS SECTION
   ============================================================ */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 24px 28px;
    background: var(--bg-secondary);
    gap: 16px;
}

.settings-item__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.settings-item__desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex: 1;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    transition: background var(--transition);
}

.toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
}

.toggle input:checked+.toggle__slider {
    background: var(--accent);
}

.toggle input:checked+.toggle__slider::before {
    transform: translateX(22px);
}

/* Settings Select */
.settings-select {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition);
    min-width: 160px;
}

.settings-select:hover,
.settings-select:focus {
    border-color: var(--accent);
    outline: none;
}

.settings-select option,
.settings-select optgroup {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.settings-cycles {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-cycles__total {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Player Pomodoro indicator (Emoji) */
.player__pomo-indicator {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    margin: 0 4px 0 0;
    padding: 0;
    animation: bounce-emoji 2s infinite;
    filter: drop-shadow(0 0 4px rgba(29, 201, 115, 0.3));
}

@keyframes bounce-emoji {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ============================================================
   BACK LINK (inside in-app article sections)
   ============================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    font-family: var(--font);
    padding: 0;
    margin-bottom: 30px;
    transition: opacity var(--transition);
    text-decoration: none;
}

.back-link:hover {
    opacity: 0.75;
}

/* ============================================================
   ABOUT / LEARN SECTION
   ============================================================ */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-article {
    background: var(--bg-secondary);
    padding: 32px 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
}

.about-article h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.about-article p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-article p:last-child {
    margin-bottom: 0;
}

.about-article strong {
    color: var(--accent);
    font-weight: 600;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-list li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    padding-left: 20px;
}

.about-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 1.2;
}

.mt-8 {
    margin-top: 32px;
}

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
.pwa-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 32px;
    background: linear-gradient(135deg, rgba(29, 201, 115, 0.15), rgba(29, 201, 115, 0.08));
    border-bottom: 1px solid rgba(29, 201, 115, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: pwa-slide-down 0.4s ease;
}

@keyframes pwa-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-banner__content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 500;
}

.pwa-banner__icon {
    flex-shrink: 0;
}

.pwa-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-banner__btn {
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
}

.pwa-banner__btn--install {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
}

.pwa-banner__btn--install:hover {
    background: #24e080;
    box-shadow: 0 2px 12px rgba(29, 201, 115, 0.3);
}

.pwa-banner__btn--dismiss {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 50%;
}

.pwa-banner__btn--dismiss:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   BINAURAL BEATS
   ============================================================ */
.binaural-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-pill);
    color: #C084FC;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 28px;
    width: fit-content;
}

.cards-grid--binaural {
    grid-template-columns: repeat(4, 1fr);
}

.card--binaural .card__icon--binaural {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
}

.card--binaural.card--binaural-active {
    border-color: #A855F7 !important;
    background: rgba(168, 85, 247, 0.06) !important;
    box-shadow: 0 0 0 1px #A855F7, 0 8px 40px rgba(168, 85, 247, 0.12) !important;
}

.card--binaural.card--binaural-active .card__icon--binaural {
    background: #A855F7;
    color: var(--bg-primary);
    animation: pulse-glow-purple 2s infinite;
}

.card--binaural.card--binaural-active .card__playing-indicator--binaural {
    opacity: 1;
}

.card--binaural .card__playing-indicator--binaural {
    opacity: 0;
    transition: opacity var(--transition);
    position: absolute;
    top: 28px;
    right: 28px;
}

.card--binaural.card--binaural-active .card__status--binaural {
    opacity: 1;
    color: #A855F7;
}

.card__status--binaural::before {
    content: '';
}

.card--binaural.card--binaural-active .card__status--binaural::before {
    content: 'ACTIVE';
}

@keyframes pulse-glow-purple {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
    }
}

.binaural-volume {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    width: fit-content;
}

.binaural-volume__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #C084FC;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.binaural-volume__slider {
    width: 160px;
    height: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.binaural-volume__slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 2px;
}

.binaural-volume__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #A855F7;
    margin-top: -5px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.4);
}

.binaural-volume__slider::-moz-range-track {
    height: 4px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 2px;
    border: none;
}

.binaural-volume__slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #A855F7;
    border: none;
    cursor: pointer;
}

/* ============================================================
   AMBIENT SOUNDS
   ============================================================ */
.cards-grid--ambient {
    grid-template-columns: repeat(3, 1fr);
}

.card--ambient .card__icon {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
}

.card--ambient.card--ambient-active {
    border-color: #F97316 !important;
    background: rgba(249, 115, 22, 0.06) !important;
    box-shadow: 0 0 0 1px #F97316, 0 8px 40px rgba(249, 115, 22, 0.12) !important;
}

.card--ambient.card--ambient-active .card__icon {
    background: #F97316;
    color: var(--bg-primary);
    animation: pulse-glow-orange 2s infinite;
}

.card--ambient.card--ambient-active .card__playing-indicator {
    opacity: 1;
}

.card--ambient .card__playing-indicator {
    opacity: 0;
    transition: opacity var(--transition);
    position: absolute;
    top: 28px;
    right: 28px;
}

.card--ambient.card--ambient-active .card__status {
    opacity: 1;
    color: #F97316;
}

.card__status::before {
    content: '';
}

.card--ambient.card--ambient-active .card__status::before {
    content: 'ACTIVE';
}

@keyframes pulse-glow-orange {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
    }
}

.ambient-volume {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    width: fit-content;
}

.ambient-volume__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #F97316;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ambient-volume__slider {
    width: 160px;
    height: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.ambient-volume__slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(249, 115, 22, 0.2);
    border-radius: 2px;
}

.ambient-volume__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #F97316;
    margin-top: -5px;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.4);
}

.ambient-volume__slider::-moz-range-track {
    height: 4px;
    background: rgba(249, 115, 22, 0.2);
    border-radius: 2px;
    border: none;
}

.ambient-volume__slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #F97316;
    border: none;
    cursor: pointer;
}

/* Noise volume slider — green override */
#noise-volume-wrap .ambient-volume__label {
    color: #1DC973;
}

#noise-volume-wrap .ambient-volume__slider::-webkit-slider-runnable-track {
    background: rgba(29, 201, 115, 0.2);
}

#noise-volume-wrap .ambient-volume__slider::-webkit-slider-thumb {
    background: #1DC973;
    box-shadow: 0 0 6px rgba(29, 201, 115, 0.4);
}

#noise-volume-wrap .ambient-volume__slider::-moz-range-track {
    background: rgba(29, 201, 115, 0.2);
}

#noise-volume-wrap .ambient-volume__slider::-moz-range-thumb {
    background: #1DC973;
}

/* ============================================================
   VISUALIZER
   ============================================================ */
.visualizer {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 80px;
    height: 80px;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.visualizer.visualizer--active {
    display: flex;
}

.visualizer__circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
    animation: breathe 2s ease-in-out infinite;
}

.visualizer--ambient .visualizer__circle {
    background: #F97316;
}

.visualizer--binaural .visualizer__circle {
    background: #A855F7;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    50% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-grid--binaural {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-grid--ambient {
        grid-template-columns: repeat(2, 1fr);
    }

    .main {
        padding: 32px 24px 40px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
    }

    .header__nav {
        gap: 20px;
    }

    .header__nav-link {
        font-size: 0.82rem;
    }

    .main {
        padding: 24px 16px 40px;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cards-grid--binaural {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-grid--ambient {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
        min-height: unset;
    }

    .player {
        padding: 0 16px;
    }

    .player__info {
        min-width: unset;
    }

    .player__name {
        font-size: 0.8rem;
    }

    .player__volume {
        display: none;
    }

    .player__right {
        min-width: unset;
    }

    .player__timer-btn span {
        display: none;
    }

    .timer__display {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .header__profile {
        display: none;
    }

    .header__logo {
        margin-right: 12px;
    }

    .header__logo-text {
        display: none;
    }

    .player__controls {
        gap: 8px;
    }

    .player__btn--play {
        width: 40px;
        height: 40px;
    }

    .timer__circle {
        width: 180px;
        height: 180px;
    }
}

/* ============================================================
   MODAL DIALOG
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: modalFadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
    padding: 36px 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(29, 201, 115, 0.08);
    animation: modalSlideUp 0.25s ease;
}

.modal__icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 28px;
}

.modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal__btn {
    padding: 11px 28px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
}

.modal__btn--cancel {
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    background: transparent;
}

.modal__btn--cancel:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.modal__btn--confirm {
    background: #ef4444;
    color: white;
    border: none;
}

.modal__btn--confirm:hover {
    background: #dc2626;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(29, 201, 115, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(29, 201, 115, 0);
    }
}

.card--active .card__icon {
    animation: pulse-glow 2s infinite;
}

/* Smooth entrance animation for cards */
.card {
    animation: fadeInUp 0.5s ease both;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}