/* ==========================================================================
   ARMA REFORGER ITALIA - STYLE.CSS (REFATTORIZZATO TEMA ARANCIONE)
   ========================================================================== */
/* --- LOCAL FONTS (GDPR COMPLIANT) --- */

/* ROBOTO (v50) */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v50-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/roboto-v50-latin-700.woff2') format('woff2');
}

/* RAJDHANI (v17) */
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/rajdhani-v17-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/rajdhani-v17-latin-700.woff2') format('woff2');
}

/* INTER (v20) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}

:root {
    /* TEMA ARMA REFORGER - Palette Colori */
    --primary: #f39c12;         /* Arancione principale (stile Reforger) */
    --primary-hover: #e67e22;   /* Arancione scuro per hover */
    --accent: #e74c3c;          /* Rosso (rimane per allerte/errori) */
    --discord: #5865F2;         /* Colore ufficiale Discord */
    
    /* Sfondi scuri con toni leggermente più "caldi/militari" rispetto al blu di prima */
    --dark-bg: #111111;         
    --card-bg: rgba(26, 26, 26, 0.95);
    
    --text-main: #f5f5f5;       /* Testo chiaro leggibile */
    
    /* Font */
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    color: var(--text-main); font-family: var(--font-body);
    background: var(--dark-bg); 
    min-height: 100vh;
}

/* OVERLAY SFONDO - Renderlo leggermente più opaco e caldo */
body::before {
    content: ''; position: fixed; inset: 0;
    background: rgba(10, 10, 10, 0.92); z-index: -1;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* --- LAYOUT GENERALE --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px; 
    display: block !important;
}

/* --- RESPONSIVE MOBILE (Sotto i 768px) --- */
@media (max-width: 768px) {
    .container { padding: 10px; }
    .live-content { padding: 15px; }
    .live-header {
        flex-direction: row; 
        align-items: center;
        gap: 12px;
    }
    .live-logo-img { width: 50px; height: 50px; }
    .live-title-block a[data-role="name"] { font-size: 1.2rem; }
    .live-actions-block {
        width: 100%; align-items: center; flex-direction: row; justify-content: space-between; margin-top: 10px;
    }
    .status-badge { font-size: 0.6rem; padding: 1px 6px; }
    .live-buttons { justify-content: flex-end; width: 100%; }
}

/* HEADER */
header { 
    padding: 40px 20px; 
    text-align: center; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent); 
}
header h1 { 
    margin: 0; 
    font-family: var(--font-head); 
    font-size: 3.5rem; 
    text-transform: uppercase; 
    color: #fff; 
    /* Cambiato bagliore in arancione */
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.4); 
}

