:root {
    --bg-dark: #0f0f0f;
    --bg-panel: #1a1a1a;
    --accent-gold: #c5a059;
    --accent-gold-hover: #e6c278;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --font-title: 'Cinzel', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-title);
    margin: 0;
}

/* --- HEADER & NAV --- */
header {
    background-color: rgba(15, 15, 15, 0.95);
    border-bottom: 1px solid #333;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-mini-logo {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

nav a:hover, nav a.active {
    color: var(--accent-gold);
}

/* --- STATUS WIDGET (HEADER) --- */
.status-widget {
    margin-left: 30px;
    font-size: 0.85rem;
    display: flex;
    gap: 15px;
    padding-left: 30px;
    border-left: 1px solid #333;
    height: 30px;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    cursor: default;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #555;
    transition: background-color 0.3s;
}

.status-dot.online {
    background-color: #2ecc71;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.6);
}

.status-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-count {
    color: var(--accent-gold);
    font-weight: bold;
}

/* Tooltip simples para detalhes */
.status-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.95);
    border: 1px solid #333;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: pre; /* Permite quebra de linha */
    color: #fff;
    font-size: 0.75rem;
    z-index: 1000;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    pointer-events: none;
    text-align: left;
}

@media (max-width: 900px) {
    .status-widget {
        display: none; /* Esconde em mobile por enquanto */
    }
}

/* --- HERO SECTION --- */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* Overlay escuro */
}

.hero-bg.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.5rem;
    max-width: 600px;
    margin-bottom: 30px;
}

.cta-button {
    padding: 15px 40px;
    background-color: var(--accent-gold);
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.2s;
}

.cta-button:hover {
    background-color: var(--accent-gold-hover);
    transform: scale(1.05);
}

/* --- SECTIONS --- */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

/* --- INFO GRID --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--bg-panel);
    padding: 30px;
    border: 1px solid #333;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.card h3 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

/* --- CONNECTION SECTION --- */
.connection-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.server-box {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #444;
    padding: 20px 40px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.server-box:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.2);
}

.server-box h3 {
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.server-box code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 4px;
    display: block;
    margin-bottom: 5px;
}

.copy-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
    display: block;
    margin-top: 5px;
}

.server-box:hover .copy-hint {
    opacity: 1;
}

/* --- MAP SECTION --- */
#map-section {
    padding: 0; /* Mapa ocupa largura total da seção */
    max-width: none;
    height: calc(100vh - 70px); /* Altura da tela menos header */
    display: flex;
    flex-direction: column;
    background-color: #000;
}

/* Controles do Mapa (Adaptado) */
#controls {
    padding: 10px 20px;
    background-color: var(--bg-panel);
    border-bottom: 1px solid #444;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    z-index: 10;
}

#controls label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#controls select, #controls input {
    padding: 5px 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

#controls button {
    background-color: var(--accent-gold);
    color: black;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

#controls button:hover {
    background-color: var(--accent-gold-hover);
}

/* Container do Mapa (Lógica visual) */
#map-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: #000;
    cursor: grab;
    width: 100%;
    height: 100%;
}

#map-container:active {
    cursor: grabbing;
}

#map-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#game-map {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* MARCADORES (Mantendo a lógica anterior) */
.marker {
    position: absolute;
    z-index: 100;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.marker-fixed {
    width: 40px;
    height: 40px;
    background-image: url('../images/teleport.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%) scale(calc(1 / var(--map-scale, 1)));
    filter: drop-shadow(0 0 5px #c5a059);
}

.marker-structure {
    width: 20px;
    height: 20px;
    background-image: url('../images/structure.svg');
    background-size: contain;
    background-repeat: no-repeat;
    /* Lógica composta de escala */
    transform: translate(-50%, -50%) scale(calc(var(--tier-scale, 1) / var(--map-scale, 1)));
}

.marker-manual {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 25px solid #00ff00;
    position: absolute;
    z-index: 101;
    display: none;
    transform: translate(-50%, -100%) scale(calc(1 / var(--map-scale, 1)));
}

/* Tooltips */
.marker:hover::after,
.marker-manual::after {
    content: attr(data-label);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform-origin: bottom center;
    /* Escala inversa para manter texto legível */
    transform: translateX(-50%) scale(calc(1 / var(--tier-scale, 1)));
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Footer */
footer {
    background-color: #000;
    text-align: center;
    padding: 20px;
    color: #555;
    font-size: 0.8rem;
    border-top: 1px solid #222;
}

/* Hide sections utility */
.hidden {
    display: none !important;
}
