/* ==========================================================================
   SKB - Sehat Kaya Bahagia (Premium Design System)
   ========================================================================== */

/* --- Core Theme Variables --- */
:root {
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* 1. Midnight Aura (Default Purple Theme) */
body.theme-midnight {
    --primary-hue: 270;
    --accent-hue: 45;
    
    --primary: hsl(var(--primary-hue), 85%, 66%);
    --primary-glow: hsla(var(--primary-hue), 85%, 66%, 0.3);
    --primary-dark: hsl(var(--primary-hue), 90%, 15%);
    --accent: hsl(var(--accent-hue), 100%, 60%);
    --accent-glow: hsla(var(--accent-hue), 100%, 60%, 0.25);
    
    --bg-color: #0c0418;
    --bg-gradient: radial-gradient(circle at 50% 50%, #1a0933 0%, #080211 100%);
    
    --card-bg: rgba(25, 14, 45, 0.45);
    --card-border: rgba(168, 85, 247, 0.15);
    --card-hover-border: rgba(168, 85, 247, 0.35);
    --card-glow: rgba(168, 85, 247, 0.08);
    
    --text-main: #f3e8ff;
    --text-muted: #a78bfa;
    --text-dark: #000000;
    
    --color-sehat: #10b981;
    --color-kaya: #f59e0b;
    --color-bahagia: #ec4899;
}

/* 2. Golden Abundance (Amber & Prosperity Theme) */
body.theme-abundance {
    --primary-hue: 35;
    --accent-hue: 195;
    
    --primary: hsl(var(--primary-hue), 90%, 55%);
    --primary-glow: hsla(var(--primary-hue), 90%, 55%, 0.25);
    --primary-dark: hsl(var(--primary-hue), 90%, 10%);
    --accent: hsl(var(--accent-hue), 100%, 50%);
    --accent-glow: hsla(var(--accent-hue), 100%, 50%, 0.25);
    
    --bg-color: #0d0600;
    --bg-gradient: radial-gradient(circle at 50% 50%, #221201 0%, #060300 100%);
    
    --card-bg: rgba(35, 18, 2, 0.45);
    --card-border: rgba(245, 158, 11, 0.15);
    --card-hover-border: rgba(245, 158, 11, 0.35);
    --card-glow: rgba(245, 158, 11, 0.08);
    
    --text-main: #fef3c7;
    --text-muted: #f59e0b;
    --text-dark: #000000;
    
    --color-sehat: #059669;
    --color-kaya: #fbbf24;
    --color-bahagia: #06b6d4;
}

/* 3. Emerald Harmony (Healing Green & Nature Theme) */
body.theme-harmony {
    --primary-hue: 155;
    --accent-hue: 45;
    
    --primary: hsl(var(--primary-hue), 80%, 45%);
    --primary-glow: hsla(var(--primary-hue), 80%, 45%, 0.25);
    --primary-dark: hsl(var(--primary-hue), 90%, 10%);
    --accent: hsl(var(--accent-hue), 100%, 60%);
    --accent-glow: hsla(var(--accent-hue), 100%, 60%, 0.25);
    
    --bg-color: #010906;
    --bg-gradient: radial-gradient(circle at 50% 50%, #032115 0%, #000302 100%);
    
    --card-bg: rgba(3, 27, 18, 0.45);
    --card-border: rgba(16, 185, 129, 0.15);
    --card-hover-border: rgba(16, 185, 129, 0.35);
    --card-glow: rgba(16, 185, 129, 0.08);
    
    --text-main: #ecfdf5;
    --text-muted: #34d399;
    --text-dark: #000000;
    
    --color-sehat: #34d399;
    --color-kaya: #fbbf24;
    --color-bahagia: #ff7e67;
}

/* --- Base Resets & Layout --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.8s ease, background-image 0.8s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Dynamic Background Ambient Glow --- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
    transition: var(--transition-smooth);
}
.bg-glow-1 {
    width: 45vw;
    height: 45vw;
    background: var(--primary);
    top: -10vw;
    right: -5vw;
    animation: floatGlow1 20s infinite alternate ease-in-out;
}
.bg-glow-2 {
    width: 35vw;
    height: 35vw;
    background: var(--accent);
    bottom: -10vw;
    left: -5vw;
    animation: floatGlow2 25s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8%, 8%) scale(1.15); }
}
@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, -8%) scale(1.1); }
}

/* Floating particles background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(105vh) scale(0.3);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-5vh) scale(1.2);
        opacity: 0;
    }
}

/* --- App Header Layout --- */
.app-header {
    padding: 24px 0;
    position: sticky;
    top: 0;
    background: rgba(var(--bg-color), 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-ring {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--primary-glow);
    position: relative;
    animation: logoPulse 4s infinite alternate;
}
.logo-icon {
    font-size: 24px;
}
.logo-text h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 2px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-tagline {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

@keyframes logoPulse {
    0% { transform: scale(1); box-shadow: 0 8px 24px var(--primary-glow); }
    100% { transform: scale(1.05); box-shadow: 0 8px 30px var(--accent-glow); }
}

/* Header Controls Area */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Control Buttons & Dropdowns */
.control-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.control-btn .icon {
    font-size: 16px;
}

/* Streak Widget */
.streak-widget {
    background: rgba(255, 107, 0, 0.12);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: #ff9d42;
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: help;
    transition: var(--transition-bounce);
}
.streak-widget:hover {
    transform: scale(1.05);
    background: rgba(255, 107, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}
.streak-icon {
    font-size: 18px;
    animation: flameFlicker 1.5s infinite alternate ease-in-out;
}
@keyframes flameFlicker {
    0% { transform: scale(0.9) rotate(-3deg); }
    100% { transform: scale(1.1) rotate(3deg); filter: drop-shadow(0 0 4px #ff6b00); }
}

/* Theme Dropdown Menu */
.theme-dropdown {
    position: relative;
}
.theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(18, 10, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 210px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition-bounce);
    z-index: 110;
}
.theme-dropdown:hover .theme-menu,
.theme-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.theme-opt {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}
.theme-opt:hover {
    background: rgba(255, 255, 255, 0.08);
}
.theme-opt.active {
    background: var(--primary-glow);
    color: var(--text-main);
    font-weight: 600;
}
.theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.theme-dot.midnight { background: #6a0dad; }
.theme-dot.abundance { background: #f59e0b; }
.theme-dot.harmony { background: #10b981; }

/* Ambient Sound Popover */
.sound-widget {
    position: relative;
}
.sound-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(18, 10, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 280px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition-bounce);
    z-index: 110;
}
.sound-widget:hover .sound-popover,
.sound-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.popover-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.freq-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}
.freq-opt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.freq-opt span {
    display: block;
    font-weight: 400;
    font-size: 9px;
    opacity: 0.7;
    margin-top: 2px;
}
.freq-opt:hover {
    background: rgba(255, 255, 255, 0.12);
}
.freq-opt.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.volume-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.volume-slider-wrap input {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    accent-color: var(--primary);
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* --- Hero Section Styles --- */
.hero-section {
    padding: 60px 0 40px 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.hero-content {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: white;
}
.gradient-text {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerGlow 6s linear infinite alternate;
}
.hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

/* --- Glassmorphic Premium Cards --- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255,255,255,0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--card-glow), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.glass-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 30px var(--card-glow);
}

/* Section Header in Cards */
.section-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
}
.section-step {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}
.section-title {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 700;
    color: white;
    margin: 5px 0 10px 0;
}
.section-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

/* Inputs grid & textareas */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}
.input-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}
.label-icon {
    font-size: 18px;
}
.textarea-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}
textarea {
    width: 100%;
    min-height: 160px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px;
    color: white;
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.7;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
}
textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 20px var(--primary-glow);
}
.textarea-decor {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: var(--transition-smooth);
}
textarea:focus + .textarea-decor {
    width: 100%;
}

/* Premium Options Row */
.generator-options {
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inline-label {
    margin-right: 15px;
    font-weight: 600;
    font-size: 14px;
}
.premium-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.premium-select:focus {
    border-color: var(--primary);
}
.premium-select option {
    background: #110925;
    color: white;
}

/* --- Premium Glow Buttons --- */
.glow-button {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, hsl(var(--primary-hue), 85%, 50%) 50%, var(--accent) 100%);
    color: white;
    font-size: 17px;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--primary-glow);
    transition: var(--transition-bounce);
}
.glow-button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 40px var(--primary-glow), 0 0 15px var(--accent-glow);
}
.glow-button:active {
    transform: translateY(-1px);
}
.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.8s ease;
}
.glow-button:hover .btn-glow {
    left: 100%;
}

/* --- Dashboard Section & Stats --- */
.dashboard-section {
    margin-top: 40px;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease;
}

/* Stats Summary Box */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 30px;
    margin-bottom: 30px;
}
.stat-box {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: white;
}

/* Progress bar inside stats */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 100px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.25, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Controls in dashboard */
.dashboard-controls {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.premium-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.premium-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.checkin-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
.checkin-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.checkin-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}
.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.secondary-btn:hover {
    color: white;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.03);
}

/* --- Tabs Design --- */
.tabs-container {
    margin: 35px 0 25px 0;
}
.tabs-list {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.tab-trigger {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 16px 20px;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
}
.tab-trigger:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}
.tab-trigger.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}
.tab-emoji {
    font-size: 18px;
}
.tab-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    color: white;
}