.main-nav { margin-top: 20px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.main-nav a { 
    padding: 8px 16px; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 6px; 
    color: #ccc; 
    font-weight: 600; 
    text-transform: uppercase; /* Stile più militare */
    letter-spacing: 0.5px;
}
.main-nav a:hover, .main-nav a.active { 
    background: var(--primary); 
    color: #000; 
    border-color: var(--primary); 
}

/* --- SERVER CARDS --- */
.live-server-card {
    position: relative; width: 100%; min-height: 200px; margin-bottom: 30px;
    border-radius: 8px; /* Bordo meno rotondo, più squadrato e "militare" */
    overflow: hidden;
    background-color: #111; background-size: cover; background-position: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
/* Cambiato colore hover in arancione */
.live-server-card:hover { transform: translateY(-5px); border-color: rgba(243, 156, 18, 0.5); }
.live-server-card::before {
    content: ''; position: absolute; inset: 0;
    /* Sfumatura leggermente più scura e neutra */
    background: linear-gradient(90deg, rgba(15,15,15,0.95) 0%, rgba(15,15,15,0.85) 60%, rgba(15,15,15,0.4) 100%);
    z-index: 1;
}

.live-content { position: relative; z-index: 2; padding: 25px; height: 100%; display: flex; flex-direction: column; gap: 15px; }

/* CARD HEADER */
.live-header { display: flex; align-items: center; gap: 20px; }
/* Logo leggermente più squadrato per Reforger */
.live-logo-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0; background: #000; }

.live-title-block { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.live-title-block a[data-role="name"] {
    font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: #fff;
    text-shadow: 1px 1px 2px #000; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-transform: uppercase; /* I nomi dei server in Reforger spesso stanno bene in maiuscolo */
    letter-spacing: 0.5px;
}
.live-title-block a[data-role="name"]:hover { color: var(--primary); }

.live-status-row { display: flex; align-items: center; gap: 10px; }
.server-tags { display: flex; gap: 5px; flex-wrap: wrap; }

/* BADGES */
.status-badge { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
/* Online badge in verde (unica eccezione, l'online verde va sempre bene) */
.status-online { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.status-offline { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; }
.status-dead { background: #333; color: #aaa; border: 1px solid #555; }

.tag-badge { font-size: 0.65rem; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #ccc; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Adattato Crossplay badge */
.crossplay-badge {
    background: rgba(46, 204, 113, 0.15); color: #2ecc71; border-color: #2ecc71;
}

.badge-rank {
    display: inline-flex; align-items: center; gap: 6px;
    /* Mantenuto dorato/aranciato, si sposa bene con il tema Reforger */
    background: linear-gradient(135deg, #f1c40f, #e67e22); color: #000;
    padding: 5px 12px; border-radius: 6px; font-weight: 800; font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4); margin-bottom: 5px;
}

/* ACTIONS & BUTTONS */
.live-actions-block { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.live-buttons { display: flex; gap: 8px; }

.live-btn { font-size: 0.75rem; font-weight: 700; padding: 8px 14px; border-radius: 6px; display: flex; align-items: center; gap: 6px; transition: 0.2s; border: 1px solid transparent; text-transform: uppercase;}
/* Cambiato tasto play in arancione */
.live-btn-play { background: rgba(243, 156, 18, 0.1); border-color: var(--primary); color: #fff; }
.live-btn-play:hover { background: var(--primary); color: #000; }
.live-btn-discord { background: rgba(88, 101, 242, 0.2); border-color: var(--discord); color: #ccc; }
.live-btn-discord:hover { background: var(--discord); color: #fff; }
.live-btn-info { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: #aaa; padding: 8px 12px; }
.live-btn-info:hover { border-color: #fff; color: #fff; }

.btn-text-desktop { display: none; margin-left: 4px; }

/* INFO ROW & CHART */
.live-info-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.9rem; color: #ccc; margin-top: 5px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 15px; }
.live-info-item { display: flex; align-items: center; gap: 6px; }
.live-icon { color: var(--primary); }

.live-chart-wrapper { width: 100%; height: 60px; margin-top: 10px; opacity: 0.8; }
.live-chart-wrapper canvas { width: 100% !important; height: 100% !important; }

/* TIME (Giorno/Notte) */
[data-role="time"] { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #aaa; }
[data-role="time"] .day-icon { color: #f1c40f !important; text-shadow: 0 0 10px rgba(241, 196, 15, 0.6); }
[data-role="time"] .night-icon { color: inherit; }

/* RIBBONS */
.is-new { border: 2px solid var(--primary); box-shadow: 0 0 15px rgba(243, 156, 18, 0.15); }
.new-ribbon { position: absolute; top: 20px; right: -35px; background: var(--primary); color: #000; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; padding: 5px 40px; transform: rotate(45deg); z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.5); pointer-events: none; }
.hidden-ribbon { position: absolute; top: 15px; left: -35px; background: #333; color: #fff; font-weight: 800; font-size: 0.65rem; text-transform: uppercase; padding: 5px 40px; transform: rotate(-45deg); z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.8); pointer-events: none; border-bottom: 2px solid var(--accent); }

/* --- COMPONENTI EXTRA (Prefazione, Descrizione, Footer) --- */
.preface-card {
    background: var(--card-bg);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 15px 20px; 
    margin-bottom: 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #e1e1e6;
    font-size: 0.95rem; 
    line-height: 1.5;
    position: relative;
}
.preface-card p { margin: 0 0 8px 0; }
.preface-card p:last-child { margin-bottom: 0; }

/* --- DESCRIZIONE SERVER (Stile Discord) --- */
.desc-box {
    background: rgba(30, 30, 32, 0.8); /* Leggermente diverso, stile terminale */
    border-left: 4px solid var(--discord); 
    border-radius: 6px;
    padding: 20px; 
    margin-top: 15px;
    color: #dcddde; 
    font-family: 'Inter', sans-serif; 
    font-size: 1rem; 
    line-height: 1.375; 
    word-wrap: break-word;
}
.desc-box p { margin: 0 0 6px 0; }
.desc-box p:last-child { margin-bottom: 0; }
.desc-box img { vertical-align: bottom; max-width: 100%; height: auto; border-radius: 4px; }
.desc-box span { line-height: 1.4; }
.desc-box h1, .desc-box h2, .desc-box h3 { color: #fff; margin: 15px 0 8px 0; font-weight: 700; line-height: 1.2; font-family: var(--font-head); text-transform: uppercase;}
.desc-box h1 { font-size: 1.5rem; border-bottom: 1px solid #4f545c; padding-bottom: 5px; color: var(--primary);}
.desc-box h2 { font-size: 1.3rem; color: #fff; }
.desc-box h3 { font-size: 1.1rem; color: #b9bbbe; font-weight: 800; font-size: 0.85rem; }
.desc-box ul, .desc-box ol { margin: 5px 0 10px 20px; padding-left: 0; }
.desc-box li { margin-bottom: 2px; }
.desc-box ul li::marker { color: var(--primary); } /* Marker puntati arancioni invece che blu */
.desc-box a { color: var(--primary); text-decoration: none; }
.desc-box a:hover { text-decoration: underline; color: var(--primary-hover); }
.desc-box blockquote { border-left: 4px solid #4f545c; background: inherit; margin: 5px 0; padding: 0 10px; color: #a3a6aa; font-style: normal; }

.btn-chart {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: #aaa; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-weight: 600; text-transform: uppercase; font-size: 0.8rem;
}
.btn-chart.active { background: var(--primary); color: #000; border-color: var(--primary); }

/* WIDGET SIDEBAR */
.widget-box { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.widget-box h3 { margin-top: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.5px;}
.widget-box.upcoming h3 { color: #f1c40f; }
.widget-box.new h3 { color: var(--primary); }

.mini-server-card { display: flex; align-items: center; gap: 15px; padding: 12px; border-radius: 6px; transition: all 0.2s; text-decoration: none; color: #fff; border: 1px solid transparent; background: rgba(0,0,0,0.2); margin-bottom: 10px; }
.mini-server-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.mini-server-card:last-child { margin-bottom: 0; }

.mini-logo { width: 50px; height: 50px; border-radius: 6px; background-size: cover; background-position: center; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.mini-info { display: flex; flex-direction: column; gap: 4px; overflow: hidden; width: 100%; }
.mini-name { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e1e1e6; font-family: var(--font-head); text-transform: uppercase;}
.mini-meta { font-size: 0.75rem; color: #aaa; display: flex; align-items: center; gap: 6px; }
.meta-highlight { color: #f1c40f; font-weight: 600; }
.meta-new { color: var(--primary); font-weight: 600; }

/* PAGINAZIONE */
.pagination-container { display: flex; justify-content: center; gap: 8px; margin-top: 40px; margin-bottom: 20px; }
.page-btn { background: rgba(255, 255, 255, 0.05); color: #ccc; padding: 10px 16px; border-radius: 4px; text-decoration: none; font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.2s ease; text-transform: uppercase; font-size: 0.85rem;}
.page-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; transform: translateY(-2px); }
.page-btn.active { background: var(--primary); color: #000; border-color: var(--primary); box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3); }

/* BADGE TOTALE GIOCATORI */
.global-players-badge {
    background: rgba(243, 156, 18, 0.08); /* Sfondo arancione chiaro */
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 4px; /* Più squadrato */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.05);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 0 rgba(243, 156, 18, 0.7);
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

footer { margin-top: 60px; padding: 30px; background: #08090b; text-align: center; color: #666; font-size: 0.85rem; border-top: 1px solid #222; }

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
    .btn-text-desktop { display: inline; }
}

@media (max-width: 768px) {
    .live-header { flex-direction: column; align-items: flex-start; }
    .live-actions-block { width: 100%; align-items: center; flex-direction: row; justify-content: space-between; margin-top: 15px; }
    .live-info-row { flex-direction: column; gap: 10px; align-items: flex-start; }
    .live-info-row .right-col { text-align: left !important; width: 100%; display: flex; justify-content: space-between; }
}
/* --- Supporto Allineamento Quill (Editor) --- */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* mostra sito web */
@media (max-width: 768px) {
    .btn-text-desktop { display: none; }
}
