/* ============================================================
   SolarThrone Navbar — protruding circle nav (classic PBBG style)
   Aesthetic: 1970s sci-fi cockpit instrument panel
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes led-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- Bar ---------- */
.navbar {
    position: relative;
    height: 52px;
    background:
        linear-gradient(180deg,
            rgba(20, 26, 48, 0.95) 0%,
            rgba(10, 14, 26, 0.98) 60%,
            rgba(10, 14, 26, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    overflow: visible;
    z-index: 100;
    font-family: 'Chakra Petch', sans-serif;
}

/* Glowing bottom seam — light source, not just a border */
.navbar-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(201, 146, 46, 0.3) 10%,
        #c9922e 30%,
        #d4a03a 50%,
        #c9922e 70%,
        rgba(201, 146, 46, 0.3) 90%,
        transparent 100%);
    z-index: 101;
}

.navbar-glow::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 8px;
    background: radial-gradient(ellipse at center, rgba(201, 146, 46, 0.15) 0%, transparent 70%);
    filter: blur(4px);
}

/* ---------- Sections ---------- */
.navbar-left,
.navbar-center,
.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-left {
    flex: 1;
    justify-content: flex-start;
}

.navbar-center {
    flex: 0 0 auto;
    gap: 40px;
}

.navbar-right {
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

/* ---------- Nav Item (circle + label column) ---------- */
.nav-item,
.navbar-location,
.navbar-avatar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 102;
}

