/* ==========================================================================
   CSS Custom Properties (Luxury Theme - DARK MODE ONLY)
   ========================================================================== */
:root {
    /* Palette Luxury: Gold & Deep Blue */
    --primary-gold: #d4af37;
    --secondary-gold: #f3e5ab;
    
    --dark-bg: #050505;
    --dark-card: rgba(20, 20, 30, 0.7);
    --dark-surface: #0f111a;
    --sidebar-bg: #0a0a0a;
    
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    --accent-glow: rgba(212, 175, 55, 0.15);
    --glass-border: rgba(212, 175, 55, 0.2);
    
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
    --border-radius: 4px;
    
    --header-height: 70px;
}

/* ==========================================================================
   Global Styles & Resets
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--secondary-gold), var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    color: var(--primary-gold);
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
    text-align: justify;
    color: var(--text-main);
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
}

code {
    font-family: 'Fira Code', monospace;
    background-color: rgba(212, 175, 55, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--secondary-gold);
}

/* ==========================================================================
   Preloader
   ========================================================================== */
@keyframes pulse-luxury {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-content img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse-luxury 2s infinite;
    filter: drop-shadow(0 0 10px var(--primary-gold));
}

.preloader-text {
    color: var(--primary-gold);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
}

/* ==========================================================================
   Header
   ========================================================================== */
header {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
}

.logo i {
    margin-right: 0.5rem;
}

/* THEME TOGGLE STYLES DIHAPUS */

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 320px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    z-index: 99;
    overflow-y: auto;
    transition: transform 0.3s ease;
    padding-bottom: 2rem;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.1), transparent);
    border-bottom: 1px solid var(--glass-border);
    color: var(--primary-gold);
    text-align: center;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav > ul > li {
    margin-bottom: 0.2rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(212, 175, 55, 0.05);
    color: var(--primary-gold);
    border-left: 3px solid var(--primary-gold);
}

.sidebar-nav i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Nested Navigation */
.nested-nav {
    display: none;
    background-color: rgba(0, 0, 0, 0.2);
}

.nested-nav.active {
    display: block;
}

.nested-nav a {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

.nested-nav .nested-nav a {
    padding-left: 3.5rem;
    font-size: 0.8rem;
}

.nested-nav .nested-nav .nested-nav a {
    padding-left: 4.5rem;
    font-size: 0.75rem;
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    position: fixed;
    left: 15px;
    top: calc(var(--header-height) + 15px);
    background: var(--primary-gold);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 101;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-left: 350px; /* Offset for sidebar */
    transition: margin-left 0.3s ease;
}

.content-section {
    background-color: var(--dark-card);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Code Blocks */
pre {
    background-color: #0d0d0d;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-gold);
    position: relative;
}

pre code {
    background: none;
    padding: 0;
    color: #a5b3ce;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-gold), #b4941f);
    color: var(--dark-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    color: var(--dark-bg);
    text-decoration: none;
}

.btn i { margin-left: 10px; }

/* Alerts */
.alert {
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-gold);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.05), transparent);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.alert ul { margin-left: 1.5rem; margin-top: 1rem; }
.alert li { margin-bottom: 0.5rem; color: var(--text-main); }

/* Overlay (Mobile) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 98;
    display: none;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1199px) {
    .sidebar {
        width: 100%;
        left: 0;
        top: var(--header-height);
        transform: translateX(-100%);
        max-height: 70vh;
        border-right: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .container {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }
    
    header { padding: 0 1rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

@media (min-width: 1200px) {
    .sidebar-toggle { display: none; }
    .container { padding-left: 350px; }
}
