/* css/style.css - DIO-MICCIA RADAR INTERFACE - VERSIONE COMPLETA */

:root {
    --primary: #00ffff;
    --primary-glow: rgba(0, 255, 255, 0.5);
    --secondary: #ff00ff;
    --secondary-glow: rgba(255, 0, 255, 0.5);
    --success: #00ff88;
    --error: #ff3366;
    --warning: #ffaa00;
    --bg-dark: #05050c;
    --bg-darker: #0a0a16;
    --nav-bg: rgba(0, 0, 0, 0.95);
    --glass-bg: rgba(10, 15, 30, 0.9);
    --card-bg: rgba(10, 15, 30, 0.95);
    --border: rgba(0, 255, 255, 0.2);
    --text-main: #e0f0ff;
    --text-muted: #8a9bb5;
    --text-dark: #05050c;
    --efesto: #ff5500;
    --poseidone: #0099ff;
    --colosso: #ffaa00;
}

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

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== SFONDI DINAMICI ===== */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    z-index: -3;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0, 255, 255, 0.03) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0, 255, 255, 0.03) 40px);
    z-index: -1;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 255, 255, 0.02) 50%, 
        transparent 100%);
    pointer-events: none;
    animation: scan 8s linear infinite;
    z-index: -1;
}

.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
    animation: float 15s infinite linear;
    opacity: 0.3;
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 50px;
}

.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    letter-spacing: 2px;
    position: relative;
}

.brand-version {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.nav-menu {
    display: flex;
    gap: 5px;
    flex: 1;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 8px var(--primary-glow);
}

.nav-server select {
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    outline: none;
}

.nav-server select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ===== INFO SIDEBAR ===== */
.info-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: rgba(3, 8, 22, 0.95);
    border-right: 1px solid var(--border);
    padding: 20px;
    z-index: 900;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--primary-glow);
}

.user-info .user-name {
    display: block;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.user-info .user-rank {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ===== SISTEMA STATS SIDEBAR - CORRETTO ===== */
.system-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 5px;
    margin-bottom: 15px;
}

.system-stats .stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
}

.system-stats .stat-label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
    display: block;
}

.system-stats .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
    line-height: 1.2;
    display: block;
}

/* Per i numeri più lunghi */
.system-stats .stat-value#online-players {
    font-size: 0.8rem;
}

