/* =========================================
   1. VARIABLES Y MODO OSCURO
   ========================================= */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --danger-color: #e53e3e;
    --danger-hover: #c53030;
    --success-color: #38a169;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #121212;
        --bg-card: #1e1e1e;
        --text-main: #e0e0e0;
        --text-muted: #aaaaaa;
        --border-color: #333333;
        --shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
}

/* =========================================
   2. RESET Y BASE
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
    text-size-adjust: 100%;
}

/* =========================================
   3. COMPONENTES (Contenedores y Cards)
   ========================================= */
.auth-container {
    background: var(--bg-card);
    /* --- MODIFICADO PARA FULL HEIGHT --- */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 30px;
    /* ----------------------------------- */
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin: 0 auto;
}

/* --- NUEVA CLASE PARA CENTRAR --- */
.auth-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 340px; /* Ancho real del formulario */
    margin: 0 auto;
}
/* ----------------------------------- */

/* =========================================
   4. FORMULARIOS E INPUTS
   ========================================= */
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--bg-card);
    color: var(--text-main);
    transition: border 0.3s, background-color 0.3s, color 0.3s;
    -webkit-appearance: none;
}

input:focus { outline: none; border-color: var(--primary-color); }

.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { padding-right: 45px; }

.eye-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
}

/* =========================================
   5. BOTONES
   ========================================= */
button {
    width: 100%;
    padding: 13px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    transition: background 0.3s, transform 0.1s;
    -webkit-appearance: none;
}
button:hover { background-color: var(--primary-hover); }
button:disabled { background-color: #cbd5e0; cursor: not-allowed; }

/* =========================================
   6. UTILIDADES Y VALIDACIÓN
   ========================================= */
#password-requirements {
    text-align: left;
    background: var(--bg-body);
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.85rem;
}
#password-requirements p { display: flex; align-items: center; gap: 10px; margin: 5px 0; }

.invalid { color: var(--danger-color); }
.valid { color: var(--success-color); }

/* Mensajes de error / éxito en el formulario de autenticación */
.auth-error {
    background: rgba(229, 62, 62, 0.12);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 10px;
}

.auth-error.auth-success {
    background: rgba(56, 161, 105, 0.12);
    border-color: var(--success-color);
    color: var(--success-color);
}

.eye-icon:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ajuste del footer */
.auth-footer { margin-top: auto; font-size: 0.9rem; color: var(--text-muted); padding-bottom: 10px; }
.auth-toggle { color: var(--primary-color); cursor: pointer; font-weight: 600; }

/* =========================================
   7. MEDIA QUERY: RESPONSIVE (MÓVILES)
   ========================================= */
@media (max-width: 768px) {
    body { font-size: 14px; }

    .auth-container {
        width: 100% !important;
        padding: 20px !important;
    }

    h2 { font-size: 24px !important; margin-bottom: 20px; }

    input { padding: 12px !important; font-size: 16px !important; }
    button { padding: 14px !important; font-size: 16px !important; }
}

/* ... resto del CSS (Quick actions, Header, Perfil) igual ... */
.quick-actions-container { position: fixed; bottom: 20px; left: 0; width: 100%; z-index: 100; padding: 0 10px; }
.quick-actions-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.quick-actions-scroll::-webkit-scrollbar { height: 6px; }
.quick-actions-scroll::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 3px; }
.action-btn { background-color: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); padding: 10px 18px; border-radius: 50px; font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); white-space: nowrap; flex-shrink: 0; transition: all 0.2s; width: auto !important; margin-top: 0; }
.action-btn:hover { background-color: var(--bg-body); }
.action-btn i { color: var(--primary-color); font-size: 1.1rem; }
.dashboard-header { position: fixed; top: 0; left: 0; width: 100%; height: 60px; background-color: var(--bg-card); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 1000; }
.logo { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); }
.profile-menu { position: relative; cursor: pointer; }
.profile-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); }
.dropdown-content { display: none; position: absolute; right: 0; top: 50px; background-color: var(--bg-card); min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); border-radius: 8px; z-index: 1000; overflow: hidden; }
.dropdown-content a { color: var(--text-main); padding: 12px 16px; text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.dropdown-content a:hover { background-color: var(--bg-body); }
.dropdown-content.show { display: block; }
.content-area { margin-top: 80px; padding: 20px; text-align: center; padding-bottom: 100px; }
.back-link { text-decoration: none; color: var(--text-main); display: flex; align-items: center; gap: 8px; font-size: 14px; }
.profile-container { background: var(--bg-card); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 400px; margin: 0 auto; text-align: center; }
.profile-pic-large { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary-color); margin-bottom: 20px; }
.user-id { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 30px; word-break: break-all; }
.profile-actions { display: flex; justify-content: center; }
.btn-profile { background-color: var(--danger-color); color: white; border: none; padding: 12px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 10px; width: auto; }
.btn-profile:hover { background-color: var(--danger-hover); }
.btn-edit-pic { background-color: var(--primary-color); color: white; border: none; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 12px; margin-bottom: 20px; display: flex; align-items: center; gap: 5px; margin-left: auto; margin-right: auto; width: auto; }

