/* css/theme.css - UPDATE dengan toggle di hero */
:root {
    /* Light Theme - Cream & White Aesthetic */
    --bg-body: #faf8f5;
    --bg-card: #ffffff;
    --bg-input: #f5f2ed;
    --bg-filter: #f5f2ed;
    --bg-skeleton: #f0ebe5;
    --bg-hover: #f8f5f0;
    --text-primary: #2c2420;
    --text-secondary: #8a7a6e;
    --text-muted: #b8aaa0;
    --border-color: #ece6df;
    --shadow: rgba(44, 36, 32, 0.04);
    --shadow-hover: rgba(44, 36, 32, 0.08);
    --shadow-lg: rgba(44, 36, 32, 0.12);
    --glow: rgba(196, 160, 106, 0.06);
    --blue: #8a7a6e;
    --blue-dark: #5c4e44;
    --green: #7a9a7a;
    --green-light: #edf5ed;
    --red: #b07a6a;
    --red-light: #f5edea;
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --gold: #c4a06a;
    --terracotta: #c47a5a;
    --terracotta-light: #f5ede8;
    --emerald: #7a9a7a;
    --emerald-light: #edf5ed;
    --rose: #c48a7a;
    --rose-light: #f5edea;
    --cream: #f5f0eb;
    --warm-white: #fcfaf8;
}

[data-theme="dark"] {
    --bg-body: #141210;
    --bg-card: #1e1a18;
    --bg-input: #2a2420;
    --bg-filter: #2a2420;
    --bg-skeleton: #2a2420;
    --bg-hover: #282220;
    --text-primary: #f0ebe5;
    --text-secondary: #b8aaa0;
    --text-muted: #6a5e54;
    --border-color: #2e2824;
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-hover: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
    --glow: rgba(196, 160, 106, 0.04);
    --green: #6a9a6a;
    --green-light: #0a1a0a;
    --red: #b07a6a;
    --red-light: #1a1412;
    --terracotta: #c47a5a;
    --terracotta-light: #2a201a;
    --emerald: #6a9a6a;
    --emerald-light: #0a1a0a;
    --rose: #c48a7a;
    --rose-light: #1a1412;
    --cream: #1e1a18;
    --warm-white: #1a1614;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 40px;
    position: relative;
    z-index: 10;
}

/* ============================================
   THEME TOGGLE SWITCH - DI DALAM HERO
   ============================================ */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 8px 14px 8px 16px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.theme-switch-wrapper:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 32px var(--shadow-hover);
    transform: translateY(-2px);
}

.theme-switch-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-switch-label i {
    font-size: 14px;
}

.theme-switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-switch .slider {
    position: absolute;
    inset: 0;
    background: var(--border-color);
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.theme-switch .slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

.theme-switch input:checked + .slider {
    background: var(--terracotta);
}

.theme-switch input:checked + .slider::before {
    transform: translateX(22px);
    background: white;
}

.theme-switch:hover .slider::before {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.theme-switch .slider .icon-light {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 1;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.theme-switch .slider .icon-dark {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.3;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.theme-switch input:checked + .slider .icon-light {
    opacity: 0.3;
}

.theme-switch input:checked + .slider .icon-dark {
    opacity: 1;
    color: white;
}

.theme-mode-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 40px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-mode-label.active {
    color: var(--text-primary);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 32px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 20px 60px var(--shadow-lg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.warning {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

.toast.error {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

.toast.success {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--terracotta);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

::selection {
    background: var(--gold);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .app-container {
        padding: 20px 16px 32px;
    }
    
    .toast {
        padding: 12px 20px;
        font-size: 13px;
        white-space: normal;
        max-width: 92%;
    }
    
    .theme-switch-wrapper {
        padding: 6px 10px 6px 14px;
        gap: 8px;
    }
    
    .theme-switch {
        width: 44px;
        height: 24px;
    }
    
    .theme-switch .slider::before {
        height: 17px;
        width: 17px;
        left: 3px;
        bottom: 3px;
    }
    
    .theme-switch input:checked + .slider::before {
        transform: translateX(20px);
    }
    
    .theme-switch-label {
        font-size: 11px;
    }
    
    .theme-mode-label {
        font-size: 9px;
        min-width: 34px;
    }
    
    .theme-switch .slider .icon-light,
    .theme-switch .slider .icon-dark {
        font-size: 10px;
    }
}