/* =========================================
   1. MODERN CSS VARIABLES & THEME ENGINE
   ========================================= */
:root {
    /* --- THEME: VOID (DEFAULT) --- */
    --bg-void: #050508;
    --bg-radial: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #000 100%);
    
    /* Glass System */
    --glass-base: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px);
    
    /* Neon Palette */
    --neon-cyan: #00f3ff;
    --neon-pink: #bc13fe;
    --neon-purple: #7a00ff;
    --neon-blue: #2de2e6;
    --neon-acid: #ccff00;
    --brand-gold: #ffd700;
    
    /* System Colors */
    --sys-red: #ff2a2a;
    --sys-green: #00ff88;
    
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Dimensions */
    --header-height: 80px;
    --max-width: 1440px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;

    /* Z-Indices */
    --z-bg: 0;
    --z-content: 10;
    --z-nav: 100;
    --z-modal: 9999;
    --z-admin: 10000;
    --z-fab: 5000;
    --z-dropdown-menu: 1003;
}

/* Global tap highlight removal for mobile */
button, a, input, select, textarea, [role="button"] {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

/* --- THEME: LUMINOUS --- */
[data-theme="luminous"] {
    --bg-void: #f0f2f5;
    --bg-radial: radial-gradient(circle at 50% 50%, #ffffff 0%, #dbe4f0 100%);
    --glass-base: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.9);
    
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    
    --neon-cyan: #008891; 
    --neon-pink: #aa00ff;
}

/* --- THEME: MIDNIGHT --- */
[data-theme="midnight"] {
    --bg-void: #0f0518;
    --bg-radial: radial-gradient(circle at 50% 50%, #240b3b 0%, #0f0518 100%);
    --glass-base: rgba(45, 10, 60, 0.4);
    --glass-border: rgba(188, 19, 254, 0.2);
    
    --neon-cyan: #00e5ff;
    --neon-pink: #ff00ff;
    --text-secondary: #d4b3ff;
}

/* =========================================
   2. GLOBAL RESET & UTILITIES
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    outline: none;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight globally */
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent !important; /* Remove tap highlight on body */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { 
    background: var(--neon-cyan); 
    border-radius: 4px; 
    opacity: 0.5; 
}

button { user-select: none; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rotateSlow { to { transform: rotate(360deg); } }
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(50px, 50px); } }
@keyframes shimmer {
    0% { 
        background-position: -200% center;
    }
    100% { 
        background-position: 200% center;
    }
}

/* =========================================
   3. BACKGROUND FX
   ========================================= */
.fx-wrapper {
    position: fixed; inset: 0; z-index: var(--z-bg);
    pointer-events: none; overflow: hidden;
}

.global-bg {
    position: absolute; inset: 0; background: var(--bg-radial);
    transition: background 0.5s ease;
}

.global-scanlines {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.05));
    background-size: 100% 4px;
    opacity: 0.6; mix-blend-mode: overlay; z-index: 0;
}

.global-noise {
    position: absolute; inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MDAiIGhlaWdodD0iNTAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    opacity: 0.05; mix-blend-mode: screen; z-index: 0;
}

.orb {
    position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4;
    transition: background 0.5s ease;
}
.orb-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--neon-purple); animation: float 20s infinite alternate; }
.orb-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: var(--neon-cyan); animation: float 25s infinite alternate-reverse; }

.home-particles {
    position: absolute; inset: 0;
    background-image: radial-gradient(var(--text-primary) 1px, transparent 1px);
    background-size: 50px 50px; opacity: 0.1; z-index: 0;
}

/* =========================================
   4. NAVIGATION
   ========================================= */
.navbar-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; 
    height: var(--header-height); z-index: var(--z-nav);
    display: flex; align-items: center; justify-content: center;
    padding: 0 2rem;
}

.navbar {
    width: 100%; max-width: var(--max-width); height: 60px;
    background: var(--glass-base); border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur); border-radius: 100px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 2rem; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.brand-logo {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 800;
    letter-spacing: 2px; color: var(--text-primary); text-transform: uppercase;
    cursor: pointer; text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    transition: 0.3s; user-select: none;
}
.brand-logo:hover { color: var(--neon-cyan); text-shadow: 0 0 20px var(--neon-cyan); }