/* --- ESTILOS NUEVOS PARA PACKS Y TARJETAS --- */

/* Barra de herramientas (Búsqueda y botón +) */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar {
    flex-grow: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
}

.btn-add {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Rejilla de Packs */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 80px; /* Espacio para el menú inferior */
}

.pack-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.pack-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.pack-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.pack-title {
    font-weight: bold;
    word-break: break-word;
}

/* Estilos para Tarjetas (Pregunta/Respuesta) */
.card-item {
    background: #1a1a1a;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    text-align: left;
    position: relative;
}

.card-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-text {
    font-size: 1rem;
    margin-bottom: 15px;
    white-space: pre-wrap; /* Respeta saltos de línea */
}

.btn-delete-mini {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
}

/* Formulario flotante simple */
.form-section {
    background: #252525;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.input-area {
    width: 100%;
    background: #111;
    border: 1px solid #444;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 60px;
}

/* ---------- OAuth (Google) ---------- */

.oauth-separator {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #888;
}

.oauth-separator::before,
.oauth-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #333;
}

.oauth-separator span {
    margin: 0 10px;
    font-size: 0.85rem;
}

.google-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-btn:hover {
    background: #f5f5f5;
}

.google-icon {
    width: 18px;
    height: 18px;
}


/* =========================
   LIGA - CLASIFICACIÓN
========================= */

.page-container {
    max-width: 600px;
    margin: auto;
    padding: 20px;
}

.header-simple {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.header-simple h1 {
    font-size: 1.6rem;
    margin: 0;
}

.back-link {
    color: white;
    font-size: 1.2rem;
}

.league-container {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
}

.league-table {
    width: 100%;
    border-collapse: collapse;
}

.league-table th,
.league-table td {
    padding: 10px 6px;
    text-align: center;
    font-size: 0.85rem;
}

.league-table th {
    background: #111;
    color: #aaa;
    font-weight: normal;
    border-bottom: 1px solid #333;
}

.league-table td {
    border-bottom: 1px solid #2a2a2a;
}

.league-table tr:last-child td {
    border-bottom: none;
}

.league-table tr.user-team {
    background: rgba(52, 152, 219, 0.18);
    font-weight: bold;
}

.league-table tr:hover {
    background: rgba(255,255,255,0.05);
}

/* =========================
   COMPETICIONES
========================= */

.competitions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.competition-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    text-decoration: none;
    color: white;
    transition: background 0.2s, border-color 0.2s;
}

.competition-card:hover {
    background: #222;
    border-color: #3498db;
}

.competition-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.competition-icon {
    font-size: 2rem;
    width: 40px;
    text-align: center;
}

.competition-info h2 {
    margin: 0;
    font-size: 1.2rem;
}

.competition-info p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #aaa;
}

/* =========================
   PREMIUM CUP
========================= */

.cup-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    color: #f1c40f;
}

.cup-section {
    margin-top: 20px;
}

.cup-section h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cup-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
}

.cup-card:hover {
    background: #222;
    border-color: #f1c40f;
}

.cup-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cup-result-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem;
}

.cup-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f1c40f22, #1a1a1a);
    border: 1px solid #f1c40f55;
    border-radius: 16px;
    margin-bottom: 20px;
}

