:root {
    --bg-dark: #05070a;
    --panel-bg: rgba(20, 25, 35, 0.7);
    --accent-blue: #00f2ff;
    --accent-green: #39ff14;
    --accent-purple: #bc13fe;
    --text-primary: #e0faff;
    --text-dim: #88a0b0;
    --glass-border: rgba(0, 242, 255, 0.2);
    --neon-glow: 0 0 15px rgba(0, 242, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
}

#app-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.glow-sphere {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

/* Header */
.glass-header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-blue);
    text-shadow: var(--neon-glow);
}

.training-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    position: relative;
    opacity: 0.7;
}

.nav-link:visited {
    color: #ffffff !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue) !important;
    opacity: 1;
    text-shadow: var(--neon-glow);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-blue);
    box-shadow: var(--neon-glow);
    border-radius: 2px;
}

.proto-info {
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.audio-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--accent-blue);
}

/* Stage Management */
.stage {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
}

.stage.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Components */
.content-box {
    text-align: center;
    max-width: 600px;
}

.content-box.wide {
    max-width: 800px;
}

.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
}

.subtitle {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 40px;
    line-height: 1.6;
}

.btn-primary {
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 16px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-blue);
    color: var(--bg-dark);
    box-shadow: var(--neon-glow);
}

.btn-primary.pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 242, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0);
    }
}

/* Huberman Focus Stage */
.anchor-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 40px 0;
}

.anchor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--accent-blue);
}

.anchor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 242, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: breathingRing 4s ease-in-out infinite;
}

@keyframes breathingRing {

    0%,
    100% {
        width: 40px;
        height: 40px;
        opacity: 0.1;
    }

    50% {
        width: 180px;
        height: 180px;
        opacity: 0.5;
    }
}

.focus-timer {
    font-size: 64px;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-blue);
}

.breathing-guide {
    font-size: 18px;
    color: var(--text-dim);
    margin-top: 20px;
    height: 1.5em;
}

/* Decomposition Stage */
.input-group {
    text-align: left;
    margin-bottom: 30px;
}

.input-group label,
.subtasks-container label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    color: #fff;
    padding: 15px;
    font-size: 18px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--accent-blue);
}

.subtask-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.subtask-row .num {
    color: var(--accent-blue);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* Timer Stage */
.flow-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 1100px;
}

.timer-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.visual-timer {
    position: relative;
    width: 300px;
    height: 300px;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-base {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.timer-progress {
    fill: none;
    stroke: var(--accent-blue);
    stroke-width: 4;
    stroke-dasharray: 283;
    /* 2 * PI * 45 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    font-family: 'Orbitron', sans-serif;
}

.current-focus {
    margin-top: 30px;
    font-size: 20px;
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.glass-panel h3 {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--accent-blue);
}

.catch-input {
    display: flex;
    gap: 10px;
}

.catch-input button {
    background: var(--accent-blue);
    color: var(--bg-dark);
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
}

#distractionList {
    margin-top: 15px;
    list-style: none;
    max-height: 120px;
    overflow-y: auto;
}

#distractionList li {
    font-size: 13px;
    color: var(--text-dim);
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#activeSubtasks {
    list-style: none;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 16px;
    cursor: pointer;
}

.subtask-item input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.subtask-item.completed {
    color: var(--text-dim);
    text-decoration: line-through;
    opacity: 0.6;
}

/* Reward Stage */
.reward-content {
    text-align: center;
}

.reward-icon {
    font-size: 100px;
    margin-bottom: 30px;
    animation: rewardFloat 3s ease-in-out infinite;
}

@keyframes rewardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.stat-item .val {
    display: block;
    font-size: 32px;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-green);
}

.stat-item .lbl {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
}