.nav-items { display: flex; gap: 5px; }

.nav-btn {
    background: transparent; border: none; color: var(--text-secondary);
    font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
    padding: 8px 20px; border-radius: 20px; cursor: pointer;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.nav-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-btn.active { color: #000; background: var(--neon-cyan); box-shadow: 0 0 20px var(--neon-cyan); }

/* =========================================
   5. VIEW CONTROLLER
   ========================================= */
.view-screen {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    padding-top: var(--header-height); 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
    transform: scale(0.98) translateY(20px); 
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: var(--z-content); 
    display: flex; 
    flex-direction: column;
    overflow: hidden; /* Prevent view-screen from scrolling, let children handle it */
}
.view-screen.active-view { opacity: 1; visibility: visible; pointer-events: all; transform: scale(1) translateY(0); }

/* =========================================
   6. HERO SECTION
   ========================================= */
.home-content-container {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 2rem; position: relative;
    min-height: calc(100vh - var(--header-height));
}
.cyber-circle {
    position: absolute; width: 600px; height: 600px;
    border: 1px dashed var(--glass-border); border-radius: 50%;
    animation: rotateSlow 60s linear infinite; opacity: 0.3;
}
.home-hero-text { z-index: 2; max-width: 800px; }
.hero-title-main {
    font-family: var(--font-display); 
    font-size: clamp(2rem, 6vw, 5rem); 
    line-height: 1.2; 
    margin-bottom: 2rem;
    background: linear-gradient(
        90deg,
        #a0a0a0 0%,
        #a0a0a0 25%,
        rgba(255,255,255,0.4) 35%,
        #ffffff 45%,
        #ffffff 55%,
        rgba(255,255,255,0.4) 65%,
        #a0a0a0 75%,
        #a0a0a0 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
    filter: drop-shadow(0 0 20px rgba(0,243,255,0.2));
    font-weight: 900;
    letter-spacing: 3px;
    text-align: center;
    white-space: nowrap;
    position: relative;
}
.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.3rem); 
    color: var(--text-secondary); 
    letter-spacing: 3px;
    margin-bottom: 3rem; 
    text-transform: uppercase;
    font-weight: 400;
    text-align: center;
}
.btn-immersive {
    padding: 18px 50px; background: transparent; border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan); font-family: var(--font-display); font-size: 1rem;
    font-weight: 600; letter-spacing: 2px; border-radius: 50px; cursor: pointer;
    transition: all 0.4s ease; box-shadow: 0 0 15px rgba(0,243,255,0.1);
}
.btn-immersive:hover {
    background: var(--neon-cyan); color: #000; box-shadow: 0 0 50px var(--neon-cyan);
    transform: translateY(-3px);
}

/* =========================================
   7. SHARED LAYOUT (GALLERY/SHOP)
   ========================================= */
.gallery-layout {
    display: flex; 
    flex-direction: column; 
    height: 100%;
    min-height: 0; /* Important for flex children to scroll */
    width: 100%; 
    max-width: var(--max-width); 
    margin: 0 auto;
}
.gallery-control-bar { 
    padding: 10px 2rem; 
    flex-shrink: 0;
    position: relative;
    z-index: 1000; /* Ensure control bar is above grid */
}
.gallery-header-aligner {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--glass-base); border: 1px solid var(--glass-border);
    padding: 1.5rem 2rem; border-radius: var(--border-radius-md);
    backdrop-filter: var(--glass-blur);
    position: relative;
    z-index: 1001; /* Higher than control bar */
}
.gallery-title-small {
    font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary);
    text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.gallery-title-small::before {
    content: ''; width: 8px; height: 8px; background: var(--sys-green);
    border-radius: 50%; box-shadow: 0 0 10px var(--sys-green);
}
/* Scroll Fix: Padding dihilangkan dari container, dipindah ke wrapper dalam agar scrollbar menempel */
.gallery-scroll-container {
    flex: 1; 
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 0 !important;
    margin-top: 20px; 
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    position: relative; /* Ensure loading overlay positioning works */
}
/* Hide scrollbar Chrome/Safari */
.gallery-scroll-container::-webkit-scrollbar {
    display: none;
}
/* Wrapper untuk padding konten agar tidak mepet */
.gallery-viewport { 
    width: 100%; 
    padding: 0 2rem 120px 2rem; /* Bottom padding for footer space */
    position: relative;
    z-index: 1; /* Below dropdown */
    min-height: 100%; /* Ensure full height coverage */
}
.gallery-grid, .shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px; width: 100%;
    position: relative;
    z-index: 1; /* Below dropdown */
}
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
}
.loading-overlay.active {
    pointer-events: all;
}
.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =========================================
   8. CARDS
   ========================================= */
