/* =========================================
   LORE ATLAS - FANTASY THEME
   Font: Cinzel (judul), Crimson Text (body)
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Share+Tech+Mono&display=swap');

/* === VARIABEL TEMA === */
:root {
    --gold:        #d4af37;
    --gold-light:  #f0d060;
    --gold-dark:   #9a7c1f;
    --parchment:   #f5e6c8;
    --ink:         #1a1008;
    --deep:        #0d0a05;
    --panel:       rgba(15, 10, 3, 0.85);
    --panel-light: rgba(30, 20, 5, 0.75);
    --border:      rgba(212, 175, 55, 0.25);
    --border-glow: rgba(212, 175, 55, 0.6);
    --text-main:   #e8d9b5;
    --text-muted:  #8a7a5a;
    --text-dim:    #5a4e35;
    --red-dark:    #7f1d1d;
    --green-dark:  #064e3b;
    --magic-blue:  #4a9eff;
    --magic-cyan:  #00e5ff;
    --magic-purple:#9c6bff;
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Crimson Text', Georgia, serif;
    background-color: var(--deep);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background bertekstur di semua halaman */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(212,175,55,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(74,158,255,0.03) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* =========================================
   HALAMAN LOGIN
========================================= */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow:
        0 0 60px rgba(212, 175, 55, 0.08),
        0 0 0 1px rgba(212, 175, 55, 0.05),
        inset 0 1px 0 rgba(212,175,55,0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.gradient-bar {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold), var(--gold-dark));
}

.title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.2em;
}

.text-center { text-align: center; }
.mb-8 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }

label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-group { margin-bottom: 1.25rem; text-align: left; }

input, select, textarea {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 0.25rem;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    outline: none;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(212,175,55,0.2);
}

