/* css/core.css */

/* --- 1. CORE VARIABLES & TOKENS --- */
:root {
    /* Existing Colors */
    --bg: #0b0c0f;
    --accent: #ff3d6b;
    --accent2: #7c5cff;
    --muted: #9aa4b2;
    --muted-weak: rgba(154, 164, 178, 0.6);
    --text: #e6eef8;

    /* Existing Effects */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(20, 26, 35, 0.85);
    --input-bg: rgba(255, 255, 255, 0.02);
    --control-border: rgba(255, 255, 255, 0.08);
    --live: linear-gradient(90deg, #ffb86b, #ff3d6b);
    --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    --modal-gradient: linear-gradient(180deg, #061017, #0b1116);
    --shadow-premium: 0 20px 40px -10px rgba(0,0,0,0.7);
    
    /* Existing Tiers/Misc */
    --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --tier-glow: #52525b;

    /* --- NEW LAYOUT TOKENS (Added for global nav) --- */
    --header-height-mobile: 60px;
    --nav-height-mobile: 65px;
    --sidebar-width-desktop: 260px;

    /* --- COSMETIC DEFAULTS (Transparent by default) --- */
    --page-bg: transparent; 
    --bg-image: none;
    --bg-opacity: 0;
    --bg-size: cover;
    --wrap-border: none;
    --wrap-shadow: none;
}

/* --- 2. RESET & TYPOGRAPHY --- */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Oxanium', system-ui, Arial, sans-serif;
    
    /* Existing Background */
    background: 
        radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.15), transparent 40%),
        radial-gradient(ellipse at 10% 10%, rgba(124, 92, 255, 0.05), transparent 10%),
        var(--bg);
    background-attachment: fixed; /* Ensures background stays nice while scrolling */
    
    color: var(--text);
    min-height: 100vh;

    /* --- NEW: Mobile First Padding Defaults --- */
    /* Adds space so content is not hidden behind the fixed Top/Bottom bars */
    padding-top: var(--header-height-mobile);
    padding-bottom: calc(var(--nav-height-mobile) + var(--safe-bottom));
    transition: padding 0.2s ease;
}

::selection { background: rgba(124, 92, 255, 0.3); color: white; }

/* Premium Scrollbar (Preserved) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* --- 3. UTILITIES & ANIMATIONS --- */

/* Updated .wrap for better responsiveness */
.wrap { 
    width: 100%;
    margin: 0 auto; 
    position: relative;
    padding: 24px 20px; 
    min-height: calc(100vh - var(--header-height-mobile) - var(--nav-height-mobile));
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: 8px;
    
    /* Engine Integration */
    background-color: var(--page-bg);
    border: var(--wrap-border);
    box-shadow: var(--wrap-shadow);
    transition: all 0.4s var(--ease-ios);
    z-index: 1;
    isolation: isolate; /* Keeps background from bleeding into header */
}

/* The Cosmetic Background Layer */
.wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--bg-image);
    background-position: center top;
    background-repeat: no-repeat;
    background-size: var(--bg-size);
    background-attachment: fixed;
    opacity: var(--bg-opacity);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* --- NEW: Desktop Media Query (Landscape/PC) --- */
/* css/core.css */
@media (min-width: 768px) {
    body {
        /* Clear the top padding used for mobile */
        padding-top: 0;
        
        /* Add LEFT padding so content isn't hidden by the sidebar */
        padding-left: 240px; /* Must match --sidebar-width */
    }
    
    .wrap {
        max-width: 1200px; /* Allow wider content on PC */
        padding: 40px;
    }
}

.spacer { flex: 1; }
.hidden { display: none !important; }
.flex-visible { display: flex !important; }

/* For all native select elements and their options */
select, select option {
  background-color: #222;
  color: #fff;
}

/* For your city autocomplete dropdown */
#cityResults, 
#cityResults .result-item {
  background-color: #222;
  color: #fff;
}

/* --- 4. ANIMATIONS (Preserved exactly as is) --- */
@keyframes pulse { 0% {transform:scale(1)} 50% {transform:scale(1.03)} 100% {transform:scale(1)} }
@keyframes shimmer { 0% {background-position: 200% 0} 100% {background-position: -200% 0} }
@keyframes flicker { 0% { opacity: 0.7; } 100% { opacity: 1; text-shadow: 0 0 15px rgba(255, 165, 0, 0.5); } }
@keyframes avatar-breathing {
    0% { box-shadow: 0 0 15px var(--tier-glow); border-color: var(--tier-glow); }
    50% { box-shadow: 0 0 35px var(--tier-glow); border-color: #fff; }
    100% { box-shadow: 0 0 15px var(--tier-glow); border-color: var(--tier-glow); }
}

/* DISCOVERY ROW:  Style Navigation */
.discovery-row {
display: flex;
justify-content: space-around; /* Evenly spaced */
align-items: center;
padding: 1.5rem 10px;
margin: 1rem 0 2rem 0;
background: rgba(255, 255, 255, 0.02);
border-top: 1px solid rgba(255, 255, 255, 0.05);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.discovery-item {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
width: 30%; /* Balanced for 3 items */
}

.discovery-item:active {
transform: scale(0.9);
}

/* The Circular Icon Frame */
.discovery-circle {
width: 68px;
height: 68px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8rem;
background: #111111;
border: 2px solid #27272a;
margin-bottom: 10px;
position: relative;
box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Distinct Glows for each category */
.pantheon .discovery-circle { 
border-color: #fbbf24; /* Gold */
box-shadow: 0 0 15px rgba(251, 191, 36, 0.15); 
}
.guilds .discovery-circle { 
border-color: #60a5fa; /* Blue */
box-shadow: 0 0 15px rgba(96, 165, 250, 0.15); 
}
.bounties .discovery-circle { 
border-color: #f87171; /* Red */
box-shadow: 0 0 15px rgba(248, 113, 113, 0.15); 
}

/* Text Labels */
.discovery-label {
font-size: 0.75rem;
font-weight: 800;
color: #f4f4f5;
text-transform: uppercase;
letter-spacing: 0.8px;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Desktop View: Bigger circles and wider spacing */
@media (min-width: 768px) {
.discovery-row {
    justify-content: center;
    gap: 5rem;
    background: transparent;
    border: none;
}
.discovery-circle {
    width: 85px;
    height: 85px;
    font-size: 2.2rem;
}
.discovery-item:hover {
    transform: translateY(-5px);
}
}