/* ---------- Protruding Circle ---------- */
.nav-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0a0e1a;
    border: 3px solid rgba(10, 14, 26, 0.9);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(232, 224, 208, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 10px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

/* Per-icon painted art backgrounds */
.nav-circle--dashboard { background: url('/images/icons/icon-dashboard.png') center/cover; }
.nav-circle--station   { background: url('/images/icons/icon-station.png') center/cover; }
.nav-circle--rankings  { background: url('/images/icons/icon-rankings.png') center/cover; }
.nav-circle--map       { background: url('/images/icons/icon-transit.png') center/cover; }
.nav-circle--docked    { background: url('/images/icons/icon-docked.png') center/cover; }
.nav-circle--transit   { background: url('/images/icons/icon-transit.png') center/cover; }

/* Outer ring — chrome accent */
.nav-circle-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 146, 46, 0.35);
    pointer-events: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-circle:hover {
    box-shadow:
        0 2px 12px rgba(201, 146, 46, 0.5),
        0 0 28px rgba(201, 146, 46, 0.2),
        inset 0 1px 0 rgba(232, 224, 208, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.nav-circle:hover .nav-circle-ring {
    border-color: rgba(201, 146, 46, 0.6);
    box-shadow: 0 0 8px rgba(201, 146, 46, 0.15);
}

/* Active state — powered up indicator */
.nav-circle.active {
    border-color: rgba(218, 166, 58, 0.8);
    box-shadow:
        0 2px 16px rgba(201, 146, 46, 0.6),
        0 0 32px rgba(212, 160, 58, 0.3),
        0 0 48px rgba(201, 146, 46, 0.15);
}

.nav-circle.active .nav-circle-ring {
    border-color: rgba(218, 166, 58, 0.7);
    box-shadow: 0 0 12px rgba(201, 146, 46, 0.2);
}

/* Location + Avatar circles — slightly smaller */
.nav-circle--location,
.nav-circle--avatar {
    width: 48px;
    height: 48px;
    top: 8px;
}

/* ---------- Status LED on location circle ---------- */
.status-led {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid rgba(10, 14, 26, 0.8);
}

.status-led--docked {
    background: radial-gradient(circle at 40% 40%, #5bea7a, #2a9d3e);
    box-shadow: 0 0 6px rgba(42, 157, 62, 0.6);
}

.status-led--transit {
    background: radial-gradient(circle at 40% 40%, #f5c842, #d4851e);
    box-shadow: 0 0 6px rgba(212, 133, 30, 0.6);
    animation: led-blink 1.5s ease-in-out infinite;
}

/* ---------- Labels below circles ---------- */
.nav-label {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.6rem;
    color: #c0b8a8;
    margin-top: 14px;
    white-space: nowrap;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ---------- Avatar Initial ---------- */
.avatar-initial {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #0a0e1a;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(232, 224, 208, 0.3);
}

/* ---------- Power / Logout ---------- */
.power-form {
    display: flex;
    align-items: center;
}

.power-btn {
    background: none;
    border: 1px solid rgba(232, 224, 208, 0.12);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(232, 224, 208, 0.4);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.power-btn:hover {
    color: #e04420;
    border-color: rgba(224, 68, 32, 0.4);
    background: rgba(224, 68, 32, 0.08);
    box-shadow: 0 0 10px rgba(224, 68, 32, 0.15);
}

/* ---------- Anonymous / Unauthenticated ---------- */
.navbar--anon {
    height: 52px;
}

.navbar-brand {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    gap: 0;
}

.brand-solar {
    color: #c9922e;
    text-shadow: 0 0 20px rgba(201, 146, 46, 0.3);
}

.brand-throne {
    color: #e8e0d0;
}

.navbar-brand:hover .brand-solar {
    text-shadow: 0 0 24px rgba(201, 146, 46, 0.5);
    color: #daa63a;
}

.navbar-brand:hover .brand-throne {
    color: #f5ead0;
}

.navbar-right--anon {
    gap: 24px;
}

.nav-link {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: rgba(232, 224, 208, 0.65);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 0;
    transition: color 0.25s ease;
    position: relative;
}

.nav-link:hover {
    color: #e8e0d0;
}

.nav-link--register {
    color: #c9922e;
    border: 1px solid rgba(201, 146, 46, 0.35);
    border-radius: 4px;
    padding: 6px 16px;
    transition: all 0.25s ease;
}

.nav-link--register:hover {
    color: #f5ead0;
    border-color: rgba(201, 146, 46, 0.7);
    background: rgba(201, 146, 46, 0.08);
    box-shadow: 0 0 16px rgba(201, 146, 46, 0.1);
}

/* ---------- Avatar circle keeps gold gradient ---------- */
.nav-circle--avatar {
    background:
        radial-gradient(ellipse at 35% 30%, #daa63a 0%, transparent 50%),
        linear-gradient(160deg, #c9922e 0%, #b5751a 50%, #9a6218 100%);
    overflow: hidden;
}

.nav-circle--has-avatar {
    background: none;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


/* ---------- Resource Strip ---------- */
.navbar-resources {
    height: 28px;
    margin-top: 34px;
    background: rgba(18, 22, 38, 0.95);
    border-top: 1px solid rgba(201, 146, 46, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 0 28px;
    position: relative;
    z-index: 98;
    font-family: 'Chakra Petch', sans-serif;
}

.resource {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(192, 184, 168, 0.5);
}

.resource-value {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: rgba(232, 224, 208, 0.7);
}

.resource-value--credits {
    color: #c9922e;
    font-weight: 700;
}

.resource-bar {
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: rgba(10, 14, 26, 0.8);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.resource-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.resource-bar-fill--fuel {
    background: linear-gradient(90deg, #3a9aa6, #5bb8c4);
    box-shadow: 0 0 4px rgba(91, 184, 196, 0.3);
}

.resource-bar-fill--cargo {
    background: linear-gradient(90deg, #b5751a, #c9922e);
    box-shadow: 0 0 4px rgba(201, 146, 46, 0.3);
}

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .navbar-center {
        gap: 24px;
    }

    .nav-circle {
        width: 44px;
        height: 44px;
        top: 8px;
    }

    .nav-circle--location,
    .nav-circle--avatar {
        width: 38px;
        height: 38px;
        top: 6px;
    }

    .nav-circle-ring {
        inset: -4px;
    }

    .nav-label {
        font-size: 0.5rem;
        margin-top: 10px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .avatar-initial {
        font-size: 0.95rem;
    }

    .navbar-resources {
        gap: 20px;
        padding: 0 16px;
    }

    .resource-bar {
        width: 48px;
    }

}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }

    .navbar-center {
        gap: 16px;
    }

    .nav-circle {
        width: 36px;
        height: 36px;
        top: 6px;
    }

    .nav-circle--location,
    .nav-circle--avatar {
        width: 32px;
        height: 32px;
        top: 5px;
    }

    .nav-circle-ring {
        inset: -3px;
    }

    .nav-label {
        display: none;
    }

    .navbar-brand {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    .avatar-initial {
        font-size: 0.8rem;
    }

    .power-btn {
        width: 24px;
        height: 24px;
    }

    .navbar-right {
        gap: 10px;
    }

    .navbar-right--anon {
        gap: 14px;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .nav-link--register {
        padding: 4px 10px;
    }

    .navbar-resources {
        gap: 12px;
        padding: 0 10px;
    }

    .resource-label {
        display: none;
    }

    .resource-bar {
        width: 36px;
    }

    .resource-value {
        font-size: 0.6rem;
    }

}
