/* --- Global Variables & Reset --- */
:root {
    --primary-color: #a1b56c;
    --accent-gold: #ffc83d;
    --accent-red: #8b0000;
    --bg-dark: #0a0a0a;
    --panel-bg: rgba(15, 15, 15, 0.85);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: url('map_backgrounds/background.png') fixed no-repeat center/cover; 
    color: var(--text-main); 
    backdrop-filter: brightness(0.6);
    overflow: hidden;
}

/* --- Custom Scrollbars --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* --- Header & Navigation --- */
header { 
    background: rgba(10, 10, 10, 0.95); padding: 10px 30px; 
    display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 1px solid var(--panel-border); box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: relative; z-index: 500;
}
.logo { height: 50px; }
nav ul { list-style: none; display: flex; gap: 20px; }
nav a, .about-me-button { 
    text-decoration: none; color: white; background: rgba(255, 255, 255, 0.05); 
    padding: 8px 18px; border-radius: 20px; border: 1px solid var(--panel-border); 
    transition: 0.3s; font-weight: bold; font-size: 14px;
}
nav a:hover, .about-me-button:hover { background: var(--primary-color); color: black; }

/* --- About Me Dropdown --- */
.about-me-wrapper { position: relative; }
.about-me-dropdown { 
    position: absolute; top: 120%; right: 0; background: rgba(20, 20, 20, 0.98); 
    backdrop-filter: blur(15px); border: 1px solid var(--panel-border); 
    border-radius: 12px; padding: 15px; z-index: 1000; min-width: 200px; 
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.3s; 
}
.about-me-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.social-links a { display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; margin-bottom: 8px; background: rgba(255,255,255,0.05); padding: 8px; border-radius: 6px; font-size: 13px; transition: 0.2s; }
.social-links a:hover { background: rgba(255,255,255,0.15); }

/* --- Settings UI --- */
.settings-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; }
.settings-btn { 
    background: rgba(15, 15, 15, 0.85); color: white; width: 40px; height: 40px; 
    border-radius: 50%; border: 1px solid var(--panel-border); cursor: pointer; 
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); 
    transition: 0.3s; font-size: 20px;
}
.settings-btn:hover { background: var(--primary-color); color: black; transform: rotate(45deg); }
.settings-panel { 
    position: absolute; bottom: 50px; right: 0; width: 160px; 
    background: var(--panel-bg); backdrop-filter: blur(10px); 
    border: 1px solid var(--panel-border); border-radius: 10px; 
    padding: 12px; opacity: 0; visibility: hidden; transition: 0.3s; 
}
.settings-panel.active { opacity: 1; visibility: visible; }
.lang-btn { background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--panel-border); padding: 6px; border-radius: 4px; width: 100%; text-align: left; margin-top: 5px; cursor: pointer; font-size: 12px; transition: 0.2s; }
.lang-btn:hover { background: var(--primary-color); color: black; }

/* --- Homepage Layout --- */
.home-main { padding: 40px; max-width: 1300px; margin: 0 auto; overflow-y: auto; height: calc(100vh - 70px); }
.welcome-banner { background: var(--panel-bg); backdrop-filter: blur(15px); padding: 40px; border-radius: 15px; border: 1px solid var(--panel-border); text-align: center; margin-bottom: 40px; }
.recommendations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding-bottom: 40px; }
.recommendation-card { background: rgba(30, 30, 30, 0.7); border-radius: 12px; overflow: hidden; text-decoration: none; color: white; border: 1px solid var(--panel-border); transition: 0.3s; display: flex; flex-direction: column; }
.recommendation-card:hover { transform: translateY(-8px); border-color: var(--primary-color); }
.card-image-wrapper { height: 150px; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; }
.card-image-wrapper img { height: 80%; object-fit: contain; }
.card-content { padding: 15px; }