.btn {
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: 0.25rem;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-blue {
    background: linear-gradient(to bottom, #3a6fd8, #1d4ed8);
    color: white;
    border: 1px solid rgba(96,165,250,0.4);
    box-shadow: 0 0 20px rgba(37,99,235,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-blue:hover { background: linear-gradient(to bottom, #4a7fe8, #2563eb); box-shadow: 0 0 30px rgba(37,99,235,0.5); }

.btn-cyan {
    background: linear-gradient(to bottom, #0a7a95, #0891b2);
    color: white;
    border: 1px solid rgba(6,182,212,0.4);
    box-shadow: 0 0 20px rgba(8,145,178,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-cyan:hover { background: linear-gradient(to bottom, #0e94b3, #06b6d4); box-shadow: 0 0 30px rgba(6,182,212,0.5); }

.link-text { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 1rem; }
.link-btn { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 0.9rem; font-family: 'Crimson Text', serif; }
.link-btn:hover { color: var(--gold-light); text-decoration: underline; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
}
.alert-error  { background: rgba(127,29,29,0.3); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.alert-success{ background: rgba(6,78,59,0.3);   border: 1px solid rgba(16,185,129,0.4); color: #6ee7b7; }

.hidden { display: none !important; }

/* =========================================
   LAYOUT PETA UTAMA
========================================= */
.map-layout {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    height: 100vh;
    overflow: hidden;
    background-color: var(--deep);
}

/* SVG ikon global */
svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.3); }
    50%       { box-shadow: 0 0 20px rgba(212,175,55,0.7); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}
.animate-pulse { animation: pulse 2s ease infinite; }

/* --- SIDEBAR KIRI --- */
.sidebar-left {
    width: 290px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10;
}

/* Ornamen vertikal kiri sidebar */
.sidebar-left::before {
    content: '';
    position: absolute;
    top: 0; right: -1px;
    width: 1px; height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--gold) 20%,
        var(--gold) 80%,
        transparent 100%);
    opacity: 0.4;
}

.sidebar-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.brand-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light), var(--gold-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1.75rem;
    letter-spacing: 0.2em;
    animation: shimmer 4s linear infinite;
}

/* Kartu profil di sidebar */
.profile-card {
    background: rgba(212,175,55,0.04);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d3a6e, #0a5c7a);
    border: 2px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(212,175,55,0.2), inset 0 2px 4px rgba(0,0,0,0.6);
    flex-shrink: 0;
}

.user-info p { margin: 0; }

.username {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.05em;
}

.xp-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem !important;
}

.progress-bar-bg {
    background: rgba(0,0,0,0.4);
    border-radius: 999px;
    height: 4px;
    margin: 0.6rem 0;
    border: 1px solid rgba(212,175,55,0.15);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(212,175,55,0.6);
}

.badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.badge {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.2rem;
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigasi sidebar */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    transition: all 0.25s;
    border: 1px solid transparent;
}
.nav-link svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }

.nav-link:hover {
    background: rgba(212,175,55,0.08);
    color: var(--gold-light);
    border-color: rgba(212,175,55,0.2);
}

.nav-link.active {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border-color: rgba(212,175,55,0.3);
    box-shadow: inset 0 0 15px rgba(212,175,55,0.05), 0 0 10px rgba(212,175,55,0.1);
}

.nav-link.danger { color: #7f4444; margin-top: auto; }
.nav-link.danger:hover { background: rgba(127,29,29,0.2); color: #fca5a5; border-color: rgba(239,68,68,0.3); }

.mt-auto { margin-top: auto; }

/* --- AREA PETA TENGAH --- */
.main-map {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    background: rgba(10,7,2,0.7);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.map-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.08em;
}

.divergence {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--magic-cyan);
    margin-left: 0.75rem;
    opacity: 0.8;
}

.glass-box {
    background: rgba(10,7,2,0.6);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.35rem 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.glass-box span { color: var(--gold); }

#map-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, rgba(212,175,55,0.03) 0%, transparent 70%),
        var(--deep);
    position: relative;
}

#map-container svg {
    width: 100%; height: 100%;
    stroke: none; fill: unset;
    cursor: grab;
}

.loading-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Interaksi region peta */
.map-region {
    cursor: pointer;
    transition: filter 0.25s, opacity 0.25s;
}
.map-region:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(212,175,55,0.6));
    opacity: 0.9;
}

.locked-region {
    cursor: pointer;
    filter: grayscale(0.6) brightness(0.6);
    transition: filter 0.25s;
}
.locked-region:hover {
    filter: grayscale(0.3) brightness(0.8) drop-shadow(0 0 6px rgba(239,68,68,0.5));
}

.active-region {
    filter: brightness(1.4) drop-shadow(0 0 14px rgba(212,175,55,0.9)) !important;
}

/* --- SIDEBAR KANAN --- */
.sidebar-right {
    width: 320px;
    background: var(--panel);
    border-left: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: visible;
    box-shadow: -4px 0 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 5;
}

.decorative-header {
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.lore-content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,0.3) transparent;
    position: relative;
    z-index: 5;
}
.lore-content-area::-webkit-scrollbar { width: 4px; }
.lore-content-area::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 2px; }

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

#location-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.04em;
}

.location-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    padding: 0.15rem 0.5rem;
    background: rgba(212,175,55,0.1);
    border: 1px solid var(--border);
    border-radius: 0.2rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#location-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
    border-left: 2px solid rgba(212,175,55,0.2);
    padding-left: 0.75rem;
}

/* Tombol unlock */
.btn-unlock {
    width: 100%;
    padding: 0.65rem;
    background: rgba(127,29,29,0.2);
    border: 1px solid rgba(239,68,68,0.4);
    border-radius: 0.35rem;
    color: #fca5a5;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
    pointer-events: all;
}
.btn-unlock svg { width: 1rem; height: 1rem; }
.btn-unlock:hover { background: rgba(239,68,68,0.2); border-color: #f87171; box-shadow: 0 0 15px rgba(239,68,68,0.2); }

/* Item Lore */
.lore-item {
    padding: 0.875rem;
    background: rgba(212,175,55,0.04);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 0.4rem;
    margin-bottom: 0.75rem;
    transition: all 0.25s;
    position: relative;
}
.lore-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 100%;
    background: linear-gradient(to bottom, var(--gold-dark), transparent);
    border-radius: 2px 0 0 2px;
    opacity: 0;
    transition: opacity 0.25s;
}
.lore-item:hover { background: rgba(212,175,55,0.07); border-color: rgba(212,175,55,0.25); }
.lore-item:hover::before { opacity: 1; }

