:root {
    --bg: #2d3436;
    --text: #dfe6e9;
    --stress: #d63031;
    --chill: #fdcb6e;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    transition: background-color 1s ease;
}

body.chill-bg {
    background-color: #fab1a0;
    /* soft pink */
}

.app-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    z-index: 10;
}

h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #ff7675;
    margin-bottom: 0.5rem;
    transition: color 1s;
}

.chill-bg h1 {
    color: #fff;
}

p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.stress-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.stress-label {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.stress-bar-bg {
    width: 100%;
    height: 20px;
    background: #636e72;
    border-radius: 10px;
    overflow: hidden;
}

.stress-bar {
    height: 100%;
    background: var(--stress);
    border-radius: 10px;
    transition: width 0.3s ease, background 0.3s ease;
}

.game-board {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.start-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #e17055;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-family: inherit;
    font-weight: 900;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(225, 112, 85, 0.4);
    z-index: 20;
}

.target {
    position: absolute;
    font-size: 3.5rem;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s;
}

.target:active {
    transform: scale(0.8);
}

/* Chill Mode Overlay */
#chill-mode {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 100;
    text-align: center;
    overflow-y: auto;
    background-color: #FAB1A0;
}

#chill-mode.hidden {
    display: none;
}

.chill-title {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chill-chars {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
}

.sunglass-char {
    animation: float 3s ease-in-out infinite alternate;
}

.sunglass-char:nth-child(2) {
    animation-delay: 1.5s;
}

@keyframes float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

.chill-text {
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.5;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: bold;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
    font-size: 0.9rem;
}
.back-btn:active {
    background: rgba(255,255,255,0.4);
}