.fish-card, .shop-card {
    background: var(--glass-base); border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md); overflow: hidden; cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; display: flex; flex-direction: column;
    z-index: 1; /* Ensure cards are below dropdown */
}
.shop-pin-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    font-size: 0.9rem;
}
.shop-pin-badge i {
    transform: rotate(-45deg);
}
.fish-card { aspect-ratio: 4/3; }
.fish-card:hover, .shop-card:hover {
    transform: translateY(-8px) scale(1.01); border-color: var(--neon-cyan);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.fish-card img, .shop-img-wrapper img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease;
}
.fish-card:hover img, .shop-card:hover img { transform: scale(1.1); }

.shop-img-wrapper {
    width: 100%; aspect-ratio: 4/3; overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}
.shop-info {
    padding: 1.5rem; flex: 1; display: flex; flex-direction: column;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}
.shop-name {
    font-family: var(--font-display); font-size: 1.1rem; color: var(--text-primary);
    margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-price {
    font-size: 1.1rem; font-weight: 700; color: var(--neon-acid); margin-bottom: 1rem;
}
.shop-meta {
    font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 1rem;
    display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: 1px;
}
.shop-stock-ok { color: var(--sys-green); }
.shop-stock-low { color: var(--sys-red); }
.shop-actions { 
    margin-top: auto; 
    display: flex; 
    gap: 10px; 
    align-items: center;
}
.shop-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2px;
}
.shop-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    line-height: 1;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important; /* Remove blue tap highlight */
    -webkit-touch-callout: none !important; /* Disable callout on iOS */
    user-select: none !important; /* Prevent text selection */
    touch-action: manipulation !important; /* Optimize touch response */
    outline: none !important; /* Remove focus outline */
    -webkit-appearance: none !important; /* Remove default styling */
    appearance: none !important;
}
.shop-qty-btn:hover:not(:disabled) {
    background: var(--neon-cyan);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0,243,255,0.5);
}
.shop-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.shop-qty {
    width: 50px; 
    padding: 8px 4px; 
    border: none;
    background: transparent;
    color: var(--text-primary); 
    text-align: center; 
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}
.shop-qty::-webkit-outer-spin-button,
.shop-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.shop-qty:focus { 
    outline: none;
}
.shop-btn-buy {
    flex: 1; padding: 10px; border-radius: 8px; border: none; background: var(--neon-cyan);
    color: #000; font-family: var(--font-display); font-weight: 700;
    cursor: pointer; transition: 0.3s;
}
.shop-btn-buy:hover:not(:disabled) { box-shadow: 0 0 20px var(--neon-cyan); letter-spacing: 1px; }
.shop-btn-buy:disabled { background: #333; color: #666; cursor: not-allowed; }

/* =========================================
   9. DROPDOWN
   ========================================= */
.dropdown-component { 
    position: relative; 
    width: 220px; 
    font-family: var(--font-display);
    z-index: 1002 !important; /* Ensure dropdown container is above other elements */
}
.dd-trigger {
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    color: var(--neon-cyan); padding: 12px 20px; border-radius: 50px;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: 0.3s; font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
    user-select: none; /* Prevent text selection */
}
.dd-trigger:hover { border-color: var(--neon-cyan); background: rgba(0, 243, 255, 0.05); }
.dd-menu {
    position: absolute; top: calc(100% + 10px); right: 0; width: 100%;
    background: #0a0a0a; border: 1px solid var(--glass-border); border-radius: 12px;
    overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s ease; z-index: 1003 !important; /* Higher z-index than container */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.dropdown-component.active .dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-option {
    padding: 12px 20px; color: var(--text-secondary); cursor: pointer;
    transition: 0.2s; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dd-option:hover { background: var(--neon-cyan); color: #000; font-weight: 600; }
.test-loading-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.3);
    color: var(--neon-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.test-loading-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
    transform: rotate(180deg);
    box-shadow: 0 0 15px rgba(0,243,255,0.5);
}

/* =========================================
   10. SOCIAL HUB
   ========================================= */
.social-layout { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 2rem;
}
.social-info-box {
    background: var(--glass-base);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 3rem;
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.social-info-box:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 243, 255, 0.1);
}
.social-info-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--glass-border);
}
.social-info-icon {
    font-size: 1.6rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}
