/**
 * Theme: Reactor
 * Direction: A biometric performance lab centered on cardiovascular load and urgency.
 */

[data-theme="reactor"] {
    --theme-primary: #ff3b30;
    --theme-primary-light: #ff766e;
    --theme-secondary: #d8ff3e;
    --theme-accent: #ff9f0a;
    --theme-gradient: linear-gradient(135deg, #ff3b30, #ff7a20);
    --theme-bg-dark: #0d0e10;
    --theme-bg-medium: #181a1e;
    --theme-bg-glow-1: rgba(255, 59, 48, 0.11);
    --theme-bg-glow-2: rgba(216, 255, 62, 0.04);
    --theme-bg-glow-3: transparent;
    --theme-card-bg: #181a1e;
    --theme-card-border: rgba(255, 255, 255, 0.11);
    --theme-card-border-hover: #ff3b30;
    --theme-card-glow: rgba(255, 59, 48, 0.22);
    --theme-btn-bg: #22252a;
    --theme-btn-border: #42464d;
    --theme-btn-hover-bg: #ff3b30;
    --theme-btn-glow: inset 0 -3px 0 rgba(0, 0, 0, 0.3);
    --theme-btn-glow-hover: 0 0 24px rgba(255, 59, 48, 0.35);
    --theme-connected-bg: #d8ff3e;
    --theme-connected-border: #d8ff3e;
    --theme-connected-glow: 0 0 18px rgba(216, 255, 62, 0.3);
    --theme-text-accent: #ff766e;
    --theme-text-secondary-accent: #d8ff3e;
    --theme-shadow-glow: 0 0 28px rgba(255, 59, 48, 0.22);
    --theme-shadow-card: 0 16px 42px rgba(0, 0, 0, 0.34);
    --theme-progress-bg: linear-gradient(90deg, #ff3b30, #ff9f0a);
    --theme-progress-glow: 0 0 18px rgba(255, 59, 48, 0.55);
    --font-primary: "DM Mono", monospace;
    --font-display: "Rajdhani", sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

[data-theme="reactor"] body {
    background-image:
        radial-gradient(circle at 18% 34%, rgba(255, 59, 48, 0.12), transparent 25%),
        linear-gradient(180deg, #0d0e10, #181a1e);
}

[data-theme="reactor"] body::before {
    background-image: repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.025) 79px 80px);
}

[data-theme="reactor"] .container {
    max-width: 1760px;
    padding-top: 34px;
}

[data-theme="reactor"] .header {
    margin: 0 auto 22px;
    text-align: left;
}

[data-theme="reactor"] .header::before {
    content: "LIVE / BIOMETRIC ENGINE / READY";
    display: block;
    margin-bottom: 10px;
    color: #d8ff3e;
    font-size: 0.62rem;
    letter-spacing: 2px;
}

[data-theme="reactor"] .header__title {
    background: none;
    color: #f4f4ef;
    font-size: clamp(3rem, 6vw, 6.5rem);
    font-style: italic;
    line-height: 0.78;
    letter-spacing: -5px;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
}

[data-theme="reactor"] .header__title::after {
    content: "/VO2";
    margin-left: 12px;
    color: #ff3b30;
    font-size: 0.34em;
    letter-spacing: 0;
    vertical-align: top;
}

[data-theme="reactor"] .header__subtitle {
    margin-top: 16px;
    color: #8f949c;
    font-size: 0.66rem;
    letter-spacing: 4px;
}

[data-theme="reactor"] .connection-panel {
    justify-content: flex-start;
    gap: 8px;
    padding: 10px;
    background: #181a1e;
    border: 1px solid #30343a;
    border-radius: 12px;
    box-shadow: var(--theme-shadow-card);
    backdrop-filter: none;
}

[data-theme="reactor"] .workout-picker {
    border-left: 4px solid #ff3b30;
}

[data-theme="reactor"] .btn {
    padding: 11px 16px;
    border-width: 1px;
    border-radius: 7px;
    font-size: 0.68rem;
    letter-spacing: 0.7px;
}

[data-theme="reactor"] .btn::before {
    display: none;
}

[data-theme="reactor"] .btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

[data-theme="reactor"] .btn.connected {
    color: #0d0e10;
}

[data-theme="reactor"] .status-message {
    width: max-content;
    max-width: 100%;
    margin: 0 auto 18px 0;
    padding: 7px 13px;
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.35);
    border-radius: 99px;
    color: #ff918b;
    font-size: 0.65rem;
    text-align: left;
    text-shadow: none;
}

[data-theme="reactor"] .status-message::before {
    content: "SIGNAL // ";
    color: #ff3b30;
}

[data-theme="reactor"] .two-column-layout {
    grid-template-columns: minmax(500px, 0.95fr) minmax(500px, 1.05fr);
    gap: 14px;
    margin-top: 14px;
}

[data-theme="reactor"] .column {
    gap: 14px;
}

[data-theme="reactor"] .workout-section,
[data-theme="reactor"] .metric-card {
    background: #181a1e;
    border: 1px solid #30343a;
    box-shadow: var(--theme-shadow-card);
    backdrop-filter: none;
}

[data-theme="reactor"] .workout-section {
    padding: 22px;
    margin-bottom: 0;
}

[data-theme="reactor"] .section-title {
    color: #f4f4ef;
    font-size: 0.68rem;
    letter-spacing: 2px;
}

[data-theme="reactor"] .section-title::before {
    content: "01";
    margin-right: 9px;
    color: #ff3b30;
}

[data-theme="reactor"] .hr-zone-section {
    padding: 22px;
    border-color: rgba(255, 59, 48, 0.38);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 59, 48, 0.1), transparent 38%),
        #181a1e;
}