.badge { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-weight: bold; border: 1px solid currentColor; text-transform: uppercase; }
.badge.lineup { color: var(--primary-color); background: rgba(161, 181, 108, 0.1); }
.badge.news { color: #4da6ff; background: rgba(77, 166, 255, 0.1); }
.badge.update { color: #b366ff; background: rgba(179, 102, 255, 0.1); }

/* --- News Timeline --- */
.news-timeline { display: flex; flex-direction: column; gap: 15px; max-width: 900px; margin: 0 auto; padding-bottom: 50px; }
.news-row { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 15px; display: flex; padding: 15px; gap: 20px; align-items: center; cursor: pointer; transition: 0.3s; }
.news-row:hover { border-color: var(--primary-color); transform: translateX(10px); }
.news-thumb { width: 180px; height: 100px; border-radius: 8px; object-fit: cover; background: #000; flex-shrink: 0; }

/* Article Reader */
.article-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(20px); z-index: 9999; display: none; overflow-y: auto; }
.article-overlay.active { display: block; }
.article-close-btn { position: fixed; top: 20px; right: 30px; font-size: 45px; color: white; background: none; border: none; cursor: pointer; }
.article-container { max-width: 800px; margin: 60px auto; background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 15px; padding: 40px; }

/* --- Lineup Viewer Structure --- */
.viewer-container { display: flex; height: calc(100vh - 70px); padding: 10px; gap: 10px; position: relative; }
.selection-sidebar { 
    width: 250px; background: var(--panel-bg); backdrop-filter: blur(15px); border-radius: 15px; 
    padding: 15px; border: 1px solid var(--panel-border); display: flex; flex-direction: column; overflow-y: auto; z-index: 10;
}

.video-sidebar { 
    position: absolute; right: 20px; top: 20px; bottom: 20px; width: 0; opacity: 0; visibility: hidden;
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(25px); border: 1px solid var(--accent-gold); 
    border-radius: 15px; padding: 0; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); z-index: 500;
    overflow: hidden; box-shadow: -10px 0 30px rgba(0,0,0,0.8);
}
.video-sidebar.active { width: 380px; opacity: 1; visibility: visible; padding: 20px; }

/* Map Area */
.map-area { flex-grow: 1; position: relative; display: flex; flex-direction: column; }
.map-wrapper { 
    flex-grow: 1; background: #000; border-radius: 15px; position: relative; 
    overflow: hidden; cursor: grab; display: flex; align-items: center; justify-content: center;
}
.map-wrapper:active { cursor: grabbing; }

.map-content { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; display: inline-block; line-height: 0; }

#mainMapImg { 
    display: block; width: auto; height: auto; max-width: none; max-height: 82vh; opacity: 0.8; 
    /* CRITICAL FIXES */
    user-select: none; 
    -webkit-user-drag: none; 
    pointer-events: none; /* Allows the container to catch the drag event instead of the image */
}

/* Trajectories & Particle Animations */
#dotLayer, #lineLayer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.trajectory-line { stroke: var(--accent-gold); stroke-opacity: 0.3; stroke-width: 0.6; fill: none; transition: 0.3s ease; }
.trajectory-line.active { stroke-opacity: 1; stroke-width: 1.2; filter: drop-shadow(0 0 5px var(--accent-gold)); }
.trajectory-particle { fill: #fff; r: 0.7; }
.flow-animation { animation: particleFlow 2.5s infinite linear; }
@keyframes particleFlow { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* Map Dots */
.map-dot { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; z-index: 10; transition: transform 0.2s; }
.target-dot { width: 10px; height: 10px; background: var(--accent-gold); border: 2px solid white; box-shadow: 0 0 10px var(--accent-gold); }
.target-dot.active-target { background: white; transform: translate(-50%, -50%) scale(1.3); }
.badge-count { position: absolute; top: -8px; right: -8px; background: #000; color: var(--accent-gold); font-size: 9px; font-weight: bold; border-radius: 50%; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--accent-gold); }
.origin-dot { width: 28px; height: 28px; background-size: cover; border: 2px solid white; box-shadow: 0 0 10px rgba(0,0,0,0.5); }

/* Viewer UI Elements */
.reset-zoom-btn { position: absolute; top: 15px; right: 15px; background: rgba(15, 15, 15, 0.8); color: white; border: 1px solid var(--panel-border); padding: 6px 12px; border-radius: 8px; cursor: pointer; z-index: 50; font-size: 11px; font-weight: bold; backdrop-filter: blur(10px); }
.ability-bar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(10, 10, 10, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--accent-gold); border-radius: 50px; padding: 6px 15px; display: flex; gap: 8px; z-index: 50; }
.ability-btn { padding: 6px 16px; font-size: 12px; background: transparent; color: white; border: none; border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.ability-btn.active { background: var(--accent-gold); color: black; }

.map-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.map-banner { min-width: 90px; height: 45px; border-radius: 6px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid transparent; transition: 0.3s; position: relative; }
.map-banner span { color: white; font-weight: bold; font-size: 11px; text-shadow: 0 1px 4px #000; text-transform: capitalize; z-index: 2; }
.map-banner.active { border-color: var(--accent-gold); }

.agent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.agent-icon { width: 100%; cursor: pointer; border: 2px solid transparent; border-radius: 6px; background: rgba(0,0,0,0.4); filter: grayscale(40%); transition: 0.2s; }
.agent-icon.active { border-color: var(--accent-gold); filter: grayscale(0%); }

.iframe-wrapper { position: relative; padding-bottom: 56.25%; height: 0; margin-top: 15px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--panel-border); }
.iframe-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.coord-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(15, 15, 15, 0.95); backdrop-filter: blur(10px); border: 1px solid var(--accent-gold); padding: 25px; border-radius: 15px; z-index: 2000; visibility: hidden; opacity: 0; transition: 0.3s; text-align: center; }
.coord-popup.active { visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); }