.social-info-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.social-info-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
}
.social-info-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.social-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}
.social-info-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.social-item-icon {
    font-size: 2rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
    margin-bottom: 0.3rem;
}
.social-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}
.social-item-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.social-item-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
.social-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 0.5rem 0;
}
.social-connect-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
}
.social-connect-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.social-connect-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
.social-grid { 
    display: flex; 
    gap: 2rem; 
    flex-wrap: wrap; 
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}
.social-card {
    width: 160px; 
    height: 160px; 
    background: var(--glass-base);
    border: 1px solid var(--glass-border); 
    border-radius: var(--border-radius-lg);
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    text-decoration: none; 
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.05) 0%, rgba(122, 0, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.social-card:hover::before {
    opacity: 1;
}
.social-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
}
.social-desc {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -0.3rem;
}
.social-card:hover {
    transform: translateY(-15px); 
    background: rgba(255,255,255,0.05);
    border-color: var(--neon-cyan); 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 20px rgba(0, 243, 255, 0.1);
}
.social-icon { 
    font-size: 3rem; 
    color: var(--text-secondary); 
    transition: 0.3s;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}
.social-label { 
    font-family: var(--font-display); 
    font-size: 0.85rem; 
    color: var(--text-primary); 
    letter-spacing: 2px;
    text-transform: uppercase;
}
.social-card:hover .social-icon { 
    color: var(--neon-cyan); 
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.6));
}
.social-card:nth-child(2):hover .social-icon { 
    color: var(--neon-purple);
    filter: drop-shadow(0 0 15px rgba(122, 0, 255, 0.6));
}
.social-card:nth-child(3):hover .social-icon { 
    color: var(--neon-pink);
    filter: drop-shadow(0 0 15px rgba(255, 20, 147, 0.6));
}

/* =========================================
   11. MODALS & ADMIN
   ========================================= */
.lightbox-modal {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px); z-index: var(--z-modal);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-modal.active { opacity: 1; visibility: visible; pointer-events: all; }