.lore-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4rem; }
.lore-title {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.03em;
}
.lore-title svg { width: 0.85rem; height: 0.85rem; color: var(--gold); }
.lore-date { font-family: 'Share Tech Mono', monospace; font-size: 0.6rem; color: var(--text-dim); }

.lore-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}

.lore-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(212,175,55,0.1); padding-top: 0.5rem; }
.lore-author { font-family: 'Share Tech Mono', monospace; font-size: 0.6rem; color: var(--text-dim); }
.lore-author span { color: var(--gold); }
.lore-status { display: flex; align-items: center; gap: 0.3rem; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; }
.status-dot.pending  { background: var(--magic-purple); box-shadow: 0 0 4px var(--magic-purple); }
.status-dot.verified { background: #10b981; box-shadow: 0 0 4px #10b981; }
.status-text { font-family: 'Share Tech Mono', monospace; font-size: 0.55rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.lore-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed rgba(212,175,55,0.1); }
.btn-edit, .btn-delete { background: none; border: none; font-family: 'Share Tech Mono', monospace; font-size: 0.6rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.06em; font-weight: bold; transition: 0.2s; }
.btn-edit  { color: var(--magic-blue); }
.btn-edit:hover  { color: #93c5fd; text-shadow: 0 0 6px rgba(74,158,255,0.5); }
.btn-delete { color: #f87171; }
.btn-delete:hover { color: #fca5a5; text-shadow: 0 0 6px rgba(248,113,113,0.5); }

/* Footer sidebar kanan */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}

.btn-submit-lore {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(to bottom, rgba(99,80,20,0.6), rgba(60,45,5,0.8));
    border: 1px solid var(--gold-dark);
    border-radius: 0.35rem;
    color: var(--gold-light);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(212,175,55,0.1), inset 0 1px 0 rgba(212,175,55,0.1);
}
.btn-submit-lore:hover {
    background: linear-gradient(to bottom, rgba(140,110,30,0.7), rgba(90,65,10,0.9));
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(212,175,55,0.25), inset 0 1px 0 rgba(212,175,55,0.2);
    color: var(--gold-light);
}

/* --- MODAL SUBMIT LORE --- */
.modal-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-backdrop.hidden { display: none !important; pointer-events: none !important; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); }
.modal-panel {
    position: relative;
    width: 100%; max-width: 500px;
    background: linear-gradient(to bottom, #150f04, #0d0a02);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    z-index: 10;
    margin: 1rem;
    box-shadow: 0 0 60px rgba(212,175,55,0.15), 0 25px 50px rgba(0,0,0,0.7);
    overflow: hidden;
}
.modal-panel::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-title-box { display: flex; align-items: center; gap: 0.75rem; }
.modal-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: rgba(212,175,55,0.1); border: 1px solid var(--border); border-radius: 0.35rem; color: var(--gold); }
.modal-icon svg { width: 1rem; height: 1rem; }
.modal-header h2 { font-family: 'Cinzel', serif; font-size: 0.9rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.08em; }
.btn-close-modal { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0.25rem; border-radius: 0.25rem; transition: 0.2s; }
.btn-close-modal:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.btn-close-modal svg { width: 1.1rem; height: 1.1rem; }

#loreForm { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.form-group-modal label { font-family: 'Share Tech Mono', monospace; font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; display: block; }
.form-group-modal input,
.form-group-modal textarea {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 0.35rem;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}
.form-group-modal input:focus,
.form-group-modal textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(212,175,55,0.15);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 0.5rem; }
.btn-cancel { background: none; border: none; color: var(--text-muted); padding: 0.5rem 1rem; cursor: pointer; font-family: 'Crimson Text', serif; font-size: 0.9rem; border-radius: 0.35rem; transition: 0.2s; }
.btn-cancel:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.btn-send {
    background: linear-gradient(to bottom, rgba(99,80,20,0.8), rgba(60,45,5,0.9));
    border: 1px solid var(--gold-dark);
    color: var(--gold-light);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 0.35rem;
    transition: all 0.3s;
}
.btn-send:hover { background: linear-gradient(to bottom, rgba(140,110,30,0.8), rgba(90,65,10,0.9)); border-color: var(--gold); box-shadow: 0 0 15px rgba(212,175,55,0.2); }

/* =========================================
   HALAMAN CRUD / MANAGE
========================================= */
.crud-body {
    display: block;
    min-height: 100vh;
    overflow-y: auto;
    padding: 0;
    background-color: var(--deep);
}

.crud-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 2.5rem;
}