.system-stats .stat-value#server-latency {
    font-size: 0.8rem;
}
.server-info {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.server-info h4 {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.server-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.last-update {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* ===== BLOCCO PUBBLICITA ===== */
.ad-space {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 255, 255, 0.1));
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    backdrop-filter: blur(5px);
    animation: adPulse 3s infinite;
}

.ad-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ad-subtext {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.ad-button {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
}

.ad-button:hover {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.section-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 0 15px var(--primary-glow);
}

.signal-strength {
    display: flex;
    gap: 5px;
    align-items: center;
}

.signal-strength .bar {
    width: 4px;
    height: 20px;
    background: rgba(0, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.signal-strength .bar.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    animation: pulse 1.5s infinite;
}

.btn-back {
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateX(-5px);
}

/* ===== FEED CONTROLS ===== */
.feed-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    border: 1px solid var(--border);
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
    font-weight: 700;
    box-shadow: 0 0 20px var(--primary-glow);
}

.feed-refresh {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-update {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.refresh-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
}

.refresh-btn:hover {
    background: var(--primary);
    color: var(--text-dark);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ===== FEED CARDS ===== */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.feed-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.event-badge.new {
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.event-badge.lost {
    color: var(--error);
    border: 1px solid var(--error);
    box-shadow: 0 0 10px var(--error);
}

.feed-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
}

.feed-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 15px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.player-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.1));
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.action-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.city-name {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 8px var(--primary-glow);
    background: rgba(0, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px dashed var(--primary);
}

.in-text {
    color: #666;
    font-size: 0.8rem;
}

.coords {
    font-family: 'Orbitron', monospace;
    color: var(--warning);
    background: rgba(255, 170, 0, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 170, 0, 0.3);
    font-weight: 600;
}

.ally-tag {
    color: var(--secondary);
    font-weight: 700;
    background: rgba(255, 0, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 0, 255, 0.3);
    text-transform: uppercase;
    box-shadow: 0 0 8px var(--secondary-glow);
}

.player-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
}

.stat-item i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.stat-item.total i { color: var(--primary); }
.stat-item.army i { color: var(--error); }
.stat-item.research i { color: var(--success); }
.stat-item.building i { color: #ffaa00; }
.stat-item.gold i { color: #ffd700; }
.stat-item.cities i { color: var(--warning); }

.stat-value {
    font-weight: 700;
    color: #fff;
}

.stat-label {
    color: var(--text-muted);
    margin-left: 2px;
    font-size: 0.65rem;
    text-transform: lowercase;
}

.miracle-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5px;
}

.miracle-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
}

.miracle-item.efesto i {
    color: var(--efesto);
    text-shadow: 0 0 8px var(--efesto);
}

.miracle-item.poseidone i {
    color: var(--poseidone);
    text-shadow: 0 0 8px var(--poseidone);
}

.miracle-item.colosso i {
    color: var(--colosso);
    text-shadow: 0 0 8px var(--colosso);
}

.miracle-count {
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    min-width: 20px;
    text-align: center;
}

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

.feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.6rem;
}

.event-id {
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 12px;
    color: var(--text-muted);
}

.server-tag {
    background: rgba(0, 255, 255, 0.15);
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.65rem;
}

/* ===== PROFILO GIOCATORE - MODAL CORRETTO ===== */
.profile-card {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    border-top: 4px solid var(--primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.profile-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-dark);
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.profile-title h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--primary-glow);
}