/* --- Affirmations Grid & Cards --- */
.affirmation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.affirmation-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    transition: var(--transition-bounce);
}
.affirmation-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

/* Custom Checkbox Design */
.checkbox-wrap {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 3px;
}
.custom-chk {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: var(--transition-smooth);
}
.affirmation-card:hover .checkmark {
    border-color: var(--primary);
}
.custom-chk:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.custom-chk:checked ~ .checkmark:after {
    display: block;
}

/* Text Content of Affirmation Cards */
.affirmation-details {
    flex: 1;
}
.affirmation-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.affirmation-text {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
}

/* Read / Checked state style modifications */
.affirmation-card.read {
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.03);
}
.affirmation-card.read .affirmation-text {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: line-through;
}
.affirmation-card.read .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Card tools */
.card-tools {
    opacity: 0;
    margin-left: auto;
    align-self: center;
    transition: var(--transition-smooth);
}
.affirmation-card:hover .card-tools {
    opacity: 1;
}
.card-tool-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    transition: var(--transition-smooth);
}
.card-tool-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Immersive Fullscreen Zen Mode --- */
.zen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #06020c;
    background-image: radial-gradient(circle at 50% 50%, #15092a 0%, #030007 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.zen-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Floating soft light for Zen Mode meditation */
.zen-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseZenGlow 8s infinite alternate ease-in-out;
}
@keyframes pulseZenGlow {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

/* Zen Header */
.zen-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.zen-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
    color: white;
}
.zen-timer {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid var(--accent-glow);
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
}
.zen-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.zen-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* Zen Core Content Container */
.zen-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 20px;
}
.zen-card-wrapper {
    text-align: center;
    max-width: 800px;
    margin-bottom: 50px;
}
.zen-category-tag {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 25px;
}
.zen-affirmation-box {
    margin-bottom: 25px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zen-text {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.5;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zenFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zenFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
.zen-number {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* Zen Toolbar controls */
.zen-toolbar {
    display: flex;
    gap: 15px;
}
.zen-tool-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}
.zen-tool-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.zen-tool-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Zen Navigation Buttons */
.zen-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    pointer-events: none;
    z-index: 5;
}
.zen-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    pointer-events: auto;
}
.zen-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: scale(1.08);
}
.zen-nav-btn:active {
    transform: scale(0.95);
}

