* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
}

/*  Navigation  */

.nav {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 24px 0;
    border-bottom: 1px solid #e0e0e0;
}

.nav a {
    text-decoration: none;
    color: #666;
}

.nav a.active {
    color: #111;
    border-bottom: 2px solid #bbb;
}

/*  Game Layout  */

main {
    margin-left: 180px;
    padding: 30px;
}

/*  Tasks  */

#tasks {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.task {
    padding: 14px 34px;
    border-radius: 16px;
    border: 2px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.task.active {
    background: #ffcf9f;
    border-color: #d19a5a;
}

/*  Status  */

#status {
    width: 260px;
    margin: 20px 0;
}

.bar {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.focus-bar {
    background: #9ecbff;
}

.dopamine-bar {
    background: #ffd37d;
}

/*  Workspace  */

#workspace {
    position: relative;
    width: 900px;
    height: 520px;
    margin: 30px auto;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
}

.task-area {
    display: none;
    height: 100%;
    align-items: center;
    justify-content: center;
}

#workspace[data-task="1"] #task1 {
    display: flex;
}

#workspace[data-task="2"] #task2 {
    display: flex;
}

/*  Task 1  */

.task-circle {
    width: 50px;
    height: 50px;
    background: #bcdcff;
    border-radius: 50%;
    position: absolute;
}

/*  Task 2  */

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 50px);
    gap: 16px;
}

.tile {
    width: 50px;
    height: 50px;
    background: #d8d0ff;
    border-radius: 8px;
    cursor: pointer;
}

.tile.odd {
    background: #ffe1a8;
}

/*  Distraction  */

.distraction {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: gold;
    cursor: pointer;
}

/*  Floating  */

.floating-window {
    position: absolute;
    padding: 12px 18px;
    background: #fff3d6;
    border-radius: 14px;
    border: 2px solid #d4b483;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    transition: 0.4s;
}

.floating-window.show {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/*  Low Focus  */

.low-focus #workspace {
    filter: blur(3px);
}

/*  Game Over  */

#gameOverOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding-top: 200px;
}

main[data-game="over"] #gameOverOverlay {
    display: block;
}