/* assets/css/storicosquadra.css */

/* =========================================
   1. FONTS & VARIABILI
   ========================================= */
@font-face {
  font-family: 'DrukWide';
  src: url('/assets/doc/DrukWideBold.otf') format('opentype');
  font-weight: bold;
}
@font-face {
  font-family: 'HelveticaBold';
  src: url('/assets/doc/HelveticaBold.ttf') format('truetype');
  font-weight: bold;
}

:root {
  --rosa-neon: #ff19ff;
  --bianco: #ffffff;
  --nero-transp: rgba(0, 0, 0, 0.85);
  --bg-card: rgba(0, 0, 0, 0.6);
  --verde: #00ff66;
  --rosso: #ff3333;
  --bordo: rgba(255, 255, 255, 0.15);
}

body {
    background: transparent !important;
    color: var(--bianco);
    font-family: 'HelveticaBold', sans-serif;
}

body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: url('/assets/imm/sfondouml25.jpg') center/cover no-repeat;
    z-index: -1;
}

.druk-font { font-family: 'DrukWide', sans-serif; letter-spacing: 0; text-transform: uppercase; }
.helvetica-font { font-family: 'HelveticaBold', sans-serif; letter-spacing: 0; text-transform: uppercase; }

.container {
    max-width: 1100px; width: 95%; margin: 20px auto;
    animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   2. HEADER GRID (Identità + Stats)
   ========================================= */
.team-header-grid {
    display: flex; justify-content: space-between; align-items: stretch;
    gap: 30px; background: var(--nero-transp); padding: 30px;
    border-radius: 16px; margin-bottom: 30px; border: 1px solid var(--bordo);
}

.th-identity { display: flex; align-items: center; gap: 30px; flex: 1; }
.th-image-wrapper img {
    width: 180px; height: 180px; object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}
.th-text { display: flex; flex-direction: column; justify-content: center; }
.th-name {
    font-family: 'DrukWide', sans-serif; font-size: 2.5rem;
    color: var(--rosa-neon); line-height: 1; margin-bottom: 10px; text-transform: uppercase;
}
.th-desc {
    font-family: 'HelveticaBold', sans-serif; font-size: 0.8rem;
    color: #ccc; text-transform: uppercase; max-width: 400px; line-height: 1.4;
}

.th-stats-container {
    display: flex; gap: 0; border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 30px;
}
.stats-col {
    display: flex; flex-direction: column; justify-content: center; gap: 20px;
    padding: 0 20px;
}
.stat-box { text-align: left; }
.stat-label {
    font-size: 0.65rem; color: var(--rosa-neon); margin-bottom: 4px; text-transform: uppercase;
}
.stat-number {
    font-family: 'DrukWide', sans-serif; font-size: 1.8rem; color: var(--bianco); line-height: 1;
}
.stat-outcome { display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-v { background: var(--verde); }
.dot-n { background: var(--bianco); }
.dot-p { background: var(--rosso); }


/* =========================================
   3. PALMARES (NEW)
   ========================================= */
.trophies-container {
  position: relative;
  background: rgba(0,0,0,0.7);
  padding: 35px 30px 25px 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  border: 1px solid rgba(255,25,255,0.25);
}

.section-label {
  position: absolute; top: 15px; left: 20px;
  font-family: 'HelveticaBold', sans-serif; font-size: 0.8rem;
  color: var(--bianco); text-transform: uppercase; letter-spacing: 0;
}

.trophies-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 30px; margin-top: 10px;
}

.trophy-card {
  display: flex; flex-direction: column; align-items: center;
  height: 110px; width: 90px; transition: transform 0.3s ease;
}
.trophy-card:hover { transform: translateY(-3px); }

.trophy-upper-content {
  flex-grow: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center; width: 100%;
}

.trophy-img-std { height: 55px; width: auto; margin-bottom: 5px; }
.trophy-img-small { height: 35px; width: auto; }

.trophy-year { font-size: 0.85rem; color: var(--bianco); margin-top: 2px; }

.trophy-label {
  font-family: 'HelveticaBold', sans-serif; font-size: 0.6rem;
  color: #ffffff; text-align: center; text-transform: uppercase;
  margin-top: 8px; width: 100%; line-height: 1.2;
}


/* assets/css/storicosquadra.css */

/* ... (Il resto del CSS rimane uguale fino alla sezione 3. TOP PLAYERS) ... */

/* =========================================
   3. TOP PLAYERS (Cards & Grid)
   ========================================= */
.top-players-container {
    margin-bottom: 40px; width: 100%;
}

.top-players-grid {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
}

.top-player-card {
    flex: 1; min-width: 300px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px; padding: 20px;
    display: flex; flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.top-player-card h4 {
    color: var(--rosa-neon); font-family: 'DrukWide', sans-serif;
    font-size: 0.9rem; text-transform: uppercase; text-align: center;
    margin: 0 0 15px 0; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); letter-spacing: 0.5px;
}

.player-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.2s;
}
.player-row:last-of-type { border-bottom: none; }
.player-row:hover { background: rgba(255, 255, 255, 0.05); border-radius: 6px; }

