:root {
    --primary-color: #0d6efd;
    --bg-light: #f8f9fa;
    --bg-dark: #121212;
}

body {
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Memberikan ruang di bawah agar tombol melayang tidak menutupi konten */
    padding-bottom: 120px; 
}

[data-bs-theme="dark"] body {
    background-color: var(--bg-dark);
    color: #e9ecef;
}

/* --- GLASSMORPHISM NAVBAR --- */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1030;
}

[data-bs-theme="dark"] .glass-nav {
    background: rgba(30, 30, 30, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- CARDS & FORM --- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efek hover dinonaktifkan di mobile agar tidak mengganggu scroll */
@media (min-width: 992px) {
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    }
}

.dashed-btn {
    border-style: dashed !important;
    border-width: 2px !important;
    font-weight: 600;
}

/* --- TOMBOL MAGIC AI --- */
.magic-btn { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
    border: none; 
    font-weight: 500;
    transition: all 0.3s ease;
}
.magic-btn:hover { 
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); 
    color: white; 
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

/* --- RICH TEXT EDITOR (CONTENT EDITABLE) --- */
[contenteditable="true"] {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 0.375rem 0.75rem;
    outline: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
[contenteditable="true"]:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #6c757d;
    pointer-events: none;
    display: block; /* Mencegah bug placeholder di beberapa browser */
}
[data-bs-theme="dark"] [contenteditable="true"] {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

/* --- FLOATING FOOTER (TOMBOL GENERATE) --- */
.floating-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    z-index: 1020;
}

[data-bs-theme="dark"] .floating-footer {
    background: rgba(30, 30, 30, 0.9);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- MOBILE SPECIFIC TWEAKS --- */
@media (max-width: 576px) {
    /* Font navbar lebih kecil agar muat */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Tombol header (Load/Save/Tema) lebih ringkas */
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Padding container lebih tipis di HP */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Card body lebih rapat */
    .card-body {
        padding: 1rem;
    }

    /* Slider font size full width */
    .form-range {
        width: 100%;
    }
}