[data-theme="reactor"] .hr-zone-header {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

[data-theme="reactor"] .hr-zone-title {
    color: #8f949c;
    font-family: "DM Mono", monospace;
    font-size: 0.64rem;
    letter-spacing: 2px;
}

[data-theme="reactor"] .hr-zone-content {
    gap: 24px;
}

[data-theme="reactor"] .hr-display {
    position: relative;
    display: grid;
    place-content: center;
    width: min(330px, 72vw);
    aspect-ratio: 1;
    margin-top: 8px;
    border: 22px solid #282c31;
    border-top-color: #ff3b30;
    border-right-color: #ff3b30;
    border-radius: 50%;
    background: #111316;
    box-shadow:
        0 0 0 2px #3b4047,
        0 0 50px rgba(255, 59, 48, 0.18),
        inset 0 0 42px rgba(0, 0, 0, 0.55);
}

[data-theme="reactor"] .hr-display::after {
    content: "CARDIO LOAD";
    position: absolute;
    top: 22%;
    width: 100%;
    color: #737980;
    font-size: 0.56rem;
    letter-spacing: 2px;
}

[data-theme="reactor"] .hr-display__value,
[data-theme="reactor"] .metric-card__value,
[data-theme="reactor"] .phase-timer {
    background: none;
    color: #f4f4ef;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}

[data-theme="reactor"] .hr-display__value {
    font-size: clamp(6rem, 10vw, 9rem);
    font-style: italic;
    letter-spacing: -7px;
    filter: drop-shadow(0 0 20px rgba(255, 59, 48, 0.25));
}

[data-theme="reactor"] .hr-display__unit {
    margin-top: -8px;
    color: #ff766e;
    font-size: 0.68rem;
}

[data-theme="reactor"] .hr-display__zone {
    margin-top: 8px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #ff3b30;
    border-radius: 99px;
    color: #ff918b;
    font-size: 0.68rem;
}

[data-theme="reactor"] .zone-bars__container {
    gap: 5px;
}

[data-theme="reactor"] .zone-box {
    min-height: 105px;
    padding: 10px 5px;
    background: #202328;
    border: 0;
    border-top: 5px solid currentColor;
    border-radius: 7px;
}

[data-theme="reactor"] .zone-box__content {
    padding: 3px;
    background: transparent;
}

[data-theme="reactor"] .zone-box__name {
    font-size: 0.68rem;
}

[data-theme="reactor"] .zone-box__desc,
[data-theme="reactor"] .zone-box__range {
    color: #90959c;
    font-size: 0.56rem;
}

[data-theme="reactor"] .zone-box__number {
    color: #f4f4ef;
    font-size: 1.8rem;
    opacity: 0.14;
}

[data-theme="reactor"] .metrics-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
    margin-bottom: 0;
}

[data-theme="reactor"] .metric-card {
    grid-column: span 2;
    padding: 15px 8px;
    border-radius: 9px;
    box-shadow: none;
}

[data-theme="reactor"] .metric-card:nth-child(4),
[data-theme="reactor"] .metric-card:nth-child(5) {
    grid-column: span 3;
}

[data-theme="reactor"] .metric-card::before {
    display: none;
}

[data-theme="reactor"] .metric-card:hover {
    transform: translateY(-2px);
    background: #1e2126;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="reactor"] .metric-card__label {
    margin-bottom: 9px;
    color: #777d85;
    font-size: 0.52rem;
    letter-spacing: 0.8px;
}

[data-theme="reactor"] .metric-card__value {
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    font-style: italic;
}

[data-theme="reactor"] .metric-card:first-child .metric-card__value {
    color: #ff766e;
}

[data-theme="reactor"] .metric-card__value--small {
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
}

[data-theme="reactor"] .metric-card__unit {
    color: #d8ff3e;
    font-size: 0.57rem;
}

[data-theme="reactor"] .metric-card__zone,
[data-theme="reactor"] .metric-card__status {
    font-size: 0.62rem;
}

[data-theme="reactor"] .column--right > .workout-section:first-of-type {
    border-color: rgba(255, 59, 48, 0.38);
}

[data-theme="reactor"] .current-phase {
    color: #ff766e;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-shadow: none;
}

[data-theme="reactor"] .phase-timer {
    font-size: clamp(7rem, 12vw, 12rem);
    font-style: italic;
    line-height: 0.78;
    letter-spacing: -9px;
}

[data-theme="reactor"] .progress-bar {
    height: 12px;
    background: #0d0e10;
    border: 1px solid #30343a;
    border-radius: 99px;
}

[data-theme="reactor"] .progress-bar__fill {
    border-radius: 99px;
}

[data-theme="reactor"] .progress-bar__fill::after {
    display: none;
}

[data-theme="reactor"] .phase-item,
[data-theme="reactor"] .zone-card {
    background: #202328;
    border: 1px solid #30343a;
    border-left: 5px solid #42474f;
    border-radius: 7px;
    box-shadow: none;
}

[data-theme="reactor"] .phase-item:hover,
[data-theme="reactor"] .zone-card:hover {
    transform: translateX(2px);
    border-left-color: #ff3b30;
}

[data-theme="reactor"] .phase-item.active {
    background: rgba(255, 59, 48, 0.15);
    border-color: #ff3b30;
    box-shadow: 0 0 24px rgba(255, 59, 48, 0.14);
    animation: reactorPulse 1.4s ease-in-out infinite;
}

[data-theme="reactor"] .theme-switcher {
    background: #181a1e;
    border-color: #42464d;
}

@keyframes reactorPulse {
    50% {
        border-color: #ff8d87;
    }
}

@media (max-width: 1200px) {
    [data-theme="reactor"] .two-column-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    [data-theme="reactor"] .container {
        padding: 26px 4px 64px;
    }

    [data-theme="reactor"] .header__title {
        font-size: 3.1rem;
        letter-spacing: -3px;
    }

    [data-theme="reactor"] .btn {
        flex: 1 1 130px;
    }

    [data-theme="reactor"] .hr-display {
        border-width: 16px;
    }

    [data-theme="reactor"] .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    [data-theme="reactor"] .metric-card,
    [data-theme="reactor"] .metric-card:nth-child(4),
    [data-theme="reactor"] .metric-card:nth-child(5) {
        grid-column: span 1;
    }

    [data-theme="reactor"] .metric-card:last-child {
        grid-column: span 2;
    }

    [data-theme="reactor"] .phase-timer {
        font-size: 6.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="reactor"] .phase-item.active {
        animation: none;
    }
}