.crud-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.crud-header::after {
    content: '';
    position: absolute; bottom: -1px; left: 0;
    width: 80px; height: 1px;
    background: var(--gold);
    opacity: 0.6;
}

.crud-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.06em;
}
.crud-header p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.4rem; font-style: italic; }

.btn-back {
    background: rgba(212,175,55,0.08);
    color: var(--gold);
    padding: 0.5rem 1.1rem;
    border-radius: 0.35rem;
    text-decoration: none;
    border: 1px solid var(--border);
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: all 0.25s;
}
.btn-back:hover { background: rgba(212,175,55,0.15); border-color: var(--gold); color: var(--gold-light); }

.crud-card {
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.crud-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212,175,55,0.3), transparent);
}

.crud-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Form CRUD */
.crud-form .form-row { display: flex; gap: 1rem; }
.crud-form .form-row .form-group-crud { flex: 1; }
.form-group-crud { margin-bottom: 1rem; }
.form-group-crud label {
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    margin-bottom: 0.4rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.form-group-crud input,
.form-group-crud select,
.form-group-crud textarea {
    width: 100%; padding: 0.7rem 1rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 0.35rem;
    color: var(--text-main);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}
.form-group-crud input:focus,
.form-group-crud select:focus,
.form-group-crud textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212,175,55,0.15);
}
.form-group-crud select option { background: #1a1008; }

.btn-submit-crud {
    background: linear-gradient(to bottom, rgba(59,130,246,0.3), rgba(29,78,216,0.5));
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.4);
    padding: 0.7rem 1.5rem;
    border-radius: 0.35rem;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    transition: all 0.3s;
}
.btn-submit-crud:hover { background: linear-gradient(to bottom, rgba(96,165,250,0.3), rgba(37,99,235,0.5)); border-color: #60a5fa; color: #bfdbfe; }

/* Tabel CRUD */
.table-responsive { overflow-x: auto; }
.crud-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.crud-table th, .crud-table td { padding: 0.875rem 1rem; text-align: left; border-bottom: 1px solid rgba(212,175,55,0.08); }
.crud-table th {
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(0,0,0,0.3);
    font-weight: normal;
}
.crud-table tr:hover td { background: rgba(212,175,55,0.03); }

.badge-lokasi {
    background: rgba(74,158,255,0.12);
    color: #93c5fd;
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    border: 1px solid rgba(74,158,255,0.25);
}
.badge-status { font-family: 'Share Tech Mono', monospace; font-size: 0.7rem; font-weight: 700; }
.badge-status.pending  { color: var(--magic-purple); }
.badge-status.verified { color: #34d399; }

.action-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-action {
    padding: 0.3rem 0.65rem;
    border-radius: 0.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.2s;
}
.btn-action.edit   { background: rgba(74,158,255,0.1);  color: var(--magic-blue); border-color: rgba(74,158,255,0.3); }
.btn-action.edit:hover   { background: var(--magic-blue); color: #0f172a; }
.btn-action.delete { background: rgba(248,113,113,0.1); color: #f87171; border-color: rgba(248,113,113,0.3); }
.btn-action.delete:hover { background: #f87171; color: #0f172a; }

.crud-modal { margin: auto; padding: 2rem; background: linear-gradient(to bottom, #150f04, #0d0a02); border-color: var(--border); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* =========================================
   HALAMAN TIM
========================================= */
.team-body {
    background-color: var(--deep);
    min-height: 100vh;
    display: block;
    padding: 0;
}

.team-container {
    max-width: 950px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.team-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.team-header::after {
    content: '✦';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 1rem;
    background: var(--deep);
    padding: 0 0.5rem;
}

.team-header h1 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    font-size: 1.75rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.team-header p { color: var(--text-muted); font-size: 0.95rem; font-style: italic; margin-bottom: 1.5rem; }

.team-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.team-card {
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem 1.75rem;
    width: calc(33.333% - 1.5rem);
    min-width: 260px;
    text-align: center;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}
.team-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gold-dark), transparent);
    opacity: 0;
    transition: opacity 0.35s;
}
.team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.08);
}
.team-card:hover::before { opacity: 1; }

.avatar-large {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(212,175,55,0.3);
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.avatar-large.justin { background: linear-gradient(135deg, #1e3a8a, #0369a1); }
.avatar-large.samuel { background: linear-gradient(135deg, #4c1d95, #7e22ce); }
.avatar-large.manuel { background: linear-gradient(135deg, #92400e, #b91c1c); }

.team-card h3 { font-family: 'Cinzel', serif; color: var(--gold-light); font-size: 1rem; margin-bottom: 0.4rem; letter-spacing: 0.04em; }
.team-card .role { color: var(--gold); font-family: 'Share Tech Mono', monospace; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.team-card .desc { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; font-style: italic; }

/* =========================================
   ADMIN STATS & BADGE
========================================= */
.role-badge-admin {
    display: inline-block;
    background: linear-gradient(to right, var(--gold-dark), #c0392b);
    color: white;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
    letter-spacing: 0.08em;
    vertical-align: middle;
    margin-left: 0.3rem;
    text-transform: uppercase;
}

.avatar.avatar-admin {
    background: linear-gradient(135deg, #92400e, #9a1414);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212,175,55,0.3), inset 0 2px 4px rgba(0,0,0,0.6);
}

.badge-admin {
    background: rgba(212,175,55,0.12) !important;
    color: var(--gold) !important;
    border-color: var(--border) !important;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) { .admin-stats { grid-template-columns: repeat(2,1fr); } }

.stat-card {
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    transition: 0.25s;
}
.stat-card:hover { border-color: rgba(212,175,55,0.4); background: rgba(30,20,5,0.9); }

.stat-number { display: block; font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 0.4rem; }
.stat-label  { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card.stat-pending  .stat-number { color: var(--magic-purple); }
.stat-card.stat-verified .stat-number { color: #34d399; }

.btn-action.approve {
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
    text-decoration: none;
}
.btn-action.approve:hover { background: #10b981; color: #0f172a; }

.btn-action.reject {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border: 1px solid var(--border);
    text-decoration: none;
}
.btn-action.reject:hover { background: var(--gold-dark); color: #0f172a; }

.badge-user {
    background: rgba(156,107,255,0.12);
    color: var(--magic-purple);
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    border: 1px solid rgba(156,107,255,0.25);
}

/* =========================================
   HALAMAN PROFIL & LEADERBOARD
========================================= */
.profile-body {
    display: block;
    min-height: 100vh;
    overflow-y: auto;
    padding: 0;
    background-color: var(--deep);
}

.profile-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-identity-card { text-align: center; }

.profile-avatar-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }

.profile-avatar-xl {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #0369a1);
    border: 2px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-light);
    box-shadow: 0 0 25px rgba(212,175,55,0.2), inset 0 2px 4px rgba(0,0,0,0.5);
}
.profile-avatar-xl.avatar-admin {
    background: linear-gradient(135deg, #92400e, #9a1414);
    box-shadow: 0 0 25px rgba(212,175,55,0.3), inset 0 2px 4px rgba(0,0,0,0.5);
    border-color: var(--gold);
}

.profile-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 0.25rem;
}
.profile-role-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.profile-level-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 0.875rem;
    text-align: left;
}
.profile-level-info {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.profile-total-xp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    text-align: right;
}
.profile-total-xp strong { color: var(--gold); }

.profile-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.profile-stat-item {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 0.875rem;
    text-align: center;
    transition: 0.2s;
}
.profile-stat-item:hover { border-color: rgba(212,175,55,0.3); }
.profile-stat-num {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.35rem;
}
.profile-stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Riwayat lore di profil */
.riwayat-list { display: flex; flex-direction: column; gap: 0.875rem; }

.riwayat-item {
    background: rgba(212,175,55,0.03);
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 1rem;
    transition: 0.2s;
}
.riwayat-item:hover { border-color: rgba(212,175,55,0.25); background: rgba(212,175,55,0.05); }

.riwayat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4rem; gap: 0.5rem; }
.riwayat-judul { font-family: 'Cinzel', serif; font-size: 0.85rem; font-weight: 600; color: var(--gold-light); }
.riwayat-konten {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}
.riwayat-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.riwayat-tanggal { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; color: var(--text-dim); }

/* Leaderboard */
.my-rank-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(212,175,55,0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.my-rank-label { font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }
.my-rank-num   { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; color: var(--gold); line-height: 1; }

.leaderboard-table tbody tr { transition: 0.15s; }
.leaderboard-me { background: rgba(212,175,55,0.05) !important; border-left: 2px solid var(--gold-dark); }
.leaderboard-me:hover { background: rgba(212,175,55,0.08) !important; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(212,175,55,0.06);
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.rank-badge.rank-gold   { background: rgba(212,175,55,0.15); color: var(--gold);    border-color: var(--gold-dark); font-size: 1rem; }
.rank-badge.rank-silver { background: rgba(180,180,180,0.12); color: #d0d0d0;       border-color: #aaa; font-size: 1rem; }
.rank-badge.rank-bronze { background: rgba(180,80,9,0.15);    color: #cd7f32;       border-color: #a0622a; font-size: 1rem; }

.lb-user { display: flex; align-items: center; gap: 0.75rem; }
.lb-avatar {
    width: 2.25rem; height: 2.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.05));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}
.lb-avatar-me {
    background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
    border-color: var(--gold-dark);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(212,175,55,0.2);
}
.lb-username { font-family: 'Cinzel', serif; font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.lb-you-badge {
    display: inline-block;
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    letter-spacing: 0.1em;
    margin-left: 0.3rem;
    vertical-align: middle;
    border: 1px solid var(--border);
}
.lb-level { font-family: 'Share Tech Mono', monospace; font-size: 0.75rem; color: var(--magic-blue); font-weight: 600; }
.lb-xp    { font-family: 'Cinzel', serif; font-size: 0.85rem; font-weight: 700; color: var(--gold); }

/* Hover efek SVG peta */
#map-container svg polygon[id],
#map-container svg circle[id],
#map-container svg path[id] {
    transition: filter 0.3s ease;
}
#map-container svg polygon[id]:hover,
#map-container svg circle[id]:hover,
#map-container svg path[id]:hover {
    filter: brightness(1.25) drop-shadow(0 0 8px rgba(212,175,55,0.5));
}

.glass-panel { background: var(--panel); }

/* =========================================
   MAP HEADER - ERA & REALM
========================================= */
.map-era {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.map-era span {
    color: var(--gold);
    font-style: italic;
    font-family: 'Crimson Text', serif;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: none;
}

.map-select-fantasy {
    cursor: pointer;
    outline: none;
    background: rgba(10, 7, 2, 0.8);
    border: 1px solid var(--gold-dark);
    border-radius: 0.35rem;
    color: var(--gold-light);
    padding: 0.5rem 2rem 0.5rem 0.875rem;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23d4af37' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    box-shadow: 0 0 12px rgba(212,175,55,0.1), inset 0 1px 0 rgba(212,175,55,0.05);
}
.map-select-fantasy:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}
.map-select-fantasy option {
    background: #1a1008;
    color: var(--text-main);
}

/* =========================================
   TOP NAVBAR (halaman non-peta)
========================================= */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 1.75rem;
    height: 54px;
    background: rgba(10, 7, 2, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Garis emas di bawah navbar */
.top-navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.4;
}

.navbar-brand {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light));
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 0.2em;
    text-decoration: none;
    margin-right: 2rem;
    flex-shrink: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.navbar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.3rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.navbar-link svg {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
}
.navbar-link:hover {
    background: rgba(212,175,55,0.08);
    color: var(--gold-light);
    border-color: rgba(212,175,55,0.2);
}
.navbar-link.active {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border-color: rgba(212,175,55,0.3);
}

/* Info user di kanan navbar */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex-shrink: 0;
}

.navbar-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d3a6e, #0a5c7a);
    border: 1px solid var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gold-light);
    flex-shrink: 0;
}
.navbar-avatar.avatar-admin {
    background: linear-gradient(135deg, #92400e, #9a1414);
    border-color: var(--gold);
}

.navbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.navbar-username {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.04em;
}
.navbar-xp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-dim);
}

.navbar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.3rem;
    color: var(--text-dim);
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}
.navbar-logout svg { width: 1rem; height: 1rem; }
.navbar-logout:hover {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
}

/* Padding top sudah dihandle di masing-masing container */

/* =========================================
   SIDEBAR FOOTER - TIM PENELITI
========================================= */
.sidebar-team-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    border-radius: 0.35rem;
    text-decoration: none;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.sidebar-team-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(212,175,55,0.04);
    opacity: 0;
    transition: opacity 0.25s;
}
.sidebar-team-footer:hover::before { opacity: 1; }
.sidebar-team-footer:hover { border-color: rgba(212,175,55,0.3); }

.sidebar-team-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.team-mini-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px solid var(--deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    margin-left: -0.5rem;
    transition: transform 0.2s;
}
.team-mini-avatar:first-child { margin-left: 0; }
.sidebar-team-footer:hover .team-mini-avatar {
    transform: translateY(-2px);
}
.sidebar-team-footer:hover .team-mini-avatar:nth-child(2) {
    transform: translateY(-2px);
    transition-delay: 0.05s;
}
.sidebar-team-footer:hover .team-mini-avatar:nth-child(3) {
    transform: translateY(-2px);
    transition-delay: 0.1s;
}

.sidebar-team-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sidebar-team-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.sidebar-team-sub {
    font-family: 'Crimson Text', serif;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
    transition: color 0.2s;
}
.sidebar-team-footer:hover .sidebar-team-sub {
    color: var(--text-muted);
}

/* =========================================
   TEAM PHOTO
========================================= */
.team-photo-wrap {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    padding: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Border warna unik per anggota */
.justin-border {
    background: linear-gradient(135deg, #1e3a8a, #0369a1, #38bdf8, #1e3a8a);
    box-shadow: 0 0 25px rgba(3, 105, 161, 0.4);
}
.samuel-border {
    background: linear-gradient(135deg, #4c1d95, #7e22ce, #c084fc, #4c1d95);
    box-shadow: 0 0 25px rgba(126, 34, 206, 0.4);
}
.manuel-border {
    background: linear-gradient(135deg, #92400e, #b91c1c, #f97316, #92400e);
    box-shadow: 0 0 25px rgba(185, 28, 28, 0.4);
}

/* Foto bulat di dalam border */
.team-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--deep);
    display: block;
}

/* Fallback avatar jika foto belum ada — samakan ukuran */
.team-photo-wrap .avatar-large {
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: 1.75rem;
    border: 3px solid var(--deep);
}

/* Animasi border berputar saat hover */
.team-card:hover .team-photo-wrap {
    animation: rotateBorder 3s linear infinite;
}
@keyframes rotateBorder {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
