:root {
    --bg-dark: #070B14;
    --surface-calm: #111827;
    --calm-blue: #38BDF8;
    --calm-green: #34D399;
    --amber-warm: #FBBF24;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
}

body, html {
    height: 100%; margin: 0; 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* Prevent scrolling for immersive view */
}

/* === 5. IMMERSIVE CANVAS-CONTAINER (YT MUSIC STYLE) === */
#canvas-container {
    position: absolute; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1; /* Lowest layer */
}

/* Transparent Overlay to ensure readability */
#ui-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2; /* Middle layer */
    background: linear-gradient(180deg, rgba(7,11,20,0.4) 0%, rgba(7,11,20,0.85) 100%);
    display: flex; flex-direction: column;
}

/* Nav Minimalist over the wave */
.navbar-minimalist {
    background: transparent;
    padding: 1rem;
}
.btn-icon-back {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.05);
    border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

/* === 2. UI DURASI ADAPTIF === */
.duration-selector {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px; display: flex; gap: 4px;
    max-width: 320px; margin: 0 auto;
}
.duration-btn {
    background: transparent; border: none;
    color: var(--text-muted);
    padding: 8px 16px; border-radius: 50px;
    flex: 1; font-weight: 500; font-size: 0.9rem;
    transition: all 0.2s ease;
}
.duration-btn.active {
    background: var(--surface-calm);
    color: var(--calm-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Main controls area grouped at bottom-center */
#main-controls {
    flex-grow: 1;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding-bottom: 8vh;
}

.timer-display { 
    font-family: 'Nunito', sans-serif; 
    font-size: 4rem; 
    color: var(--text-main); 
    font-weight: 700;
    line-height: 1; margin: 2rem 0 1rem;
}

/* Interaksi Tombol Utama */
.hold-btn-wrapper { position: relative; }
.hold-btn {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: var(--surface-calm);
    border: 3px solid var(--calm-blue);
    color: var(--calm-blue);
    font-weight: 700; font-size: 1.1rem;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; outline: none;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    position: relative; z-index: 5;
}

.hold-btn:active, .hold-btn.active {
    transform: scale(0.9);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    background: rgba(56, 189, 248, 0.05);
}

/* Border progress animation (logic in JS) */
#hold-progress-svg {
    position: absolute; top: -10px; left: -10px;
    width: 150px; height: 150px;
    transform: rotate(-90deg);
    pointer-events: none; z-index: 4;
}
#progress-circle {
    stroke-dasharray: 440; stroke-dashoffset: 440;
    transition: stroke-dashoffset 0.1s linear;
}

.hold-btn i { font-size: 2.5rem; margin-bottom: 2px; }

/* General Modals & Forms */
.modal-content {
    background-color: var(--surface-calm);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
}
.form-control, .form-select, .reflection-area {
    background-color: #0B1120;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
}
.form-control:focus, .form-select:focus, .reflection-area:focus {
    background-color: #0B1120; border-color: var(--calm-blue);
    color: var(--text-main); box-shadow: none;
}

/* Reflection Area (Feature 3) */
.reflection-area { border-radius: 10px; resize: none; font-size: 0.9rem;}

/* Analytics Section (Feature 4) */
.insight-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px; padding: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.log-table td { border-bottom: 1px solid rgba(255,255,255,0.04); padding: 0.8rem 0.5rem; }
.text-log-type { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-outline-custom { border-color: rgba(255,255,255,0.1); color: var(--text-muted); background: rgba(255,255,255,0.03); }
.btn-outline-custom:hover { background-color: rgba(255,255,255,0.08); color: var(--text-main); }