.profile-ally {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ally-badge {
    background: rgba(255, 0, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

/* STATS GRID - 4 COLONNE COMPATTE */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    padding: 12px 8px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.stat-box span {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box strong {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    display: block;
    line-height: 1.2;
}

.stat-box .stat-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 2rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

/* SECONDA RIGA DI STATS (oro e miracoli) */
.stats-grid.secondary {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 0;
    margin-bottom: 20px;
}

/* CITTÀ HEADER */
.cities-header {
    margin: 15px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cities-header h3 {
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TABELLA CITTÀ */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.85rem;
}

.details-table th {
    background: rgba(0, 255, 255, 0.15);
    color: var(--primary);
    padding: 10px 12px;
    text-align: left;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary);
}

.details-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.details-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.details-table tr:last-child td {
    border-bottom: none;
}

.city-level {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
}

.island-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    padding: 3px 8px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid transparent;
}

.island-link:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.coords-small {
    font-size: 0.65rem;
    color: var(--warning);
    margin-left: 5px;
    font-family: 'Orbitron', monospace;
    background: rgba(255, 170, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

.resource-icon {
    margin-right: 5px;
    color: var(--success);
    font-size: 0.8rem;
}

/* AZIONI PROFILO */
.profile-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn-back, .btn-refresh {
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-back:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-refresh {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* ===== LOADING E STATI ===== */
.loading {
    text-align: center;
    padding: 60px;
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--primary-glow);
    animation: pulse 2s infinite;
}

.hologram-loading {
    text-align: center;
    padding: 80px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.scanning-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: scanLight 2s ease-in-out infinite;
}

.loading-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 0 0 15px var(--primary-glow);
    position: relative;
}

.loading-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    position: relative;
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px auto 0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: progress 2s ease-out infinite;
}

/* ===== ERROR CARD ===== */
.error-card {
    text-align: center;
    padding: 60px 30px;
    color: var(--error);
    border-color: var(--error) !important;
    background: rgba(255, 51, 102, 0.1);
}

.error-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--error);
    text-shadow: 0 0 20px var(--error);
}

.error-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.error-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.btn-retry {
    background: rgba(255, 51, 102, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px 35px;
    border-radius: 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: var(--error);
    color: var(--text-dark);
    box-shadow: 0 0 25px var(--error);
}

/* ===== STATUS MESSAGES ===== */
.status-message {
    margin: 20px 0;
    padding: 15px 25px;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    display: none;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.status-message.status-success {
    border-left-color: var(--success);
    color: var(--success);
    background: rgba(0, 255, 136, 0.15);
}

.status-message.status-error {
    border-left-color: var(--error);
    color: var(--error);
    background: rgba(255, 51, 102, 0.15);
}

.status-message.status-warning {
    border-left-color: var(--warning);
    color: var(--warning);
    background: rgba(255, 170, 0, 0.15);
}

/* ===== BADGES ===== */
.new-events-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: var(--text-dark);
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 1px solid var(--text-dark);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: pulse 2s infinite;
    z-index: 10;
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

@keyframes scanLight {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 90%; }
    100% { width: 100%; }
}

@keyframes adPulse {
    0%, 100% { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }
    50% { border-color: var(--secondary); box-shadow: 0 0 20px var(--secondary-glow); }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-content {
        padding: 25px;
    }
    
    .stats-grid,
    .stats-grid.secondary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feed-body {
        gap: 6px 10px;
    }
    
    .player-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 992px) {
    .top-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }
    
    .info-sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-back, .btn-refresh {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .feed-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .feed-refresh {
        justify-content: space-between;
    }
    
    .feed-body {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .miracle-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .details-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .section-header h1 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .filter-tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-tab {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid,
    .stats-grid.secondary {
        grid-template-columns: 1fr;
    }
    
    .player-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .miracle-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
/* ===== SIDEBAR SEO & LEGAL ===== */
.sidebar-manual {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.sidebar-manual h4 {
    color: var(--primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.manual-content p {
    margin-bottom: 8px;
}

.sidebar-legal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 5px;
}

.sidebar-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-legal a:hover {
    color: var(--primary);
    text-shadow: 0 0 5px var(--primary-glow);
}

/* ===== COOKIE BANNER CYBERPUNK ===== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 280px; /* Evita la sidebar */
    background: rgba(5, 5, 12, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow), inset 0 0 10px rgba(0, 255, 255, 0.1);
    z-index: 9999;
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.cookie-content i {
    font-size: 1.5rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-main);
    flex: 1;
}

.cookie-btns {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-btn {
    background: var(--primary);
    color: var(--text-dark);
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn:hover {
    box-shadow: 0 0 15px var(--primary-glow);
    transform: scale(1.05);
}

.cookie-link {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: underline;
}

@media (max-width: 992px) {
    .cookie-banner {
        left: 20px;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}
.system-dossier {
    margin-top: 60px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.system-dossier h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-shadow: 0 0 10px var(--primary-glow);
}
.system-dossier p { margin-bottom: 15px; }

/* Stile sidebar legale */
.sidebar-legal {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-legal a {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    transition: 0.3s;
}
.sidebar-legal a:hover { color: var(--primary); }
/* Tasto Info in Header */
.btn-info {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-info:hover {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Stile Modal Cyberpunk */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Nascosto ma presente nel DOM */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-darker);
    border: 1px solid var(--primary);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 30px var(--primary-glow);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-darker);
}

.modal-body { padding: 30px; }

.guide-section { margin-bottom: 30px; }
.guide-section h3 { color: var(--primary); margin-bottom: 15px; font-family: 'Orbitron'; }
.guide-section p { color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }

.manual-list { list-style: none; }
.manual-list li { margin-bottom: 10px; color: var(--text-main); font-size: 0.9rem; }

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 10px;
}
.badge.new { border: 1px solid var(--success); color: var(--success); }
.badge.lost { border: 1px solid var(--error); color: var(--error); }
.badge.ghost { border: 1px solid var(--text-muted); color: var(--text-muted); }

.close-modal {
    background: none; border: none; color: var(--primary);
    font-size: 2rem; cursor: pointer;
}