/* FIX FOTO: Quadrato smussato + Outline */
.player-photo {
    width: 45px; height: 45px;
    border-radius: 8px; /* Quadrato stondato */
    object-fit: cover;
    
    /* DEFAULT: Outline Grigio Semi-Trasparente */
    border: 2px solid rgba(200, 200, 200, 0.2); 
    background-color: #111;
    
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* PRIMO IN CLASSIFICA: Outline Rosa Neon */
/* Seleziona la .player-photo dentro il PRIMO .player-row di ogni card */
.player-row:first-of-type .player-photo {
    border-color: var(--rosa-neon);
    box-shadow: 0 0 6px rgba(255, 25, 255, 0.3); /* Leggero glow rosa */
}

.player-name {
    flex: 1; color: var(--bianco); text-decoration: none;
    font-size: 0.85rem; font-weight: bold; text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s;
}
.player-name:hover { color: var(--rosa-neon); }

.player-value {
    font-family: 'DrukWide', sans-serif; font-size: 0.9rem;
    color: var(--rosa-neon); text-align: right; white-space: nowrap;
}

.see-all-btn {
    margin-top: auto; background: transparent;
    border: 1px solid var(--rosa-neon); color: var(--rosa-neon);
    padding: 10px; border-radius: 6px; cursor: pointer;
    font-family: 'HelveticaBold', sans-serif; text-transform: uppercase;
    font-size: 0.75rem; width: 100%; transition: all 0.3s;
}
.see-all-btn:hover { background: var(--rosa-neon); color: #fff; box-shadow: 0 0 10px var(--rosa-neon); }

/* =========================================
   5. STAGIONI & PARTITE
   ========================================= */
.season-box {
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: var(--bg-card);
    overflow: hidden;
    
    /* MODIFICA RICHIESTA: Outline rosa trasparente graduale */
    outline: 1px solid transparent;
    transition: outline 0.4s ease; 
}

.season-box:hover {
    outline: 1px solid rgba(255, 25, 255, 0.25); /* Rosa molto trasparente */
}

.season-header {
    padding: 15px 20px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05); transition: background 0.2s;
}
.season-header:hover { background: rgba(255,255,255,0.1); }
.season-title { font-family: 'DrukWide', sans-serif; font-size: 1rem; color: var(--bianco); }
.toggle-icon { color: var(--rosa-neon); transition: transform 0.3s; }
.active .toggle-icon { transform: rotate(90deg); }

.season-content { display: none; padding: 0; }
.season-content a { text-decoration: none !important; color: var(--bianco) !important; display: block; }

.match-row {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.2s; color: var(--bianco);
}
.match-row:hover { background: rgba(255,25,255,0.05); }

.match-info-left { display: flex; flex-direction: column; gap: 4px; }

.match-meta-line { display: flex; align-items: center; gap: 5px; }
.match-phase { font-size: 0.7rem; color: #aaa; text-transform: uppercase; font-weight: bold; }
.match-date-inline { font-size: 0.7rem; color: #888; text-transform: uppercase; }

.match-teams { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.m-logo { width: 24px; height: 24px; object-fit: contain; }
.m-score {
    font-family: 'DrukWide', sans-serif; font-size: 1.1rem;
    color: var(--rosa-neon); min-width: 50px; text-align: center;
}
.m-name { font-size: 0.9rem; font-weight: bold; text-transform: uppercase; color: var(--bianco); }

/* V/N/P Indicatori */
.result-char {
  font-family: 'DrukWide', sans-serif; font-size: 0.9rem;
  width: 20px; text-align: center; letter-spacing: 0;
}
.esito-v { color: var(--verde); }
.esito-n { color: var(--bianco); }
.esito-p { color: var(--rosso); }


/* =========================================
   6. MODALS
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px); overflow-y: auto;
}
.modal-content {
    background-color: #111; margin: 10% auto; padding: 20px;
    border: 1px solid var(--rosa-neon); border-radius: 12px;
    width: 90%; max-width: 500px;
    box-shadow: 0 0 30px rgba(255, 25, 255, 0.2);
    position: relative; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-content h4 {
    color: var(--rosa-neon); font-family: 'DrukWide', sans-serif;
    text-align: center; margin-top: 0; margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.close {
    color: #aaa; float: right; font-size: 28px; font-weight: bold;
    cursor: pointer; position: absolute; right: 15px; top: 10px; line-height: 1;
}
.close:hover { color: var(--rosa-neon); }

/* MOBILE */
@media (max-width: 768px) {
    .team-header-grid { flex-direction: column; padding: 20px; gap: 20px; }
    .th-identity { flex-direction: column; text-align: center; gap: 15px; }
    .th-image-wrapper img { width: 120px; height: 120px; }
    .th-name { font-size: 1.8rem; }
    
    .th-stats-container {
        border-left: none; border-top: 1px solid rgba(255,255,255,0.2);
        padding-top: 20px; padding-left: 0;
        display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    }
    .stats-col { padding: 0; align-items: center; text-align: center; }
    .stat-box { text-align: center; }
    
    .top-players-container { flex-direction: column; }
    
    .match-row { flex-direction: row; align-items: center; }
    .match-info-left { flex: 1; }
    
    .modal-content { margin: 20% auto; width: 95%; }
}