:root {
    --bg-black: #000000;
    --deep-teal: #008080;
    --electric-orange: #FF5733;
    --text-white: #ffffff;
    --font-inter: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body,
html {
    width: 100%;
    height: 100%;
    background: url('../common_assets/background-blur.png') no-repeat center center fixed;
    background-size: cover;
    font-family: var(--font-inter);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 850px;
    background: url('../common_assets/background-blur.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
    border: 8px solid #1a1a1a;
    overflow: hidden;
}

.cuesz-logo {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    z-index: 100;
}

/* Circadian Gradient Background */
.circadian-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to bottom, var(--electric-orange) 0%, var(--bg-black) 50%, var(--deep-teal) 100%);
    filter: blur(20px);
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

/* AI Orb Clock-like pulse */
.orb-container {
    position: absolute;
    top: 12%;
    z-index: 10;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orb-glow {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--electric-orange);
    filter: blur(25px);
    opacity: 0.6;
    z-index: 1;
    animation: clock-pulse 1s steps(2, end) infinite;
    transition: background 0.5s;
}

.orb-outer-glass {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.orb-core {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff 0%, var(--electric-orange) 100%);
    box-shadow: 0 0 15px var(--electric-orange);
    z-index: 2;
    animation: clock-pulse 1s steps(2, end) infinite;
    transition: background 0.5s, box-shadow 0.5s;
}

.orb-container.mode-teal .orb-glow {
    background: var(--deep-teal);
}

.orb-container.mode-teal .orb-core {
    background: radial-gradient(circle at 30% 30%, #fff 0%, var(--deep-teal) 100%);
    box-shadow: 0 0 15px var(--deep-teal);
}

@keyframes clock-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.message-wrapper {
    position: absolute;
    top: 19%;
    width: 100%;
    padding: 0 24px;
    text-align: center;
    z-index: 10;
}

.ai-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    min-height: 60px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--electric-orange);
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Dashboard */
.dashboard {
    position: absolute;
    top: 32%;
    width: 90%;
    max-width: 360px;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dashboard.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dial */
.dial-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* 0 at top */
}

.ring-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.ring-restore {
    stroke: var(--deep-teal);
    transition: d 0.1s;
}

/* Handles */
.handle {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: transform 0.1s;
}

.handle:active {
    transform: translate(-50%, -50%) scale(1.2);
}

.sun-handle {
    border-color: #FFD700;
    color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.moon-handle {
    border-color: #87CEEB;
    color: #87CEEB;
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.5);
}

.mindful-handle {
    width: 24px;
    height: 24px;
    border-color: var(--purple);
    color: var(--purple);
    box-shadow: 0 0 10px var(--purple);
    background: white;
    z-index: 6;
}

/* Readout */
.readout-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 2;
    pointer-events: none;
}

.readout-line {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
    width: 110px;
}

.readout-line .val {
    color: white;
    font-weight: 600;
}

.readout-line.highlight .val {
    color: var(--purple);
}

/* Workout Section */
.workout-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-align: center;
}

.day-selector {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.day-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.day-btn.active {
    background: var(--electric-orange);
    border-color: var(--electric-orange);
    box-shadow: 0 0 15px rgba(255, 87, 51, 0.4);
}

/* Lock Button */
.btn-lock {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--electric-orange);
    color: white;
    border: none;
    margin-top: 10px;
    margin-bottom: 20px;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(255, 87, 51, 0.3);
}

.btn-lock.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    position: absolute;
}

.btn-lock:active {
    transform: scale(0.98);
}