/* style.css - Mobile Optimized */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg: #020617;
    --glass: rgba(15, 23, 42, 0.9); /* Sedikit lebih gelap agar teks lebih terbaca di HP */
    --neon: #06b6d4;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box; /* Wajib untuk layout mobile yang rapi */
}

body {
    background: var(--bg);
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden; /* Mencegah geser kanan-kiri yang tidak perlu */
    font-size: 14px; /* Base font size untuk mobile */
}

/* --- UTILITIES --- */
.flex-center { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.neon-text { color: var(--neon); font-family: 'Orbitron', monospace; }
.white-text { color: white; }
.font-tech { font-family: 'Orbitron', monospace; }
.hidden { display: none !important; }

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 5px; height: 5px; } /* Lebih tipis untuk HP */
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon); }

/* --- GLASS COMPONENTS --- */
.glass-panel, .glass-card, .glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Support iOS */
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* --- NAVBAR (Mobile Friendly) --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 100;
    padding: 0.8rem 1rem; /* Padding lebih kecil */
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(2, 6, 23, 0.98); /* Hampir solid agar konten tidak tabrakan saat scroll */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.brand { 
    font-family: 'Orbitron'; font-weight: bold; font-size: 1.2rem; /* Font logo lebih pas di HP */
}
.nav-link { margin-right: 15px; text-decoration: none; color: #94a3b8; font-size: 0.8rem; font-weight: bold; }

/* --- LOGIN BOX (Responsive) --- */
.login-box { 
    padding: 2rem; 
    text-align: center; 
    width: 90%; /* Mengisi 90% layar HP */
    max-width: 400px; 
    margin: 0 auto;
}

.btn-neon {
    background: var(--neon); color: black; border: none; padding: 12px 20px;
    font-weight: bold; cursor: pointer; border-radius: 8px; width: 100%;
    font-family: 'Orbitron'; transition: 0.3s;
    font-size: 0.9rem;
}
.btn-neon:hover { box-shadow: 0 0 15px var(--neon); }

/* --- INPUTS --- */
.input-dark {
    width: 100%; background: #0f172a; border: 1px solid #334155;
    color: white; padding: 10px; border-radius: 8px; margin-top: 5px;
    font-size: 0.9rem;
}
.input-dark:focus { border-color: var(--neon); outline: none; }
.form-group { margin-bottom: 15px; text-align: left; }

/* --- LAYOUT CONTAINER --- */
.container { 
    padding-top: 80px; /* Jarak dari navbar */
    max-width: 1200px; 
    margin: 0 auto; 
    padding-left: 15px; 
    padding-right: 15px; 
    padding-bottom: 80px;
}

/* --- GRID MARKET (KUNCI MOBILE LAYOUT) --- */
.product-grid {
    display: grid;
    /* Di HP 2 kolom, di Tablet 3, di Desktop 4/5 */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 12px; /* Jarak antar kartu lebih rapat */
}

/* Card Styling */
.glass-card { 
    overflow: hidden; 
    transition: transform 0.2s; 
    display: flex; 
    flex-direction: column;
}
.glass-card:active { transform: scale(0.98); } /* Efek klik di HP */

.glass-card img { 
    width: 100%; 
    height: 140px; /* Tinggi gambar fix agar rapi */
    object-fit: cover; 
}

.card-content { padding: 10px; flex: 1; display: flex; flex-direction: column; }

/* Badges */
.badge-official { background: #a855f7; color: white; font-size: 9px; padding: 2px 5px; border-radius: 4px; font-weight: bold; }
.badge-seller { background: #334155; color: #cbd5e1; font-size: 9px; padding: 2px 5px; border-radius: 4px; }

.price { 
    color: var(--neon); 
    font-size: 1rem; /* Harga menonjol */
    font-weight: bold; 
    margin: 5px 0; 
}

/* Tombol Beli */
.btn-buy { 
    width: 100%; 
    background: rgba(6, 182, 212, 0.1); 
    border: 1px solid var(--neon); 
    color: var(--neon); 
    padding: 6px; 
    cursor: pointer; 
    border-radius: 6px; 
    font-size: 0.8rem;
    margin-top: auto; /* Dorong ke bawah */
}
.btn-buy:active { background: var(--neon); color: black; }

/* --- BUTTONS --- */
.btn-danger-sm { background: #ef4444; border: none; color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; margin-left: 8px; }
.btn-cancel { background: transparent; border: 1px solid #64748b; color: #64748b; padding: 10px 20px; border-radius: 6px; cursor: pointer; }
.btn-group { display: flex; gap: 10px; margin-top: 20px; }
.tab-btn { cursor: pointer; transition: all 0.3s; white-space: nowrap; } 

.status-dot { height: 8px; width: 8px; background-color: #22c55e; border-radius: 50%; display: inline-block; margin-right: 5px; box-shadow: 0 0 10px #22c55e; }

/* ==========================================================================
   FITUR OWNER & STRUK (RESPONSIVE)
   ========================================================================== */

/* 1. DEKORASI OWNER (GOLD CARD) */
.owner-card {
    border: 1px solid #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.95);
}

.owner-card::before {
    content: "OFFICIAL";
    position: absolute; top: 8px; right: -25px;
    background: linear-gradient(90deg, #fbbf24, #d97706);
    color: black; font-weight: bold; font-size: 8px;
    padding: 3px 25px; transform: rotate(45deg);
    z-index: 10;
}

/* 2. RGB ANIMATION */
.rgb-border { position: relative; border: 1px solid transparent; }
.rgb-border::after {
    content: ''; position: absolute; inset: -1px; z-index: -1;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400%; animation: glowing 20s linear infinite;
    border-radius: 13px; opacity: 0.5;
}
@keyframes glowing { 0% { background-position: 0 0; } 50% { background-position: 400% 0; } 100% { background-position: 0 0; } }

/* 3. STRUK KERTAS */
.struk-paper {
    background: #fff; color: #000; padding: 15px; 
    font-family: 'Courier New', monospace;
    border-top: 4px dashed #333; border-bottom: 4px dashed #333;
    margin: 10px auto; 
    transform: rotate(-1deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    max-width: 100%; /* Agar tidak overflow di HP */
    width: 280px;
    font-size: 12px;
}

/* ==========================================================================
   MEDIA QUERIES (PENYESUAIAN LAYAR KHUSUS)
   ========================================================================== */

/* Tablet & Mobile Landscape */
@media (max-width: 768px) {
    .navbar { padding: 0.8rem 1rem; }
    .brand { font-size: 1.2rem; }
    .container { padding-top: 70px; }
    
    /* Grid menjadi 2 kolom di tablet/HP besar */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Mobile Portrait (HP Biasa) */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Tetap 2 kolom agar terlihat seperti marketplace app */
        gap: 10px;
    }
    
    .glass-card img { height: 120px; }
    .price { font-size: 0.9rem; }
    
    /* Penyesuaian Panel Owner agar tidak sempit */
    .grid-cols-3 { grid-template-columns: 1fr; } /* Stack ke bawah */
    .lg\:col-span-2 { grid-column: span 1; }
    
    /* Login Box */
    .login-box { padding: 1.5rem; width: 95%; }
    
    /* Button di Navbar logout jadi icon saja jika sempit (opsional, saat ini teks kecil) */
    .btn-danger-sm { padding: 4px 6px; }
}