/* --- Wallpaper Modal & Canvas preview --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.modal.hidden {
    opacity: 0;
    pointer-events: none;
}
.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(5, 2, 10, 0.85);
    backdrop-filter: blur(10px);
}
.modal-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    width: 90%;
    text-align: center;
    padding: 30px;
    animation: modalBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalBounce {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.modal-close:hover {
    color: white;
}
.modal h4 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: white;
    margin-bottom: 8px;
}
.modal-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}
.canvas-preview-wrap {
    width: 100%;
    max-height: 400px;
    border-radius: 16px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.4);
    margin-bottom: 25px;
    scrollbar-width: none;
}
.canvas-preview-wrap::-webkit-scrollbar {
    display: none;
}
#wallpaperCanvas {
    width: 100%;
    display: block;
    height: auto;
    border-radius: 16px;
}
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Confetti Particles --- */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2500;
    pointer-events: none;
    display: none;
}

/* --- Shared Utility Classes --- */
.hidden {
    display: none !important;
}

/* --- Animations Utility --- */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes shimmerGlow {
    0% { filter: drop-shadow(0 0 5px var(--primary-glow)); }
    100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 46px;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 16px 0;
    }
    .header-wrap {
        flex-direction: column;
        gap: 15px;
    }
    .hero-section {
        padding: 30px 0 20px 0;
    }
    .hero-title {
        font-size: 34px;
    }
    .hero-desc {
        font-size: 15px;
    }
    .glass-card {
        padding: 24px;
    }
    .input-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    .progress-bar-container {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .dashboard-controls {
        justify-content: center;
        flex-direction: column;
    }
    .dashboard-controls button {
        width: 100%;
        justify-content: center;
    }
    .tabs-list {
        flex-direction: column;
        gap: 4px;
    }
    .tab-trigger {
        padding: 12px;
        font-size: 14px;
    }
    .affirmation-grid {
        grid-template-columns: 1fr;
    }
    .zen-text {
        font-size: 24px;
    }
    .zen-controls {
        padding: 0 15px;
    }
    .zen-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* --- Sticky Glassmorphic Progress Footer --- */
.sticky-progress-footer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 580px;
    z-index: 999;
    background: rgba(18, 10, 35, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    padding: 12px 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 
                0 0 15px var(--primary-glow),
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
    animation: stickySlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    transition: var(--transition-smooth);
}

@keyframes stickySlideIn {
    0% { transform: translateX(-50%) translateY(100px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.sticky-footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
}

.sticky-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: var(--transition-bounce);
}
.sticky-stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}
.sticky-stat-item:active {
    transform: scale(0.95);
}

/* Category-specific Active Highlights */
#stickyTabKesehatan.active {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
#stickyTabKekayaan.active {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}
#stickyTabKebahagiaan.active {
    background: rgba(139, 92, 246, 0.22);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.sticky-emoji {
    font-size: 18px;
}

.sticky-label {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sticky-count {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sticky-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
}

/* Make sure footer doesn't get overlapped by the sticky bar */
.app-footer {
    padding-top: 40px;
    padding-bottom: 110px; /* offset for sticky progress footer */
    text-align: center;
    width: 100%;
}
.footer-copy {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-align: center;
}
.footer-tip {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Mobile optimization for sticky footer */
@media (max-width: 580px) {
    .sticky-progress-footer {
        border-radius: 24px;
        padding: 10px 15px;
        max-width: 92%;
        bottom: 12px;
    }
    .sticky-footer-wrap {
        gap: 6px;
    }
    .sticky-stat-item {
        padding: 4px 6px;
        flex-direction: column;
        gap: 2px;
        align-items: center;
        flex: 1;
    }
    .sticky-label {
        font-size: 10px;
        letter-spacing: 0;
    }
    .sticky-count {
        font-size: 11px;
        padding: 1px 6px;
    }
    .sticky-emoji {
        font-size: 14px;
    }
    .sticky-divider {
        height: 32px;
    }
}

/* --- Interactive Manifestation Guide Accordion Styles --- */
.guide-accordion {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.guide-accordion:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.guide-trigger {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    text-align: left;
    gap: 12px;
}
.guide-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.guide-icon {
    font-size: 18px;
    display: inline-block;
    animation: floatGuide 3s infinite alternate ease-in-out;
}
@keyframes floatGuide {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-2px) scale(1.15); filter: drop-shadow(0 0 5px var(--accent-glow)); }
}
.guide-arrow {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-content {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}
.guide-content.hidden {
    display: none !important;
}

.guide-inner-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 30px;
}
.guide-col h5 {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-rules-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.guide-rules-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.rule-num {
    background: var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--primary);
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-rules-list li strong {
    display: block;
    font-size: 13.5px;
    color: white;
    margin-bottom: 4px;
}
.guide-rules-list li p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

.example-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.example-box:last-of-type {
    margin-bottom: 0;
}
.example-bad {
    color: #ef4444;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 8px;
    opacity: 0.85;
}
.example-good {
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

/* Media Query Stack for Collapsible Guide */
@media (max-width: 768px) {
    .guide-inner-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .guide-trigger {
        padding: 15px 18px;
        font-size: 13px;
    }
    .guide-content {
        padding: 18px;
    }
}