.cup-hero i {
    font-size: 2.5rem;
    color: #f1c40f;
}

.cup-hero h1 {
    margin: 0;
    font-size: 1.6rem;
}

.cup-hero p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #ddd;
}

.cup-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.cup-round {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    margin: 0 4px;
    border-radius: 20px;
    background: #222;
    color: #777;
    font-size: 0.8rem;
    border: 1px solid #333;
}

.cup-round.completed {
    background: #2ecc71;
    color: #000;
    border-color: #2ecc71;
}

.cup-round.active {
    background: #f1c40f;
    color: #000;
    border-color: #f1c40f;
}

.cup-match-card {
    background: #1a1a1a;
    border: 1px solid #f1c40f55;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.cup-match-card .teams {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.cup-match-card .vs {
    color: #f1c40f;
    font-weight: bold;
}

.play-match-btn {
    background: #f1c40f;
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
}

.play-match-btn:hover {
    background: #ffd84d;
}

.cup-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cup-history-item {
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    background: #1a1a1a;
    border: 1px solid #333;
}

.cup-history-item.win {
    border-color: #2ecc71;
    color: #2ecc71;
}

.cup-history-item.loss {
    border-color: #e74c3c;
    color: #e74c3c;
}

.cup-round-card {
  background: #1a1a1a;
  border: 1px solid #f1c40f55;
  border-radius: 16px;
  padding: 16px;
}

.round-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #f1c40f;
}

.round-format {
  color: #aaa;
}

.legs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.leg {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.leg.played {
  border-color: #2ecc71;
}

.leg.pending {
  border-color: #f1c40f;
}

.leg-title {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #aaa;
}

.leg-status {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.leg-score {
  font-size: 0.8rem;
  color: #2ecc71;
}

.global-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.penalties-box {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #e74c3c22;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  text-align: center;
  font-size: 0.85rem;
}

.global-positive {
  color: #2ecc71;
}

.global-negative {
  color: #e74c3c;
}

.global-neutral {
  color: #aaa;
}

@keyframes packCompleteIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#pack-complete-panel {
  animation: packCompleteIn 0.45s ease-out;
}

/* 🔵 Barra de progreso del pack */
.progress-bar.pack-progress {
    position: relative;
    background: #0f1a2a;
    border-radius: 6px;
    overflow: visible;
    height: 10px;
}

.pack-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2f80ff, #56ccf2);
    transition: width 0.35s ease;
}

.pack-progress-label {
    position: absolute;
    right: 0;
    top: 14px;
    font-size: 11px;
    opacity: 0.75;
    color: #9ecbff;
    pointer-events: none;
}



/* 🔵 Pulso al avanzar */
.pack-progress-pulse {
    animation: packPulse 0.35s ease;
}

@keyframes packPulse {
    0%   { filter: brightness(1); }
    50%  { filter: brightness(1.4); }
    100% { filter: brightness(1); }
}

/* 🏆 Celebración al completar pack */
.pack-progress-complete {
    animation: packCompleteGlow 0.8s ease;
}

@keyframes packCompleteGlow {
    0%   { box-shadow: 0 0 0 rgba(86,204,242,0); }
    50%  { box-shadow: 0 0 12px rgba(86,204,242,0.9); }
    100% { box-shadow: 0 0 0 rgba(86,204,242,0); }
}

.pack-progress-fade-out {
    animation: packFadeOut 0.6s ease forwards;
}

@keyframes packFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.98);
    }
}

/* =========================
   SALA DE TROFEOS
========================= */
.trophy-page {
    padding-bottom: 100px;
}

/* Barra inferior fija con el botón "Volver" (no afectada por el scroll) */
.trophy-back-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, #0f0f0f 60%, #0f0f0ff2 85%, transparent);
}

.trophy-back-btn {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border-radius: 12px;
    background: #1f1f1f;
    border: 1px solid #333;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.trophy-back-btn:hover {
    background: #222;
    border-color: #555;
}

.trophy-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: linear-gradient(135deg, #f1c40f22, #1a1a1a 60%);
    border: 1px solid #f1c40f55;
    border-radius: 18px;
    margin-bottom: 16px;
}