.adm-overlay {
    position: fixed; inset: 0; background: rgba(5, 5, 10, 0.95);
    z-index: var(--z-admin); backdrop-filter: blur(20px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; animation: fadeIn 0.3s forwards;
}

.modal-content-wrapper {
    max-width: 90vw; max-height: 85vh; border-radius: var(--border-radius-md);
    overflow: hidden; box-shadow: 0 0 50px rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
}
.modal-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.close-modal-btn {
    position: absolute; top: 30px; right: 30px; font-size: 2rem; color: #fff;
    cursor: pointer; z-index: 10000; transition: 0.3s;
}
.close-modal-btn:hover { color: var(--sys-red); transform: rotate(90deg); }

.adm-login-box, .adm-dashboard {
    background: #0a0a0a; border: 1px solid var(--neon-purple);
    box-shadow: 0 0 100px rgba(122, 0, 255, 0.15);
    border-radius: var(--border-radius-lg); overflow: hidden;
}
.adm-login-box { width: 400px; padding: 3rem; text-align: center; }
.adm-dashboard { width: 90vw; max-width: 1400px; height: 90vh; display: flex; flex-direction: column; }
.adm-header { font-family: var(--font-display); color: var(--neon-purple); margin-bottom: 2rem; letter-spacing: 4px; }

.adm-input {
    width: 100%; padding: 15px; background: rgba(255,255,255,0.03);
    border: 1px solid #333; color: #fff; margin-bottom: 1rem;
    border-radius: 8px; font-family: var(--font-body); transition: 0.3s;
}
.adm-input:focus { border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(122,0,255,0.2); }

.adm-btn {
    width: 100%; padding: 12px; border-radius: 8px; border: none;
    background: var(--neon-purple); color: #fff; font-weight: 700;
    font-family: var(--font-display); cursor: pointer; transition: 0.3s;
}
.adm-btn:hover { box-shadow: 0 0 20px var(--neon-purple); filter: brightness(1.2); }

.adm-top-bar {
    padding: 1.5rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.02);
}
.adm-title { font-family: var(--font-display); font-size: 1.2rem; color: #fff; letter-spacing: 2px; }
.adm-nav-tabs { display: flex; gap: 10px; background: rgba(0,0,0,0.5); padding: 5px; border-radius: 8px; }
.adm-tab-btn {
    background: transparent; border: none; color: #888; padding: 8px 20px;
    border-radius: 6px; cursor: pointer; font-family: var(--font-display); font-size: 0.8rem; transition: 0.3s;
}
.adm-tab-btn.active { background: var(--neon-purple); color: #fff; }

.adm-content-wrapper { flex: 1; display: flex; overflow: hidden; }
.adm-section-create {
    width: 320px; padding: 2rem; border-right: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2); overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem;
}
.adm-section-list { flex: 1; padding: 2rem; overflow-y: auto; }
.adm-species-card, .adm-product-item {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; margin-bottom: 1.5rem; overflow: hidden;
}
.adm-species-header {
    padding: 1rem 1.5rem; background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.adm-species-name { font-family: var(--font-display); color: var(--neon-cyan); }
.adm-gallery-grid {
    padding: 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px;
}
.adm-img-wrapper {
    aspect-ratio: 1; border-radius: 8px; overflow: hidden; position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}
.adm-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.adm-del-img-btn {
    position: absolute; top: 5px; right: 5px; width: 24px; height: 24px;
    background: rgba(255,0,0,0.8); color: #fff; border: none; border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
/* FIX: Flex row layout untuk footer card admin agar tombol tidak gepeng */
.adm-card-footer {
    padding: 1.5rem; border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; gap: 15px; align-items: center;
}
.adm-label { font-size: 0.75rem; color: #666; letter-spacing: 1px; margin-bottom: 0.5rem; display: block; }
.adm-btn-sm { width: auto; padding: 6px 15px; font-size: 0.8rem; }
.adm-btn-danger { background: rgba(255, 42, 42, 0.1); color: #ff2a2a; border: 1px solid #ff2a2a; }
.adm-btn-danger:hover { background: #ff2a2a; color: #fff; box-shadow: 0 0 15px #ff2a2a; }
.adm-btn-edit { background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); }
.adm-btn-edit:hover { background: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue); }
.adm-btn-close { background: transparent; border: 1px solid #fff; color: #fff; }
.adm-btn-close:hover { background: #fff; color: #000; }
.adm-product-item {
    display: flex; align-items: center; padding: 1.5rem; gap: 1.5rem;
    border-left: 3px solid var(--neon-acid);
}
.adm-prod-thumb { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.adm-prod-info { flex: 1; }
.adm-prod-title { font-size: 1.1rem; color: #fff; margin-bottom: 0.5rem; }
.adm-prod-details { font-size: 0.9rem; color: #888; }

/* =========================================
   12. THEME FAB
   ========================================= */
.theme-fab {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px; background: var(--glass-base);
    border: 1px solid var(--glass-border); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: var(--z-fab); backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.theme-fab:hover { transform: scale(1.1) rotate(90deg); border-color: var(--neon-cyan); }
.theme-icon { font-size: 1.5rem; color: var(--text-primary); }
.theme-popup {
    position: fixed; bottom: 100px; right: 30px;
    background: var(--bg-void); border: 1px solid var(--glass-border);
    padding: 10px; border-radius: 16px;
    display: flex; flex-direction: column; gap: 5px;
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-fab); box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.theme-popup.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.theme-option {
    padding: 10px 20px; border-radius: 8px; cursor: pointer;
    color: var(--text-secondary); font-family: var(--font-display); font-size: 0.8rem;
    display: flex; align-items: center; gap: 10px; transition: 0.2s;
}
.theme-option:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.theme-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid currentColor; }

.status-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    padding: 10px 2rem; background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--glass-border);
    font-family: var(--font-display); font-size: 0.7rem;
    color: var(--text-secondary); text-align: center;
    z-index: var(--z-nav);
}

/* =========================================
   13. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    /* Navigation - Move to bottom on mobile */
    .navbar-wrapper { 
        top: auto; 
        bottom: 0; 
        height: auto;
        padding: 10px 1rem 20px 1rem;
    }
    .navbar { 
        padding: 0 1rem; 
        height: 60px; 
        border-radius: 20px;
    }
    .nav-items { 
        display: flex; 
        gap: 4px; 
        flex: 1;
        justify-content: space-around;
    }
    .nav-btn { 
        padding: 8px 10px; 
        font-size: 0.7rem; 
        flex: 1;
        min-width: 0;
    }
    .brand-logo { 
        display: none; 
    }
    
    /* View screens - Adjust padding for bottom nav */
    .view-screen { 
        padding-top: 20px; 
        padding-bottom: 100px; 
    }
    
    /* Hero section - Better mobile sizing */
    .home-content-container {
        padding: 1.5rem 1rem;
    }
    .cyber-circle {
        width: 300px;
        height: 300px;
    }
    .hero-title-main {
        font-size: clamp(1.8rem, 8vw, 3.5rem);
        line-height: 1.15;
        margin-bottom: 1.5rem;
        letter-spacing: 1px;
    }
    .hero-subtitle {
        font-size: clamp(0.8rem, 2.5vw, 1rem);
        letter-spacing: 2px;
        margin-bottom: 2rem;
    }
    .btn-immersive {
        padding: 14px 30px;
        font-size: 0.85rem;
    }
    
    /* Gallery/Shop layout */
    .gallery-control-bar { 
        padding: 10px 1rem; 
    }
    .gallery-header-aligner { 
        flex-direction: column; 
        gap: 15px; 
        align-items: stretch;
        padding: 1rem 1.5rem;
    }
    .gallery-header-aligner > div {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
    }
    .test-loading-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .gallery-title-small {
        font-size: 1.2rem;
    }
    .gallery-control-bar {
        z-index: 1000 !important; /* Ensure control bar is above grid on mobile */
    }
    .gallery-header-aligner {
        z-index: 1001 !important; /* Higher than control bar on mobile */
    }
    .dropdown-component { 
        width: 100%;
        z-index: 1002 !important; /* Ensure dropdown is above cards on mobile */
    }
    .dd-menu {
        z-index: 1003 !important; /* Higher z-index for dropdown menu on mobile */
    }
    .gallery-viewport {
        z-index: 1 !important; /* Below dropdown on mobile */
    }
    .gallery-grid, .shop-grid {
        z-index: 1 !important; /* Below dropdown on mobile */
    }
    .gallery-viewport {
        padding: 0 1rem 120px 1rem;
    }
    .gallery-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        gap: 1rem;
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }
    .loading-text {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    /* Cards - Better mobile sizing */
    .fish-card, .shop-card {
        min-height: 150px;
    }
    .shop-info {
        padding: 1rem;
    }
    .shop-name {
        font-size: 0.95rem;
    }
    .shop-price {
        font-size: 1rem;
    }
    .shop-actions {
        flex-direction: column;
        gap: 8px;
    }
    .shop-qty-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    .shop-qty {
        flex: 1;
        width: auto;
    }
    .shop-qty-btn {
        flex-shrink: 0;
    }
    .shop-btn-buy {
        width: 100%;
    }
    
    /* Social section */
    .social-layout {
        padding: 2rem 1rem;
    }
    .social-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .social-info-box {
        padding: 1.5rem 1.5rem;
        margin-bottom: 0;
        max-width: 100%;
        gap: 1.5rem;
    }
    .social-info-header {
        gap: 0.7rem;
        margin-bottom: 0;
        padding-bottom: 0.8rem;
    }
    .social-info-icon {
        font-size: 1.3rem;
    }
    .social-info-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    .social-info-content {
        padding-bottom: 0;
    }
    .social-info-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .social-info-item {
        gap: 1rem;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    .social-info-item:hover {
        transform: translateY(3px);
    }
    .social-item-icon {
        font-size: 1.3rem;
        margin-top: 0;
    }
    .social-item-title {
        font-size: 0.85rem;
    }
    .social-item-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    .social-divider {
        margin: 1rem 0;
    }
    .social-connect-section {
        gap: 1rem;
    }
    .social-connect-title {
        font-size: 1rem;
    }
    .social-connect-subtitle {
        font-size: 0.8rem;
    }
    .social-desc {
        font-size: 0.7rem;
    }
    .social-grid { 
        gap: 1rem; 
        flex-direction: row;
        width: 100%;
        justify-content: center;
        margin-top: 0;
    }
    .social-card { 
        width: 140px; 
        height: 140px;
        flex-direction: column;
    }
    .social-card-inner {
        gap: 0.8rem;
    }
    .social-icon { 
        font-size: 2.5rem; 
    }
    .social-label {
        font-size: 0.8rem;
    }
    
    /* Theme FAB */
    .theme-fab { 
        bottom: 100px; 
        width: 50px; 
        height: 50px; 
        right: 20px; 
    }
    .theme-popup { 
        bottom: 160px; 
        right: 20px; 
    }
    
    /* Status footer */
    .status-footer {
        font-size: 0.6rem;
        padding: 8px 1rem;
        bottom: 80px;
    }
    
    /* Admin panel */
    .adm-dashboard {
        width: 95vw;
        height: 95vh;
        margin: 2.5vh auto;
    }
    .adm-content-wrapper { 
        flex-direction: column; 
    }
    .adm-section-create { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 1.5rem;
    }
    .adm-section-list {
        padding: 1rem;
    }
    .adm-top-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .adm-nav-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    .adm-tab-btn {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    .adm-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .adm-prod-thumb {
        width: 100%;
        height: 200px;
    }
    
    /* Modal */
    .modal-content-wrapper {
        max-width: 95vw;
        max-height: 80vh;
    }
    .close-modal-btn {
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .nav-btn {
        font-size: 0.65rem;
        padding: 8px 8px;
    }
    .hero-title-main {
        font-size: clamp(1.8rem, 12vw, 3rem);
    }
    .social-info-box {
        padding: 1.2rem 1rem;
        margin-bottom: 0;
        gap: 1.2rem;
    }
    .social-info-header {
        gap: 0.6rem;
        margin-bottom: 0;
        padding-bottom: 0.8rem;
        flex-direction: column;
        text-align: center;
    }
    .social-info-icon {
        font-size: 1.2rem;
    }
    .social-info-title {
        font-size: 0.9rem;
    }
    .social-info-content {
        padding-bottom: 0;
    }
    .social-info-section {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
    .social-info-item {
        gap: 0.7rem;
        padding: 1.1rem;
        flex-direction: column;
        text-align: center;
    }
    .social-item-icon {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    .social-item-title {
        font-size: 0.8rem;
    }
    .social-item-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    .social-divider {
        margin: 1rem 0;
    }
    .social-connect-section {
        gap: 0.8rem;
    }
    .social-connect-title {
        font-size: 0.9rem;
    }
    .social-connect-subtitle {
        font-size: 0.75rem;
    }
    .social-desc {
        font-size: 0.65rem;
    }
    .social-grid {
        gap: 0.8rem;
        margin-top: 0;
    }
    .social-card {
        width: 120px;
        height: 120px;
    }
    .social-card-inner {
        gap: 0.6rem;
    }
    .social-icon {
        font-size: 2rem;
    }
    .social-label {
        font-size: 0.75rem;
    }
    .gallery-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .gallery-title-small {
        font-size: 1rem;
    }
}
