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

body {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    overflow: hidden; /* Prevent scrolling for parallax */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #050505; /* Warna dasar gelap agar tidak silau/biru */
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #080808; 
    z-index: 9999; /* Paling atas menutupi semua */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
    max-width: 800px;
    padding: 0 40px;
    animation: pulseText 3s infinite ease-in-out;
}

.preloader-content .verse-text {
    font-size: 1.8rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.preloader-content .verse-ref {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

@keyframes pulseText {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}
/* --- END PRELOADER --- */

/* Multi-layered Parallax Background */
.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.layer {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    pointer-events: none; /* Cegah interaksi langsung */
    user-select: none; /* Cegah seleksi */
    -webkit-user-drag: none; /* Cegah drag gambar */
}

/* Gambar untuk masing-masing layer dengan Drop Shadow (Bayangan) */
.layer-bg { 
    background-image: url('assets/layers/bg.webp'); 
}
.layer-cat { 
    background-image: url('assets/layers/kucing.webp'); 
    --shadow: drop-shadow(-5px 10px 10px rgba(0,0,0,0.4));
    filter: var(--shadow);
    transition: filter 0.3s ease;
}
.layer-person { 
    background-image: url('assets/layers/orang.webp'); 
    --shadow: drop-shadow(-10px 15px 20px rgba(0,0,0,0.5));
    filter: var(--shadow);
    transition: filter 0.3s ease;
}
.layer-bible { 
    background-image: url('assets/layers/alkitab.webp'); 
    --shadow: drop-shadow(-15px 20px 30px rgba(0,0,0,0.6));
    --shadow: drop-shadow(-15px 20px 30px rgba(0,0,0,0.3));
    filter: var(--shadow);
    transition: filter 0.3s ease;
}

/* Efek bercahaya saat disentuh (hover) */
.layer.highlighted {
    filter: brightness(1.05) drop-shadow(0 0 6px rgba(255, 255, 255, 0.15)) !important;
}

/* Center Clock & Date */
.center-clock {
    position: absolute;
    top: 15%; /* Sedikit di atas agar tidak terlalu menutupi orangnya */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    z-index: 0;
    pointer-events: none; /* Supaya klik tembus ke layar parallax di bawahnya */
    font-family: 'Inter', sans-serif;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

#clock-time {
    font-size: 5.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: -5px;
}

#clock-date {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.blink {
    animation: blinker 2s ease-in-out infinite;
}

@keyframes blinker {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* 3D UI Hologram Layer */
.ui-layer {
    z-index: 1; /* Di atas background, di bawah cat/person */
    pointer-events: none; /* Layer utama tembus pandang */
    display: block;
}

.layer {
    pointer-events: none; /* Clicks pass through all parallax image layers */
}

/* Transparent Widgets are now handled by .glass-widget completely */
/* Removed redundant declarations to ensure clean CSS architecture */

/* Timer Widget (Top Right) */
.timer-widget {
    top: 25%;
    right: 8%;
    width: 250px;
}

.timer-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#time-left {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 1.2em;
}

.digit-box {
    height: 1.1em;
    overflow: hidden;
}

.digit-slider {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.digit-slider div {
    height: 1.1em;
    line-height: 1.1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-controls, .music-controls {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    align-items: center;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Compact Music Widget (Bottom Left) */
.music-widget {
    bottom: 10%;
    left: 8%;
    width: auto;
    padding: 0.5rem 1rem;
}

.music-controls-compact {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.icon-btn-small {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
}

.icon-btn-small:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.svg-icon-small, .svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none; /* Klik tembus langsung ke tombol */
}

.visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.visualizer .bar {
    width: 3px;
    background-color: #f6d365;
    border-radius: 2px;
    height: 3px;
    transition: height 0.2s ease;
}

.visualizer.playing .bar {
    animation: bounceBar 0.8s ease-in-out infinite alternate;
}

.visualizer.playing .bar:nth-child(1) { animation-delay: 0.0s; }
.visualizer.playing .bar:nth-child(2) { animation-delay: 0.3s; }
.visualizer.playing .bar:nth-child(3) { animation-delay: 0.1s; }
.visualizer.playing .bar:nth-child(4) { animation-delay: 0.4s; }

@keyframes bounceBar {
    0% { height: 3px; }
    100% { height: 16px; }
}

.now-playing-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.music-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.volume-container {
    position: relative;
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.music-widget:hover .volume-container {
    height: 15px;
    opacity: 1;
    margin-top: 8px;
}

#volume-slider {
    -webkit-appearance: none;
    width: calc(100% - 20px); /* Beri ruang aman 10px di kiri dan kanan */
    height: 15px;
    background: transparent;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s;
    margin-top: -3.5px; /* (3/2) - (10/2) = 1.5 - 5 = -3.5 */
    border: none;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Verse Widget (Bottom Right) */
.verse-widget {
    bottom: 8%;
    right: 8%;
    width: 320px;
    max-width: 80vw;
}

/* Environment Widget (Top Left) */
.env-widget {
    pointer-events: auto; /* Memastikan UI tetap bisa diklik */
    position: fixed;
    top: 5%;
    left: 5%;
    display: flex;
    gap: 0.8rem;
    z-index: 99999;
}

/* Night Mode Lighting */
.layer-lighting {
    opacity: 0;
    transition: opacity 2s ease;
    mix-blend-mode: multiply;
    background: radial-gradient(circle at 40% 60%, rgba(255, 180, 50, 0.1) 0%, rgba(20, 30, 60, 0.7) 60%, rgba(5, 10, 20, 0.95) 100%);
    pointer-events: none;
    z-index: 10;
}

body.night-mode .layer-lighting {
    opacity: 1;
}

/* Screensaver Mode */
body.screensaver-mode .glass-widget,
body.screensaver-mode .env-widget {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.95);
}

/* Base Glassmorphism Panel (Now fully floating, transparent) */
.glass-widget {
    pointer-events: auto; /* Memastikan UI tetap bisa diklik */
    position: absolute;
    background: transparent;
    color: white;
    text-shadow: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.glass-widget:hover {
    transform: translateY(-2px);
}

/* Animasi Gelembung (Speech Bubble) */
.zzz-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    border-bottom-left-radius: 4px; /* Efek ekor gelembung (tail) */
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    text-align: center;
    min-width: 40px;
}

@keyframes floatZzz {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { opacity: 1; transform: translateY(-10px) scale(1.1); }
    80% { opacity: 0.9; transform: translateY(-30px) scale(1); }
    100% { transform: translateY(-40px) scale(0.8); opacity: 0; }
}

.verse-text {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth spring-like easing */
    transform: translateY(0) scale(1);
    filter: blur(0);
    opacity: 1;
}

.verse-text.fade-out {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    filter: blur(5px);
}

.verse-text p {
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.verse-ref {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fda085;
}

.text-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.text-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Language Toggle */
.lang-toggle-widget {
    position: fixed;
    top: 5%;
    right: 5%;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    pointer-events: auto;
    z-index: 99999;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    font-family: 'Inter', sans-serif;
    padding: 0;
}

.lang-btn.active {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 15px rgba(255,255,255,0.6);
    transform: scale(1.05);
}

.lang-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

.lang-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

/* --- FOCUS BOARD (TO-DO LIST) --- */

.focus-board-panel {
    position: fixed;
    top: 0;
    left: -400px; /* Hidden by default */
    width: 350px;
    height: 100vh;
    background: rgba(15, 18, 25, 0.65);
    backdrop-filter: blur(20px) saturate(150%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    padding: 30px 20px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.focus-board-panel.open {
    transform: translateX(400px);
}

.focus-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.focus-board-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(165, 180, 252, 0.2);
    letter-spacing: -0.5px;
}

.focus-board-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    line-height: 1;
}

.focus-board-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

.focus-board-input-container {
    margin-bottom: 25px;
}

#new-task-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 14px 16px;
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#new-task-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(165, 180, 252, 0.3);
    border-bottom: 2px solid #a5b4fc;
    box-shadow: 0 10px 20px -10px rgba(165, 180, 252, 0.2);
}

#new-task-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

/* Custom Scrollbar for task list */
.task-list::-webkit-scrollbar {
    width: 4px;
}
.task-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}
.task-list::-webkit-scrollbar-track {
    background: transparent;
}

.task-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.task-checkbox {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    flex-shrink: 0;
}

.task-checkbox:checked {
    background: #818cf8;
    border-color: #818cf8;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

.task-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

.task-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    flex-grow: 1;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    word-break: break-word;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.3);
}

.task-item.completed {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    opacity: 0.8;
}

.task-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0 5px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.task-item:hover .task-delete {
    opacity: 1;
    transform: scale(1);
}

.task-delete:hover {
    color: #f87171;
    transform: scale(1.1) !important;
}

/* Copyright Text */
.copyright-text {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    user-select: none;
    z-index: 100;
    letter-spacing: 1px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