.trophy-hero-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #f1c40f;
    background: radial-gradient(circle at 30% 30%, #f1c40f33, #1a1a1a);
    border: 1px solid #f1c40f66;
    border-radius: 50%;
}

.trophy-hero-info h2 {
    margin: 0;
    font-size: 1.25rem;
}

.trophy-hero-info p {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: #ccc;
}

.trophy-progress-wrap {
    margin-bottom: 24px;
}

.trophy-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    color: #f1c40f;
    margin-bottom: 6px;
}

.trophy-progress {
    height: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 999px;
    overflow: hidden;
}

.trophy-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b8860b, #f1c40f, #fff2b0);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.trophy-section {
    margin-top: 28px;
}

.trophy-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: #f1c40f;
}

.trophy-section-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.trophy-card {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.trophy-card:hover {
    transform: translateY(-4px);
}

.trophy-card.earned {
    background: linear-gradient(160deg, #221c0e, #1a1a1a 55%);
}

.trophy-card.earned.tier-gold { border-color: #f1c40f88; }
.trophy-card.earned.tier-silver { border-color: #c0c0c088; }
.trophy-card.earned.tier-bronze { border-color: #cd7f3288; }

.trophy-card.locked {
    opacity: 0.55;
    filter: grayscale(0.6);
}

.trophy-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
    line-height: 1;
}

.trophy-icon.tier-gold { color: #f1c40f; }
.trophy-icon.tier-silver { color: #d8d8d8; }
.trophy-icon.tier-bronze { color: #cd7f32; }
.trophy-icon.tier-locked { color: #666; }

.trophy-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trophy-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
}

.trophy-desc {
    font-size: 0.78rem;
    color: #999;
    line-height: 1.35;
}

.trophy-date {
    margin-top: 6px;
    font-size: 0.72rem;
    color: #f1c40f;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.trophy-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #2ecc71;
    font-size: 1.1rem;
}

.trophy-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #888;
    font-size: 0.9rem;
}

.trophy-count-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f1c40f;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.trophy-card.earned .trophy-icon {
    animation: trophy-glow-pulse 3s ease-in-out infinite;
}

@keyframes trophy-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(241,196,15,0.25)); }
    50% { filter: drop-shadow(0 0 10px rgba(241,196,15,0.6)); }
}

.trophy-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 30px 10px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.trophy-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    color: #f1c40f66;
}

/* =========================
   SALA DE TROFEOS (VITRINA)
========================= */
.vitrina-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

.vitrina-stat {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
}

.vitrina-stat i {
    color: #f1c40f;
    font-size: 1.3rem;
    display: block;
    margin-bottom: 6px;
}

.vitrina-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.vitrina-stat-label {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 4px;
    display: block;
}

.vitrina-section {
    margin-top: 26px;
}

.vitrina-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: #f1c40f;
}

.vitrina-shelf {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 22px;
    padding: 26px 18px 22px;
    background: linear-gradient(180deg, #17150f, #141414);
    border: 1px solid #333;
    border-radius: 14px;
    position: relative;
    min-height: 120px;
}

.vitrina-shelf::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 9px;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #4a2e12, #8b5a2b, #4a2e12);
}

.vitrina-trophy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
}

.vitrina-trophy-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vitrina-trophy i {
    font-size: 3.2rem;
    color: #f1c40f;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
    animation: trophy-glow-pulse 3s ease-in-out infinite;
}

.vitrina-category {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    color: #f1c40f;
    background: #241c0b;
    border: 1px solid #f1c40f77;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.45);
    pointer-events: none;
}

/* En la corona, la insignia se baja para no tapar las puntas superiores */
.vitrina-trophy-icon i.fa-crown ~ .vitrina-category {
    top: 68%;
}

.vitrina-trophy-label {
    font-size: 0.72rem;
    color: #e8d9a0;
    background: #26221a;
    border: 1px solid #4a3d1f;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.vitrina-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.85rem;
    width: 100%;
    padding: 10px 0;
    z-index: 1;
}

.vitrina-empty i {
    font-size: 2.4rem;
    color: #444;
}
