/* ==========================================
   1. RESET & STYLES DASAR
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #0f172a;
    color: #f8fafc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden !important;
}

/* ==========================================
   2. HEADER & BRANDING (ANIMATED ENTRY)
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #38bdf8;
    margin-left: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.brand-title:hover {
    transform: scale(1.05);
    color: #60a5fa;
}

.menu-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.25s ease;
}

.menu-btn:hover {
    color: #38bdf8;
    transform: scale(1.15) rotate(5deg);
}

/* ==========================================
   3. SIDEBAR NAVIGATION & OVERLAY (ANIMATED)
   ========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #1e293b;
    z-index: 10000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.25s ease;
}

.close-sidebar-btn:hover {
    color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    flex: 1;
}

.sidebar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav a:hover,
.sidebar-nav a.active-page {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    font-weight: 600;
    transform: translateX(8px);
}

.sidebar-user-box {
    margin-top: auto;
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease;
}

.sidebar-user-box:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ==========================================
   4. CONTAINER CONTENT (ENTRANCE ANIMATION)
   ========================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 90px 20px 40px 20px;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.container h2 {
    color: #f8fafc;
    font-size: 1.75rem;
    margin-bottom: 8px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.container p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tombol Aksi Utama dengan Animasi Hover & Ripple Fade */
.btn-action {
    display: inline-block;
    padding: 12px 24px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, background-color 0.25s ease;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-blue {
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-blue:hover {
    background: #1d4ed8;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.5);
}

.btn-green {
    background: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-green:hover {
    background: #059669;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
}

/* ==========================================
   5. GALERI GRID & CARD FOTO (ANIMATED)
   ========================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease, border-color 0.35s ease;
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(56, 189, 248, 0.5);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.card:hover img {
    transform: scale(1.08);
}

.card-info {
    padding: 14px;
    text-align: center;
    background: rgba(15, 23, 42, 0.85);
    position: relative;
    z-index: 2;
    transition: background 0.3s ease;
}

.card:hover .card-info {
    background: rgba(15, 23, 42, 0.95);
}

.card-info p {
    margin: 0;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease;
}

.delete-btn:hover {
    transform: scale(1.2) rotate(90deg);
    background: rgba(220, 38, 38, 1);
}

/* ==========================================
   6. LIGHTBOX MODAL (ANIMATED OVERLAY & IMAGE)
   ========================================== */
#lightbox {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999 !important;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    animation: fadeIn 0.25s ease-out;
}

#lightbox.active {
    display: flex !important;
}

.lightbox-img-content {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: auto;
    display: block;
}

.close-lightbox-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 45px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    z-index: 10000000;
    line-height: 1;
    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-lightbox-btn:hover {
    color: #ef4444;
    transform: scale(1.2) rotate(90deg);
}

/* ==========================================
   7. MODAL LOGIN (ANIMATED POPUP & INPUTS)
   ========================================== */
.modal-login-container {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999 !important;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease-out;
}

.modal-content-animated {
    background: #1e293b;
    padding: 2rem;
    border-radius: 14px;
    width: 90%;
    max-width: 380px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    animation: popUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Input Focus Animation */
.modal-content-animated input {
    width: 100%;
    padding: 11px;
    margin-bottom: 12px;
    border: 1px solid #475569;
    background: #0f172a;
    color: white;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.modal-content-animated input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    transform: scale(1.01);
}

/* ==========================================
   8. FOOTER (ANIMATED LINK)
   ========================================== */
.footer {
    text-align: center;
    padding: 25px 20px;
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
    animation: fadeIn 0.8s ease-out;
}

.footer a {
    color: #94a3b8;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #38bdf8;
}

/* ==========================================
   9. ANIMAIS KEYFRAMES DEDIKASI
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes popUp {
    from {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}