/* ─────────────────────────────────────────────
   Lestaria — Global Design System
   Marketplace Sampah Per KG | by Adhexa Hub
   ───────────────────────────────────────────── */

:root {
    --primary:       #10B981;
    --primary-light: #34D399;
    --primary-dark:  #059669;
    --primary-dim:   rgba(16, 185, 129, 0.12);
    --bg-dark:       #0d1117;
    --bg-surface:    #111827;
    --bg-card:       rgba(255, 255, 255, 0.045);
    --text-main:     #ffffff;
    --text-muted:    #9CA3AF;
    --text-soft:     #D1D5DB;
    --glass-border:  rgba(255, 255, 255, 0.09);
    --radius-lg:     24px;
    --radius-md:     14px;
    --radius-sm:     8px;
    --shadow-primary: 0 12px 28px rgba(16, 185, 129, 0.35);
}

/* ─── Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ─── Animated Background ─── */
.bg-shapes {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #131b2e 0%, #0d1117 100%);
}

.shape {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    animation: floatShape 22s infinite ease-in-out alternate;
    opacity: 0.35;
}

.shape-1 {
    width: 450px;
    height: 450px;
    background: var(--primary);
    top: -120px;
    right: -120px;
    animation-delay: 0s;
}

.shape-2 {
    width: 320px;
    height: 320px;
    background: #7c3aed;
    bottom: -80px;
    left: -100px;
    animation-delay: -8s;
}

@keyframes floatShape {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 60px) scale(1.25); }
}

/* ─── Navigation ─── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(13, 17, 23, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 200;
    transition: background 0.3s;
}

/* ─── Logo ─── */
.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ─── Nav Links ─── */
.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ─── Buttons ─── */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.28s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-ghost {
    color: var(--text-muted);
    background: transparent;
}
.btn-ghost:hover { color: var(--primary-light); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.45);
}
.btn-primary:active { transform: translateY(0); }

/* ─── Hero ─── */
.hero {
    margin-top: 80px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 820px;
    animation: fadeUp 0.9s ease-out both;
}

.badge {
    background: rgba(16, 185, 129, 0.13);
    color: var(--primary-light);
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    display: inline-block;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ─── Glass Card (Auth / Dashboard) ─── */
.glass-container {
    margin-top: 100px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 44px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    animation: fadeUp 0.6s ease-out both;
}

.glass-card.dashboard-card { max-width: 860px; text-align: center; }

.glass-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.glass-card p.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
    line-height: 1.6;
}

/* ─── Form Styles ─── */
.form-group { margin-bottom: 20px; text-align: left; }

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control::placeholder { color: #4B5563; }

select.form-control option { background: #1f2937; color: #fff; }

.btn-block { width: 100%; padding: 15px; font-size: 16px; margin-top: 12px; }

/* ─── Alerts ─── */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ─── Auth links ─── */
.auth-links { margin-top: 24px; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-links a { color: var(--primary-light); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

/* ─── Dashboard ─── */
.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-primary);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 28px;
    transition: border-color 0.3s;
}

.stat-card:hover { border-color: rgba(52, 211, 153, 0.3); }

.stat-card h3 { font-size: 38px; color: var(--primary); margin-bottom: 6px; }
.stat-card p  { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active { display: flex; }

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover { color: #fff; }

/* ─── Iklan (Ad) Card ─── */
.ad-list { display: grid; gap: 14px; }

.ad-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.28s;
    backdrop-filter: blur(10px);
}

.ad-item:hover {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.05);
    transform: translateX(4px);
}

/* ─── Peta / Map ─── */
.map-placeholder {
    width: 100%;
    height: 360px;
    background: linear-gradient(135deg, #1a2332 0%, #0f1923 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.map-placeholder::after {
    content: 'Peta Interaktif Lestaria';
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    nav { padding: 16px 5%; }
    .nav-links .btn-ghost { display: none; }
    .glass-card { padding: 28px 22px; }
}
