:root {
    --bg-dark: #080a0f;
    --panel-bg: rgba(15, 20, 30, 0.7);
    --accent-blue: #00d1ff;
    --accent-green: #00ffa3;
    --accent-gold: #ffcc00;
    --text-main: #e0f0ff;
    --text-dim: #8a9ba8;
    --border: rgba(0, 209, 255, 0.1);
    --neon-blur: 0 0 15px rgba(0, 209, 255, 0.3);
}

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

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

#fluidCanvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.4;
}

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

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

.logo span {
    color: var(--accent-blue);
    text-shadow: 0 0 10px var(--accent-blue);
}

.main-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: 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: 0 0 10px var(--accent-blue);
}

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

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

/* Main Layout */
.chrono-main {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 80px);
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.panel-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--accent-blue);
}

.panel-header p {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* Sidebar: Tasks */
.task-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.task-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    color: white;
    outline: none;
}

.task-input-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: white;
    border-radius: 6px;
    padding: 4px;
}

.task-input-group button {
    background: var(--accent-blue);
    border: none;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

.task-item:hover {
    border-color: var(--accent-blue);
}

.task-item.active {
    background: rgba(0, 209, 255, 0.1);
    border-color: var(--accent-blue);
}

.task-info h4 {
    font-size: 14px;
}

.task-info span {
    font-size: 11px;
    color: var(--text-dim);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-blue), #0055ff);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--neon-blur);
    width: 100%;
}

/* Center: Visualizer */
.visualizer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hourglass-wrapper {
    width: 250px;
    height: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glass-top,
.glass-bottom {
    width: 200px;
    height: 180px;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.glass-top {
    border-radius: 100px 100px 20px 20px;
    margin-bottom: 10px;
}

.glass-bottom {
    border-radius: 20px 20px 100px 100px;
    margin-top: 10px;
}

.glass-neck {
    width: 30px;
    height: 20px;
    background: var(--border);
}

.liquid-source {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--accent-blue), transparent);
    transition: height 1s linear;
}

.liquid-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, var(--accent-green), transparent);
    transition: height 1s linear;
}

.drip {
    width: 4px;
    height: 10px;
    background: var(--accent-blue);
    position: absolute;
    left: 13px;
    top: -10px;
    border-radius: 2px;
    display: none;
}

.timer-readout {
    margin-top: 40px;
    text-align: center;
}

#timerDisplay {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    color: var(--accent-blue);
}

#activeTaskLabel {
    font-size: 18px;
    color: var(--text-dim);
    margin-top: 5px;
}

/* Focus Bar */
.focus-bar-container {
    width: 80%;
    margin-top: 40px;
    padding: 15px;
}

.bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    background: var(--accent-green);
    transition: 0.5s;
    box-shadow: 0 0 10px var(--accent-green);
}

/* Right Sidebar: Distractions */
.distraction-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 10px;
    color: white;
    border-radius: 6px;
    margin-bottom: 15px;
    outline: none;
}

#distractionLog {
    list-style: none;
    font-size: 12px;
    color: var(--text-dim);
}

#distractionLog li {
    padding: 5px;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

.huberman-tip {
    margin-top: auto;
    background: rgba(255, 204, 0, 0.05);
    border-left: 2px solid var(--accent-gold);
    padding: 15px;
    border-radius: 8px;
}

.huberman-tip h4 {
    font-size: 13px;
    color: var(--accent-gold);
    margin-bottom: 5px;
}

.huberman-tip p {
    font-size: 11px;
    line-height: 1.4;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    max-width: 400px;
    text-align: center;
}

.reward-stat {
    font-size: 32px;
    color: var(--accent-gold);
    margin: 20px 0;
}

.modal-content button {
    background: var(--accent-blue);
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    color: white;
    font-weight: 700;
    cursor: pointer;
}