/* ============================================
   MI CARDO - HOME PAGE STYLES
   Estilos específicos para rugby-manager-home.html
   ============================================ */

/* ============ LAYOUT PRINCIPAL ============ */
body {
    color: var(--text-dark);
}

body::before {
    background: rgba(0, 0, 0, 0.2);
}

/* ============ HEADER - NUEVO DISEÑO ============ */
.main-header {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8f9fa 100%);
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 0;
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(70px + env(safe-area-inset-top, 0px));
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 100;
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--scottish-blue), var(--thistle-purple), var(--scottish-blue));
}

/* Header Left - User Info */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 10px;
    padding: 4px 8px 4px 4px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.user-profile-btn:hover  { background: rgba(0,0,0,0.05); }
.user-profile-btn:active { background: rgba(0,0,0,0.09); }

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102,126,234,0.35);
}
.header-avatar-img     { width: 100%; height: 100%; object-fit: cover; display: block; }
.header-avatar-initial { color: #fff; font-size: 0.85rem; font-weight: 700; }

.user-greeting {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.greeting-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.user-name {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.admin-badge {
    background: linear-gradient(135deg, var(--thistle-purple) 0%, #9b59b6 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(126, 63, 143, 0.3);
}

/* Header Center - Logo */
.header-center {
    display: flex;
    justify-content: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.header-logo:hover {
    background: rgba(0, 94, 184, 0.05);
}

.header-logo-img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-family: 'Lora', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--scottish-blue);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 11px;
    color: var(--thistle-purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Header Right - Logout */
.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.logout-icon {
    font-size: 16px;
}

/* Header Responsive */
@media (max-width: 768px) {
    .main-header {
        padding: 0 12px;
        height: 58px;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .main-header::after {
        height: 2px;
    }

    .header-left {
        order: 1;
        justify-content: flex-start;
    }

    .header-center {
        order: 2;
    }

    .header-right {
        order: 3;
        position: static;
        justify-content: flex-end;
    }

    .header-logo {
        padding: 4px 8px;
        gap: 8px;
    }

    .header-logo-img {
        height: 32px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-tagline {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .user-greeting {
        flex-direction: row;
        gap: 4px;
        align-items: center;
    }

    .user-name {
        font-size: 13px;
        max-width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-badge {
        display: none !important;
    }

    .logout-text {
        display: none;
    }

    .logout-btn {
        padding: 7px 9px;
        border-radius: 10px;
    }

    .logout-icon {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0 10px;
        height: 54px;
    }

    .header-logo-img {
        height: 28px;
    }

    .brand-name {
        font-size: 15px;
    }

    .brand-tagline {
        font-size: 7px;
    }

    .user-name {
        font-size: 12px;
        max-width: 75px;
    }

    .header-avatar {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 360px) {
    .brand-tagline {
        display: none;
    }

    .user-name {
        max-width: 60px;
    }

    .header-logo-img {
        height: 26px;
    }

    .brand-name {
        font-size: 14px;
    }
}

/* Mantener compatibilidad con .header viejo si existe */
.header {
    background: var(--bg-white);
    padding: 15px 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--scottish-blue);
}

.header h1 {
    color: var(--scottish-blue);
    font-size: 26px;
    display: flex;
    align-items: center;
}

.logout-btn {
    background: var(--error);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.logout-btn:hover {
    background: #a93226;
}

/* ============ CONTENEDOR ============ */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ============ TABS DE NAVEGACIÓN - ESTILO ESCOCÉS ============ */
.nav-buttons {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--scottish-blue-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 6px;
    box-shadow: var(--shadow-scottish),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Patrón tartán sutil */
.nav-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        );
    pointer-events: none;
}

.nav-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-btn::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: transform var(--transition-normal);
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-btn.active {
    background: white;
    color: var(--scottish-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.nav-btn.active::before {
    display: none;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* Responsive nav buttons */
@media (max-width: 768px) {
    .nav-buttons {
        border-radius: var(--radius-lg);
        padding: 5px;
    }
    .nav-btn {
        padding: 12px 16px;
        font-size: 12px;
        flex: 1 1 auto;
        min-width: fit-content;
        text-align: center;
        border-radius: var(--radius-md);
    }
    .nav-btn.active::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        border-radius: 10px;
        padding: 4px;
    }
    .nav-btn {
        padding: 10px 12px;
        font-size: 11px;
        letter-spacing: 0;
    }
}

/* ============ SECCIONES DE CONTENIDO ============ */
.content-section {
    display: none;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(44,62,80,0.1);
}

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

.section-title {
    color: var(--text-dark);
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

/* Content section responsive */
@media (max-width: 768px) {
    .content-section {
        padding: 20px;
        border-radius: 16px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 15px;
        border-radius: 14px;
        margin: 0 -5px;
    }
    #perfilSection {
        margin: 0;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
}

/* ============ ADMIN PANEL ============ */
.players-list {
    margin-top: 30px;
}

.player-card {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
}

.player-position {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

.fecha-actions {
    display: flex;
    gap: 8px;
}

/* Estilos para edición de stats */
.edit-stat-row {
    border-bottom: 1px solid var(--border-color);
}

.edit-stat-row:hover {
    background: var(--bg-light);
}

.edit-stat-row td {
    padding: 10px 8px;
    vertical-align: middle;
}

.edit-stat-name {
    font-weight: 600;
    font-size: 14px;
    min-width: 160px;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
}

.edit-stat-input {
    width: 62px;
    padding: 8px 6px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    border-radius: 4px;
    text-align: center;
    display: block;
    margin: 0 auto;
}

.edit-stat-points {
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--scottish-blue);
    white-space: nowrap;
}

.edit-stat-delete {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 14px;
}

.edit-stat-delete:hover {
    background: var(--error);
}

/* (edit-fecha-modal styles moved after .modal-content for cascade) */

/* Collapsible sections */
.ef-section {
    border-bottom: 1px solid var(--border-color);
}

.ef-section:last-of-type { border-bottom: none; }

.ef-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.ef-section-header:hover { background: var(--bg-light); }

.ef-section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.ef-chevron {
    transition: transform 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
}

.ef-section.collapsed .ef-chevron { transform: rotate(-90deg); }
.ef-section.collapsed .ef-section-body { display: none; }

.ef-section-body {
    padding: 0 16px 16px;
}

/* Add player row — desktop grid */
.ef-add-player-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ef-add-player-search {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ef-add-player-search label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ef-add-player-search input,
.ef-add-player-search select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-white);
}

.ef-add-player-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ef-add-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 56px;
}
.ef-add-field label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.3px;
}
.ef-add-field input {
    width: 100%;
    padding: 6px 4px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    background: var(--bg-white);
}

/* Table wrapper */
.ef-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 16px;
}

/* Action buttons */
.ef-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 2;
}

/* ── Fullscreen table styles ── */
.ef-div-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.ef-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.ef-table thead th {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 12px 6px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}
.ef-table thead th:first-child { text-align: left; padding-left: 14px; border-radius: 8px 0 0 0; }
.ef-table thead th:last-child  { border-radius: 0 8px 0 0; }

.ef-th-name { width: 18%; min-width: 140px; }

.ef-row td {
    padding: 8px 4px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.ef-row:hover { background: var(--bg-light); }

.ef-td-name {
    text-align: left !important;
    padding-left: 14px !important;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ef-input {
    width: 100%;
    max-width: 60px;
    padding: 7px 4px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-white);
    margin: 0 auto;
    display: block;
}
.ef-input:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 2px rgba(0,94,184,0.12);
}

.ef-td-pts {
    font-weight: 800;
    font-size: 15px;
    color: var(--scottish-blue);
}

.ef-div-separator td {
    padding: 8px 14px !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    text-align: left !important;
}

/* Responsive — already decent on mobile via scroll */
@media (max-width: 768px) {
    .edit-fecha-modal {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }
    .ef-add-player-row { flex-direction: column; }
    .ef-add-player-stats { width: 100%; }
    .ef-add-field { width: 48px; }
}

/* Stats Preview Table (Excel Upload) */
.stats-preview {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.stats-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-preview th,
.stats-preview td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.stats-preview th {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.stats-preview th:first-child {
    border-radius: 8px 0 0 0;
    text-align: left;
}

.stats-preview th:last-child {
    border-radius: 0 8px 0 0;
}

.stats-preview td:first-child {
    text-align: left;
    font-weight: 500;
}

.stats-preview tr:hover {
    background: var(--bg-light);
}

/* Player cell with select */
.player-cell {
    min-width: 180px;
}

.preview-player-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preview-player-select:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.15);
}

.preview-player-edit {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-player-name {
    font-size: 12px;
    color: var(--error);
    text-decoration: line-through;
    opacity: 0.7;
}

.duplicate-badge {
    color: #f59e0b;
    font-size: 11px;
    margin-left: 4px;
}

.preview-edit-input {
    width: 55px !important;
    padding: 6px 4px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.preview-edit-input:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.15);
}

.preview-edit-input:hover {
    border-color: var(--scottish-blue-dark);
}

.points-cell {
    color: var(--scottish-blue);
    font-size: 16px;
}

/* Status indicators */
.status-found {
    color: var(--success);
    font-weight: 700;
    font-size: 16px;
}

.status-not-found {
    color: var(--error);
    font-weight: 700;
    font-size: 16px;
}

.stats-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Responsive para tabla de preview */
@media (max-width: 768px) {
    .stats-preview {
        padding: 12px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-header .btn {
        width: 100%;
    }

    .preview-table-wrapper {
        max-height: 350px;
    }

    .stats-preview table {
        font-size: 12px;
        min-width: 650px;
    }

    .stats-preview th,
    .stats-preview td {
        padding: 8px 4px;
    }

    .player-cell {
        min-width: 150px;
    }

    .preview-player-select {
        font-size: 11px;
        padding: 4px 6px;
    }

    .preview-edit-input {
        width: 45px !important;
        padding: 4px 2px;
        font-size: 12px;
    }

    .stats-actions {
        flex-direction: column;
    }

    .stats-actions .btn {
        width: 100%;
    }
}

/* Collapsible sections */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.collapsible-header h3 {
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 18px;
}

.upload-area {
    border: 3px dashed #ced4da;
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--scottish-blue);
    background: rgba(0, 94, 184, 0.05);
}

/* ============ RUGBY FIELD - MI EQUIPO ============ */
.rugby-field {
    background: url('../images/cancha.jpg') no-repeat center center;
    background-size: cover;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    position: relative;
    min-height: 800px;
    overflow: hidden;
    border: 3px solid #0f2d1a;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.3), 0 10px 40px rgba(0,0,0,0.3);
}

/* Overlay oscuro sutil para legibilidad */
.rugby-field::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
    pointer-events: none;
}

.formation-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.formation-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

/* ── Card Deal Animation ──────────────────────────────────────── */
@keyframes card-deal {
    0% {
        opacity: 0;
        transform: translateY(-55px) translateX(calc(var(--deal-rot, 0deg) * 2.5)) rotate(var(--deal-rot, 0deg)) scale(0.65);
    }
    65% {
        opacity: 1;
        transform: translateY(5px) translateX(0) rotate(calc(var(--deal-rot, 0deg) * -0.08)) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    }
}

.position-card.deal-in,
.staff-card.deal-in {
    animation: card-deal 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    will-change: transform, opacity;
}

/* Position Cards - Diseño creativo tipo camiseta */
.position-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 15px;
    padding: 12px;
    width: 95px;
    min-height: 115px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    border: 2px solid rgba(255,255,255,0.5);
}

.position-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: linear-gradient(180deg, #ddd 0%, #bbb 100%);
    border-radius: 0 0 10px 10px;
}

.position-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
    border-color: var(--gold);
}

.position-card.filled {
    background: linear-gradient(145deg, var(--scottish-blue) 0%, #003d7a 100%);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0;
    justify-content: flex-start;
    overflow: visible;
}

.position-card.filled::before {
    background: linear-gradient(180deg, #004a99 0%, #003366 100%);
}

/* Capitán - estilo especial */
.position-card.is-captain-card {
    background: linear-gradient(145deg, #ffd700 0%, #b8860b 100%) !important;
    border: 3px solid #fff !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.5), 0 8px 25px rgba(0,0,0,0.3);
    animation: captain-glow 2s ease-in-out infinite;
    padding: 0 !important;
    justify-content: flex-start !important;
    overflow: visible !important;
}

.position-card.is-captain-card::before {
    background: linear-gradient(180deg, #ffed4a 0%, #d4a00a 100%);
}

@keyframes captain-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,215,0,0.5), 0 8px 25px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 35px rgba(255,215,0,0.8), 0 8px 25px rgba(0,0,0,0.3); }
}

/* Jugador potenciado por el entrenador */
.position-card.coach-boosted {
    border: 3px solid rgba(0, 210, 255, 0.9) !important;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.5), 0 4px 12px rgba(0,0,0,0.25);
    animation: boost-glow 2s ease-in-out infinite;
}

@keyframes boost-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 210, 255, 0.4), 0 4px 12px rgba(0,0,0,0.25); }
    50%       { box-shadow: 0 0 22px rgba(0, 210, 255, 0.75), 0 4px 12px rgba(0,0,0,0.25); }
}

.player-photo-placeholder {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    margin-bottom: 5px;
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Foto: cuadrada, ocupa toda la card sin recortar */
.player-card-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
    flex-shrink: 0;
}

.player-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Sin foto: placeholder que ocupa toda la foto */
.player-card-photo .player-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
    background: rgba(255,255,255,0.12);
    font-size: 26px;
}

/* Barra de info: FUERA de la foto, pegada abajo de la card */
.player-info-bar {
    width: 100%;
    padding: 4px 4px 5px;
    background: linear-gradient(145deg, var(--scottish-blue) 0%, #003d7a 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-radius: 0 0 13px 13px;
}

.player-info-bar .player-selected-name {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    word-break: break-word;
    width: 100%;
}

.player-info-bar .player-points {
    font-size: 9px;
    padding: 1px 5px;
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    border-radius: 6px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Barra de info del capitán */
.position-card.is-captain-card .player-info-bar {
    background: linear-gradient(0deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.10) 100%);
}

/* Mantener compatibilidad con entrenador que sigue usando player-details-overlay */
.player-details-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 5px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    color: white;
    text-align: center;
    z-index: 2;
    border-bottom-left-radius: 13px;
    border-bottom-right-radius: 13px;
}

.player-details-overlay .player-selected-name {
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.player-details-overlay .position-name {
    font-size: 9px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-details-overlay .player-points {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: 2px;
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    border-radius: 8px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Badge de equipo en la barra inferior de la ficha */
.card-equipo-badge {
    display: inline-block;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 5px;
    border-radius: 5px;
    line-height: 1.4;
}

.card-equipo-badge.equipo-primera    { background: #ef4444; color: #fff; }
.card-equipo-badge.equipo-intermedia { background: #f59e0b; color: #fff; }
.card-equipo-badge.equipo-pre_a      { background: #8b5cf6; color: #fff; }
.card-equipo-badge.equipo-pre_b      { background: #06b6d4; color: #fff; }
.card-equipo-badge.equipo-pre_c      { background: #3b82f6; color: #fff; }

/* Badge de equipo en el modal de selección */
.modal-player-badge.equipo-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.modal-player-badge.equipo-tag.equipo-primera    { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.modal-player-badge.equipo-tag.equipo-intermedia { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.modal-player-badge.equipo-tag.equipo-pre_a      { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.modal-player-badge.equipo-tag.equipo-pre_b      { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.modal-player-badge.equipo-tag.equipo-pre_c      { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

/* Estado "No Disponible" en el modal */
.modal-player-badge.no-disponible {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-player-item.no-equipo {
    background: #fef2f2;
    border-color: #fecaca;
    cursor: not-allowed;
}

.modal-player-item.no-equipo:hover {
    background: #fef2f2;
    color: var(--text-dark);
    border-color: #fecaca;
}

.modal-player-name.no-equipo-name {
    color: #9ca3af;
}

/* Cupo de división lleno en el modal */
.modal-player-badge.cupo-lleno {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-player-item.cupo-lleno-item {
    background: #fffbeb;
    border-color: #fde68a;
    cursor: not-allowed;
}

.modal-player-item.cupo-lleno-item:hover {
    background: #fffbeb;
    color: var(--text-dark);
    border-color: #fde68a;
}

/* Barra de contadores de cupos por división (encima de la lista en el modal) */
.division-cupos-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.division-cupo {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.division-cupo.cupo-full {
    opacity: 1;
    outline: 2px solid rgba(0,0,0,0.25);
    position: relative;
}

.division-cupo.cupo-full::after {
    content: ' ✕';
    font-size: 10px;
}

/* Items de entrenador en el modal: layout de dos líneas */
.modal-player-item.coach-item {
    align-items: flex-start;
    gap: 10px;
}

.modal-coach-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.modal-coach-ability {
    font-size: 11px;
    color: #7c3aed;
    font-weight: 600;
    line-height: 1.2;
}

.modal-player-item.coach-item:hover .modal-coach-ability {
    color: rgba(255,255,255,0.9);
}

/* Badge de habilidad en la staff-card del entrenador */
.coach-ability-badge {
    font-size: 9px;
    font-weight: 700;
    color: #fbbf24;
    margin-top: 2px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.position-card .add-icon,
.position-card .position-name {
    position: relative;
    z-index: 2;
}

.position-card .add-icon {
    font-size: 32px;
}

.player-details {
    line-height: 1.2;
    text-align: center;
}

.position-card.filled .position-name {
    color: rgba(255,255,255,0.8);
}

.add-icon {
    font-size: 28px;
    font-weight: 300;
    color: var(--scottish-blue);
    margin-bottom: 8px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.position-card:hover .add-icon {
    opacity: 1;
    transform: scale(1.1);
}

.position-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-selected-name {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.player-points {
    font-size: 11px;
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    color: #1a1a1a;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 5px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239,68,68,0.4);
    z-index: 10;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.position-card.filled .remove-btn {
    display: flex;
}

/* Team Counter & Save */
.team-counter {
    text-align: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 12px 25px;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
    border-radius: 30px;
    display: inline-flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.team-counter strong {
    color: var(--gold);
}

/* Panel de cupos por división en Mi Equipo */
.division-quota-bar {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.quota-pill strong {
    font-weight: 800;
}

.quota-pill.quota-full {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    outline: 2px solid rgba(255,255,255,0.6);
}

.quota-pill.quota-full::after {
    content: '✓';
    font-size: 11px;
    margin-left: 2px;
    opacity: 0.9;
}

.quota-pill.equipo-primera    { background: #ef4444; }
.quota-pill.equipo-intermedia { background: #f59e0b; }
.quota-pill.equipo-pre_a      { background: #8b5cf6; }
.quota-pill.equipo-pre_b      { background: #06b6d4; }
.quota-pill.equipo-pre_c      { background: #3b82f6; }

@media (max-width: 480px) {
    .quota-pill {
        font-size: 11px;
        padding: 4px 10px;
    }
}

.save-team-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.btn-save-team {
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    color: #1a1a1a;
    border: none;
    padding: 14px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-save-team:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.btn-save-team:disabled {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-reset-team {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 14px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-reset-team:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Staff Section (Entrenador y Capitán) */
.staff-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: 20px;
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1;
}

.staff-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    padding: 15px;
    width: 130px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    border: 3px solid var(--gold);
    color: white;
}

.staff-card::before {
    content: '🎯';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.staff-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: #ffed4a;
}

.staff-card.filled {
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 100%);
}

.staff-card.filled .player-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    z-index: 1;
}

.staff-card .player-details-overlay {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.staff-icon {
    font-size: 35px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.staff-card .add-icon {
    color: var(--gold);
    font-size: 30px;
}

.staff-card .position-name {
    color: rgba(255,255,255,0.8);
    font-size: 11px;
}

/* Captain hint - más elegante */
.captain-hint {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,215,0,0.05) 100%);
    border-radius: 15px;
    padding: 15px 20px;
    text-align: center;
    border: 2px solid rgba(255,215,0,0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 320px;
    backdrop-filter: blur(5px);
}

.captain-hint-icon {
    font-size: 32px;
    animation: bounce 2s infinite;
}

.captain-hint-text {
    color: #fff;
    font-size: 14px;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.captain-hint-text span {
    color: var(--gold);
    font-weight: 700;
}

/* Captain crown button - Diseño mejorado */
.captain-crown-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: linear-gradient(145deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px solid #ccc;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.captain-crown-btn:hover {
    transform: scale(1.2);
    opacity: 1;
    border-color: var(--gold);
    background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.captain-crown-btn.is-captain {
    background: linear-gradient(135deg, var(--gold) 0%, #ffcc00 50%, #f59e0b 100%);
    border: 2px solid #fff;
    opacity: 1;
    animation: captain-crown-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 4px 10px rgba(0,0,0,0.2);
    font-size: 14px;
}

@keyframes captain-crown-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 4px 10px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 6px 15px rgba(0,0,0,0.25);
    }
}

/* Captain badge - Más prominente */
.captain-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 50%, #ff9500 100%);
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 8px;
    font-weight: 800;
    z-index: 15;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    animation: badge-shine 3s ease-in-out infinite;
}

.captain-badge::before {
    content: '👑 ';
}

@keyframes badge-shine {
    0%, 100% { box-shadow: 0 3px 12px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 3px 15px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.5); }
}

/* ============ ESTADÍSTICAS ============ */
.stats-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stat-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.stat-card:hover .stat-card-glow {
    opacity: 1;
    animation: pulse-glow 2s infinite;
}

/* Foto del jugador en stat card */
.stat-card-photo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    margin: 0 auto 15px auto;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.5);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.stat-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-card-photo.has-image + .stat-card-icon {
    display: none;
}

.stat-card-photo:empty {
    display: none;
}

.stat-card-photo:empty + .stat-card-icon {
    display: block;
}

.stat-card-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

.stat-card-content {
    position: relative;
    z-index: 2;
}

.stat-card-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.stat-card-player {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Lora', serif;
}

.stat-card-value {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a8edea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card-sublabel {
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Colores únicos para cada card */
.stat-card-mvp {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
}
.stat-card-mvp .stat-card-value {
    background: linear-gradient(135deg, #fff 0%, #ffe082 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card-popular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-tries {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card-tackles {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.stat-card-conversions {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card-average {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

/* Stats Rankings Top 5 */
.stats-rankings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stats-ranking-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stats-ranking-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.stats-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all var(--transition-normal);
}

.stats-ranking-item:hover {
    background: var(--scottish-blue-light);
    transform: translateX(5px);
}

.stats-ranking-position {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.stats-ranking-position.pos-1 { background: linear-gradient(135deg, #f5af19, #f12711); }
.stats-ranking-position.pos-2 { background: linear-gradient(135deg, #bdc3c7, #95a5a6); }
.stats-ranking-position.pos-3 { background: linear-gradient(135deg, #d68910, #b7950b); }
.stats-ranking-position.pos-4,
.stats-ranking-position.pos-5 { background: #667eea; }

.stats-ranking-player {
    flex: 1;
    font-weight: 600;
    color: var(--text-dark);
}

.stats-ranking-value {
    font-weight: 700;
    color: var(--scottish-blue);
    font-size: 16px;
}

.stats-loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.stats-no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* ============ ESTADÍSTICAS - RESPONSIVE ============ */

/* Tablet */
@media (max-width: 768px) {
    .stats-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }

    .stat-card {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .stat-card:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .stat-card-photo {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }

    .stat-card-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .stat-card-label {
        font-size: 10px;
        letter-spacing: 1px;
        margin-bottom: 6px;
    }

    .stat-card-player {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .stat-card-value {
        font-size: 32px;
        margin-bottom: 3px;
    }

    .stat-card-sublabel {
        font-size: 10px;
    }

    .stats-rankings-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-ranking-card {
        padding: 20px;
    }

    .stats-ranking-card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .stats-ranking-item {
        padding: 10px;
        gap: 12px;
    }

    .stats-ranking-position {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .stats-ranking-player {
        font-size: 14px;
    }

    .stats-ranking-value {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .stats-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 25px;
    }

    .stat-card {
        padding: 16px;
        border-radius: 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 14px;
    }

    .stat-card:hover {
        transform: translateX(5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

    .stat-card-glow {
        display: none;
    }

    .stat-card-photo {
        width: 50px;
        height: 50px;
        margin: 0;
        flex-shrink: 0;
        border-width: 2px;
        position: relative;
    }

    .stat-card-photo:not(:empty) + .stat-card-icon {
        display: none;
    }

    .stat-card-icon {
        font-size: 28px;
        margin: 0;
        flex-shrink: 0;
        width: 50px;
        text-align: center;
        animation: none;
        position: relative;
    }

    .stat-card-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .stat-card-label {
        font-size: 9px;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }

    .stat-card-player {
        font-size: 14px;
        margin-bottom: 4px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-card-value {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .stat-card-sublabel {
        font-size: 9px;
        margin-top: 0;
    }

    /* Stats ranking en móvil */
    .stats-rankings-container {
        gap: 15px;
    }

    .stats-ranking-card {
        padding: 15px;
        border-radius: 14px;
    }

    .stats-ranking-card h3 {
        font-size: 15px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .stats-ranking-list {
        gap: 8px;
    }

    .stats-ranking-item {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .stats-ranking-item:hover {
        transform: translateX(3px);
    }

    .stats-ranking-position {
        width: 26px;
        height: 26px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .stats-ranking-player {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stats-ranking-value {
        font-size: 13px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .stats-loading,
    .stats-no-data {
        padding: 25px 15px;
        font-size: 14px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    .stat-card {
        padding: 14px 12px;
        gap: 12px;
    }

    .stat-card-photo {
        width: 45px;
        height: 45px;
    }

    .stat-card-icon {
        font-size: 26px;
        width: 45px;
    }

    .stat-card-label {
        font-size: 8px;
    }

    .stat-card-player {
        font-size: 13px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .stat-card-sublabel {
        font-size: 8px;
    }

    .stats-ranking-card {
        padding: 12px;
    }

    .stats-ranking-item {
        padding: 8px 10px;
    }

    .stats-ranking-position {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .stats-ranking-player {
        font-size: 12px;
    }

    .stats-ranking-value {
        font-size: 12px;
    }
}

/* ============ CÓMO JUGAR ============ */
.help-container {
    max-width: 900px;
    margin: 0 auto;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* Línea conectora vertical */
.help-steps::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: 60px;
    width: 3px;
    background: linear-gradient(to bottom, var(--scottish-blue), var(--thistle-purple));
    border-radius: 3px;
}

.help-step {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    position: relative;
    padding: 20px 0;
}

.help-step-number {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Lora', serif;
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.3);
    z-index: 2;
    position: relative;
}

.help-step-content {
    flex: 1;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 25px;
    border-left: 4px solid var(--scottish-blue);
    transition: all var(--transition-normal);
}

.help-step:hover .help-step-content {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.help-step:nth-child(2) .help-step-content { border-left-color: #2980b9; }
.help-step:nth-child(3) .help-step-content { border-left-color: #8e44ad; }
.help-step:nth-child(4) .help-step-content { border-left-color: var(--thistle-purple); }

.help-step-title {
    font-family: 'Lora', serif;
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.help-step-text {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
}

.help-step-text strong {
    color: var(--scottish-blue);
}

/* Points grid */
.points-grid-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.point-badge {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8e8e8;
}

.point-badge-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.point-badge-value {
    font-weight: 700;
    font-size: 16px;
    padding: 4px 10px;
    border-radius: 20px;
}

.point-badge-value.positive {
    background: var(--success-bg);
    color: var(--success-text);
}

.point-badge-value.negative {
    background: var(--error-bg);
    color: var(--error-text);
}

/* Highlight box */
.help-highlight {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.help-highlight strong {
    color: var(--gold);
}

.help-highlight.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.help-highlight.warning strong {
    color: #1a1a1a;
}

.help-list {
    margin: 12px 0 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
}

.help-list li {
    padding-left: 4px;
}

/* Cafecito */
.cafecito-section {
    background: linear-gradient(135deg, #fff8ee 0%, #fff3e0 100%) !important;
}
.cafecito-section::before {
    background: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b) !important;
}

.cafecito-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(245,158,11,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-bottom: 12px;
}
.cafecito-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.45);
}

.cafecito-sub {
    font-size: 12px;
    color: #a0704a;
    opacity: 0.7;
    margin: 0;
}

/* Donations section */
.donations-section {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.donations-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--scottish-blue), var(--thistle-purple), var(--scottish-blue));
}

.donations-title {
    font-family: 'Lora', serif;
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.donations-text {
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto 25px auto;
    line-height: 1.7;
}

.donations-card {
    background: var(--bg-white);
    padding: 25px 40px;
    border-radius: var(--radius-lg);
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.donations-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.donations-alias {
    font-size: 22px;
    font-weight: 700;
    color: var(--scottish-blue);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.donations-holder {
    font-size: 14px;
    color: var(--thistle-purple);
    font-weight: 600;
}

/* Responsive help */
@media (max-width: 768px) {
    .help-container {
        padding: 0;
    }

    .help-steps::before {
        left: 22px;
        width: 2px;
        top: 50px;
        bottom: 50px;
    }

    .help-step {
        gap: 18px;
        padding: 15px 0;
    }

    .help-step-number {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 18px;
    }

    .help-step-content {
        padding: 18px;
        border-radius: 12px;
    }

    .help-step:hover .help-step-content {
        transform: translateX(3px);
    }

    .help-step-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .help-step-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .points-grid-help {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 12px;
    }

    .point-badge {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .point-badge-label {
        font-size: 12px;
    }

    .point-badge-value {
        font-size: 14px;
        padding: 3px 8px;
    }

    .help-highlight {
        padding: 15px 18px;
        font-size: 13px;
        border-radius: 10px;
    }

    .donations-section {
        margin-top: 35px;
        padding: 30px 20px;
        border-radius: 16px;
    }

    .donations-title {
        font-size: 20px;
    }

    .donations-text {
        font-size: 14px;
    }

    .donations-card {
        padding: 20px 30px;
    }

    .donations-alias {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .help-steps::before {
        display: none;
    }

    .help-step {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin-bottom: 15px;
    }

    .help-step-number {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
        margin-bottom: -20px;
        margin-left: 15px;
        z-index: 2;
        box-shadow: 0 3px 10px rgba(0, 94, 184, 0.25);
    }

    .help-step-content {
        padding: 30px 15px 18px 15px;
        border-left: none;
        border-top: 3px solid var(--scottish-blue);
        border-radius: 14px;
        background: var(--bg-light);
    }

    .help-step:nth-child(2) .help-step-content { border-top-color: #2980b9; }
    .help-step:nth-child(3) .help-step-content { border-top-color: #8e44ad; }
    .help-step:nth-child(4) .help-step-content { border-top-color: var(--thistle-purple); }

    .help-step:hover .help-step-content {
        transform: none;
    }

    .help-step-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .help-step-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .points-grid-help {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .point-badge {
        padding: 8px 10px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
        border-radius: 10px;
    }

    .point-badge-label {
        font-size: 11px;
    }

    .point-badge-value {
        font-size: 13px;
        padding: 3px 10px;
    }

    .help-highlight {
        padding: 12px 15px;
        font-size: 12px;
        margin-top: 12px;
        border-radius: 10px;
    }

    .donations-section {
        margin-top: 25px;
        padding: 25px 15px;
        border-radius: 14px;
    }

    .donations-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .donations-text {
        font-size: 13px;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    .donations-card {
        padding: 18px 25px;
        border-radius: 12px;
        width: 100%;
        display: block;
    }

    .donations-label {
        font-size: 12px;
    }

    .donations-alias {
        font-size: 16px;
        letter-spacing: 0.5px;
    }

    .donations-holder {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .help-step-number {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 14px;
    }

    .help-step-content {
        padding: 26px 12px 15px 12px;
    }

    .help-step-title {
        font-size: 15px;
    }

    .help-step-text {
        font-size: 12px;
    }

    .point-badge-label {
        font-size: 10px;
    }

    .point-badge-value {
        font-size: 12px;
    }

    .donations-alias {
        font-size: 14px;
    }
}

/* ============ PREMIOS MODAL ============ */
.ranking-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 15px;
    flex-wrap: wrap;
}

/* ── Ranking tabs (General / Esta Fecha) ── */
.ranking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.ranking-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: rgba(44, 62, 80, 0.08);
    color: rgba(44, 62, 80, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.02em;
}

.ranking-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-prizes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Source Sans Pro', sans-serif;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-prizes:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.5);
}

.prizes-modal-content {
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
}

.prizes-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prizes-modal-header .modal-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.prizes-modal-header .modal-close {
    color: white;
    opacity: 0.85;
}

.prizes-modal-header .modal-close:hover {
    opacity: 1;
}

.prizes-modal-body {
    padding: 22px;
}

.prizes-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.prizes-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prize-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: var(--bg-white);
}

.prize-card-img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 380px;
}

/* ============ RANKING ============ */
.ranking-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Podio para top 3 */
.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-normal);
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Primer lugar - Dorado */
.podium-place.first .podium-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff 50%, #fff9e6 100%);
    border: 3px solid var(--gold);
    width: 160px;
}

.podium-place.first .podium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), #ffed4a, var(--gold));
}

/* Segundo lugar - Plata */
.podium-place.second .podium-card {
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 50%, var(--bg-light) 100%);
    border: 3px solid var(--silver);
    width: 140px;
}

.podium-place.second .podium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--silver-dark), #d4d4d4, var(--silver-dark));
}

/* Tercer lugar - Bronce */
.podium-place.third .podium-card {
    background: linear-gradient(135deg, #fdf6f0 0%, #fff 50%, #fdf6f0 100%);
    border: 3px solid var(--bronze);
    width: 140px;
}

.podium-place.third .podium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bronze-dark), #e8a054, var(--bronze-dark));
}

.podium-medal {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: -40px auto 15px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Lora', serif;
}

.podium-place.first .podium-medal {
    background: linear-gradient(135deg, var(--gold) 0%, #ffed4a 50%, var(--gold) 100%);
    color: #8b6914;
    border: 3px solid var(--gold-dark);
}

.podium-place.second .podium-medal {
    background: linear-gradient(135deg, var(--silver) 0%, #e8e8e8 50%, var(--silver) 100%);
    color: #666;
    border: 3px solid var(--silver-dark);
}

.podium-place.third .podium-medal {
    background: linear-gradient(135deg, var(--bronze) 0%, #e8a054 50%, var(--bronze) 100%);
    color: #5c3a16;
    border: 3px solid var(--bronze-dark);
}

.podium-avatar {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Lora', serif;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.3);
    overflow: hidden;
}
.podium-avatar img,
.ranking-avatar img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.podium-place.first .podium-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

.podium-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-word;
}

.podium-place.first .podium-name {
    font-size: 16px;
}

.podium-points {
    font-family: 'Lora', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--scottish-blue);
}

.podium-place.first .podium-points {
    font-size: 34px;
    background: linear-gradient(135deg, var(--gold) 0%, #ff9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.podium-pts-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.podium-view-hint {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--scottish-blue);
    background: rgba(0, 94, 184, 0.08);
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.03em;
}

.ranking-view-hint {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--scottish-blue);
    background: rgba(0, 94, 184, 0.08);
    border-radius: 20px;
    padding: 2px 8px;
    letter-spacing: 0.02em;
}

.podium-base {
    margin-top: 15px;
    border-radius: 8px 8px 0 0;
    width: 100%;
}

.podium-place.first .podium-base {
    height: 80px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.podium-place.second .podium-base {
    height: 55px;
    background: linear-gradient(180deg, var(--silver) 0%, var(--silver-dark) 100%);
}

.podium-place.third .podium-base {
    height: 40px;
    background: linear-gradient(180deg, var(--bronze) 0%, var(--bronze-dark) 100%);
}

/* Lista del resto del ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-card {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    border-left: 4px solid transparent;
    position: relative;
}

.ranking-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.ranking-card.my-ranking {
    background: linear-gradient(135deg, var(--scottish-blue-light) 0%, #fff 100%);
    border-left-color: var(--scottish-blue);
    box-shadow: 0 4px 20px rgba(0, 94, 184, 0.15);
}

/* Badge "Vos" como elemento separado para no tapar los puntos */
.ranking-you-badge {
    background: var(--scottish-blue);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ranking-position {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f0f2f5 0%, #e0e3e7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--scottish-blue);
    font-family: 'Lora', serif;
    margin-right: 16px;
    flex-shrink: 0;
}

.ranking-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Lora', serif;
    margin-right: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
    word-break: break-word;
}

.ranking-points {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--scottish-blue);
    margin-left: auto;
    padding-left: 20px;
    flex-shrink: 0;
}

.ranking-pts-suffix {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    margin-left: 4px;
}

/* Separador para usuario fuera del top */
.ranking-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    color: #adb5bd;
}

.ranking-separator::before,
.ranking-separator::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e3e7, transparent);
}

.ranking-separator span {
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Cafecito en ranking */
.ranking-cafecito {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(239,68,68,0.06) 100%);
    border: 1px solid rgba(245,158,11,0.2);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.ranking-cafecito:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.15);
    border-color: rgba(245,158,11,0.4);
}
.ranking-cafecito-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.ranking-cafecito-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ranking-cafecito-text strong {
    font-size: 14px;
    color: var(--text-primary);
}
.ranking-cafecito-text span {
    font-size: 12px;
    color: var(--text-muted);
}
.ranking-cafecito svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Empty state */
.ranking-empty {
    text-align: center;
    padding: 60px 20px;
}

.ranking-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.ranking-empty-text {
    color: #6c757d;
    font-size: 16px;
}

/* Responsive ranking */
@media (max-width: 768px) {
    .ranking-container {
        padding: 0;
    }

    .ranking-podium {
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 25px;
    }

    .podium-place {
        order: 2;
    }

    .podium-place.first {
        order: 1;
        flex-basis: 100%;
    }

    .podium-place.first .podium-card {
        width: 160px;
        margin: 0 auto;
        padding: 20px 15px;
    }

    .podium-place.second .podium-card,
    .podium-place.third .podium-card {
        width: 120px;
        padding: 15px 12px;
    }

    .podium-base {
        display: none;
    }

    .podium-medal {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .podium-place.first .podium-medal {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .podium-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .podium-place.first .podium-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .podium-name {
        font-size: 13px;
    }

    .podium-place.first .podium-name {
        font-size: 15px;
    }

    .podium-points {
        font-size: 22px;
    }

    .podium-place.first .podium-points {
        font-size: 26px;
    }

    .podium-pts-label {
        font-size: 10px;
    }

    .ranking-list {
        gap: 10px;
    }

    .ranking-card {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .ranking-position {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 10px;
    }

    .ranking-avatar {
        width: 38px;
        height: 38px;
        font-size: 14px;
        margin-right: 10px;
    }

    .ranking-name {
        font-size: 14px;
    }

    .ranking-points {
        font-size: 18px;
    }

    .ranking-pts-suffix {
        font-size: 11px;
    }

    .ranking-you-badge {
        font-size: 9px;
        padding: 3px 8px;
        margin-left: 8px;
    }

    .ranking-separator {
        margin: 15px 0;
    }

    .ranking-separator span {
        font-size: 11px;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .ranking-podium {
        gap: 10px;
        padding: 0 5px;
    }

    .podium-place.first .podium-card {
        width: 140px;
        padding: 18px 12px;
        border-radius: 16px;
    }

    .podium-place.second .podium-card,
    .podium-place.third .podium-card {
        width: 100px;
        padding: 14px 10px;
        border-radius: 14px;
    }

    .podium-medal {
        width: 24px;
        height: 24px;
        font-size: 12px;
        top: -10px;
    }

    .podium-place.first .podium-medal {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .podium-avatar {
        width: 42px;
        height: 42px;
        font-size: 16px;
        border-width: 2px;
    }

    .podium-place.first .podium-avatar {
        width: 52px;
        height: 52px;
        font-size: 20px;
        border-width: 3px;
    }

    .podium-name {
        font-size: 11px;
        margin: 8px 0 4px;
        max-width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .podium-place.first .podium-name {
        font-size: 13px;
        max-width: 120px;
    }

    .podium-points {
        font-size: 18px;
    }

    .podium-place.first .podium-points {
        font-size: 22px;
    }

    .podium-pts-label {
        font-size: 9px;
    }

    .ranking-list {
        gap: 8px;
    }

    .ranking-card {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .ranking-position {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 8px;
    }

    .ranking-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
        margin-right: 8px;
    }

    .ranking-info {
        min-width: 0;
    }

    .ranking-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ranking-points {
        font-size: 16px;
    }

    .ranking-pts-suffix {
        font-size: 10px;
    }

    .ranking-you-badge {
        font-size: 8px;
        padding: 2px 6px;
        margin-left: 6px;
    }

    .ranking-empty {
        padding: 30px 15px;
    }

    .ranking-empty-icon {
        font-size: 40px;
    }

    .ranking-empty-text {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .podium-place.first .podium-card {
        width: 120px;
        padding: 15px 10px;
    }

    .podium-place.second .podium-card,
    .podium-place.third .podium-card {
        width: 85px;
        padding: 12px 8px;
    }

    .podium-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .podium-place.first .podium-avatar {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .podium-name {
        font-size: 10px;
        max-width: 70px;
    }

    .podium-place.first .podium-name {
        font-size: 12px;
        max-width: 100px;
    }

    .podium-points {
        font-size: 16px;
    }

    .podium-place.first .podium-points {
        font-size: 20px;
    }

    .ranking-position {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin-right: 6px;
    }

    .ranking-avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
        margin-right: 6px;
    }

    .ranking-name {
        font-size: 12px;
    }

    .ranking-points {
        font-size: 14px;
    }
}

/* Ocultar tabla vieja */
.ranking-table {
    display: none !important;
}

/* ============ BANNER MERCADO CERRADO ============ */
.market-locked-overlay {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #e53935;
    border-radius: 10px;
    padding: 11px 14px;
    margin: 0 0 12px 0;
    animation: lockFadeIn 0.25s ease;
}

@keyframes lockFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mlo-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.mlo-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mlo-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.mlo-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* ── Captain Warning Banner ── */
.captain-warning-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,180,0,0.08));
    border: 1.5px solid rgba(255,215,0,0.5);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 12px;
    animation: lockFadeIn 0.25s ease;
    box-shadow: 0 2px 12px rgba(255,215,0,0.15);
}
.cwb-crown {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes cwbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.cwb-crown { animation: cwbPulse 2s ease-in-out infinite; }
.cwb-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cwb-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd700;
    line-height: 1.2;
}
.cwb-text {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,215,0,0.75);
    line-height: 1.3;
}

/* ── Perfil — Sección completa ── */
#perfilSection {
    padding: 0;
    background: var(--bg-white, #f4f6f8);
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 40px);
}
.perfil-hero {
    background: linear-gradient(160deg, #f0f2ff 0%, #f7f0ff 100%);
    border-bottom: 1px solid rgba(102,126,234,0.12);
    padding: 32px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.perfil-avatar-wrap {
    position: relative;
    cursor: pointer;
}
.perfil-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(102,126,234,0.3);
    border: 3px solid rgba(255,255,255,0.9);
}
.perfil-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.perfil-avatar-initial {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}
.perfil-avatar-edit-lbl {
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.perfil-info { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.perfil-username-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.perfil-username {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: -0.01em;
}
.perfil-edit-username-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
    line-height: 1;
}
.perfil-edit-username-btn:hover { opacity: 1; }
.perfil-username-cooldown-hint {
    font-size: 0.7rem;
    color: rgba(44,62,80,0.38);
    letter-spacing: 0.01em;
    margin-top: -1px;
}
.perfil-username-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 240px;
}
.perfil-username-input {
    padding: 7px 10px;
    border: 1.5px solid rgba(102,126,234,0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: #1a202c;
    outline: none;
    text-align: center;
    transition: border-color 0.15s;
}
.perfil-username-input:focus { border-color: #667eea; }
.perfil-username-msg {
    font-size: 0.78rem;
    min-height: 16px;
    text-align: center;
}
.perfil-username-form-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.perfil-username-cancel {
    background: rgba(0,0,0,0.06);
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    color: #4a5568;
    transition: background 0.15s;
}
.perfil-username-cancel:hover { background: rgba(0,0,0,0.1); }
.perfil-username-save {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
}
.perfil-username-save:disabled { opacity: 0.4; cursor: default; }
.perfil-email {
    font-size: 0.72rem;
    color: rgba(0,0,0,0.38);
}
.perfil-body {
    padding: 20px 16px 40px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

/* ── Perfil de Usuario — sheet (legacy, sin uso) ── */
.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 900;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.profile-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.profile-sheet {
    width: 100%;
    max-height: 88vh;
    background: #131929;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    overflow: hidden;
}
.profile-overlay.visible .profile-sheet {
    transform: translateY(0);
}
.profile-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

/* Header del sheet */
.profile-sheet-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.profile-avatar-wrap {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.profile-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(102,126,234,0.4);
}
.profile-avatar-lg-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.profile-avatar-initial {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
}
.profile-avatar-edit {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.03em;
}
.profile-sheet-info {
    flex: 1;
    min-width: 0;
}
.profile-sheet-username {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-sheet-email {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.profile-sheet-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

/* Body scrollable */
.profile-sheet-body {
    overflow-y: auto;
    padding: 18px 18px 32px;
    flex: 1;
}
.profile-loading {
    text-align: center;
    color: rgba(0,0,0,0.35);
    font-size: 0.85rem;
    padding: 32px 0;
}

/* Empty state */
.perfil-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 16px;
    gap: 12px;
}
.perfil-empty-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(102,126,234,0.1);
    display: flex; align-items: center; justify-content: center;
}
.perfil-empty-icon::after {
    content: '';
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 3px solid rgba(102,126,234,0.35);
}
.perfil-empty-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
}
.perfil-empty-text {
    font-size: 0.82rem;
    color: rgba(0,0,0,0.45);
    line-height: 1.5;
    max-width: 280px;
}

/* Zona peligrosa */
.perfil-danger-zone {
    margin: 8px 16px 32px;
    padding: 16px;
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 12px;
    background: rgba(239,68,68,0.04);
}
.perfil-danger-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ef4444;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.perfil-danger-text {
    font-size: 0.8rem;
    color: rgba(0,0,0,0.5);
    line-height: 1.5;
    margin-bottom: 14px;
}
.perfil-delete-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1.5px solid #ef4444;
    background: transparent;
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.perfil-delete-btn:hover {
    background: #ef4444;
    color: #fff;
}

/* Lista de jugadores más elegidos */
.prof-player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}
.prof-player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
    padding: 10px 12px;
}
.prof-player-row-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(0,0,0,0.3);
    min-width: 18px;
    text-align: center;
}
.prof-player-row-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
}
.prof-player-row-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}
.prof-player-row-fechas {
    font-size: 0.78rem;
    color: rgba(0,0,0,0.4);
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 2px 7px;
}
.prof-player-row-pts {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--scottish-blue, #005eb8);
}

/* Stat cards */
.prof-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.prof-stat-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.prof-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1a202c;
    line-height: 1;
}
.prof-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(0,0,0,0.38);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 5px;
}

/* Section titles */
.prof-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(0,0,0,0.35);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 12px;
}

/* Bar chart — grid sin scroll horizontal */
.prof-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 22px;
    width: 100%;
}
.prof-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.prof-bar-val {
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(0,0,0,0.45);
}
.prof-bar-track {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: flex-end;
}
.prof-bar {
    width: 100%;
    background: linear-gradient(to top, #667eea, #a78bfa);
    border-radius: 4px 4px 0 0;
    transition: height 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
    min-height: 3px;
}
.prof-bar-best {
    background: linear-gradient(to top, #d97706, #fcd34d) !important;
    box-shadow: 0 0 8px rgba(251,191,36,0.4);
}
.prof-bar-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(0,0,0,0.35);
}

/* Featured stat card */
.prof-stat-featured {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(167,139,250,0.1));
    border: 1px solid rgba(102,126,234,0.2);
}
.prof-stat-featured .prof-stat-value {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hot streak card */
.prof-stat-hot {
    background: rgba(251,146,60,0.1);
    border: 1px solid rgba(251,146,60,0.25);
}
.prof-stat-hot .prof-stat-value { color: #fb923c; }

/* Trend indicator */
.prof-trend {
    font-size: 0.85rem;
    font-weight: 800;
    vertical-align: middle;
    margin-left: 2px;
}
.prof-trend-up   { color: #16a34a; }
.prof-trend-down { color: #dc2626; }
.prof-trend-eq   { color: rgba(0,0,0,0.22); }

/* Podium */
.prof-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 6px;
    padding: 4px 0 8px;
}
.prof-pod-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    max-width: 96px;
    position: relative;
}
.prof-pod-rank-badge {
    font-size: 0.6rem;
    font-weight: 800;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.prof-pod-rank-1 .prof-pod-rank-badge { background: #f59e0b; color: #1a1a1a; }
.prof-pod-rank-2 .prof-pod-rank-badge { background: rgba(156,163,175,0.7); color: #1a1a1a; }
.prof-pod-rank-3 .prof-pod-rank-badge { background: rgba(180,100,40,0.75); color: #fff; }

.prof-pod-photo {
    width: 58px; height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #e8e8f0;
}
.prof-pod-rank-1 .prof-pod-photo {
    width: 72px; height: 90px;
    border: 2px solid rgba(245,158,11,0.55);
    box-shadow: 0 4px 18px rgba(245,158,11,0.25);
}
.prof-pod-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.prof-pod-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prof-pod-count {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(0,0,0,0.38);
}
.prof-pod-rank-1 .prof-pod-count { color: #d97706; }

/* Top players — grid sin scroll horizontal */
.prof-top-players {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.prof-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.prof-player-photo {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    position: relative;
}
.prof-player-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.prof-player-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #e8e8f0;
}
.prof-player-placeholder::after {
    content: '';
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.12);
}
.prof-player-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prof-player-count {
    font-size: 0.6rem;
    font-weight: 600;
    color: #6366f1;
    text-align: center;
}

/* ============ HISTORIAL DE FECHAS ============ */
.fecha-history-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed #e0e0e0;
}

.fecha-history-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
}

.fecha-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.fecha-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--bg-white);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

.fecha-chip:hover {
    border-color: var(--scottish-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fecha-chip.active {
    background: var(--scottish-blue);
    border-color: var(--scottish-blue);
}

.fecha-chip-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.fecha-chip.active .fecha-chip-num {
    color: rgba(255,255,255,0.8);
}

.fecha-chip-pts {
    font-size: 16px;
    font-weight: 700;
    color: var(--scottish-blue);
}

.fecha-chip.active .fecha-chip-pts {
    color: #ffffff;
}

/* Panel de detalle */
.fecha-history-detail {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.fecha-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
}

.fecha-detail-titulo {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 17px;
    color: white;
}

.fecha-detail-total {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--gold);
}

.fecha-detail-list {
    display: flex;
    flex-direction: column;
}

.fecha-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
}

.fecha-detail-row:last-child {
    border-bottom: none;
}

.fecha-detail-row:hover {
    background: #fafafa;
}

.fd-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fd-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
    border: 2px solid #e8e8e8;
}

.fd-avatar-placeholder {
    background: var(--bg-light);
}

.fd-player-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fd-player-name {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fd-equipo {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    align-self: flex-start;
}

.fd-pts {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--scottish-blue);
    flex-shrink: 0;
    margin-left: 10px;
}

.fecha-detail-loading,
.fecha-detail-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 480px) {
    .fecha-chips { gap: 8px; }
    .fecha-chip { padding: 6px 11px; }
    .fecha-chip-pts { font-size: 14px; }
    .fecha-chip-num { font-size: 11px; }
    .fd-avatar { width: 32px; height: 32px; }
    .fd-player-name { font-size: 13px; }
    .fd-pts { font-size: 16px; }
    .fecha-detail-titulo { font-size: 15px; }
    .fecha-detail-total { font-size: 16px; }
    .market-locked-title { font-size: 19px; }
    .market-locked-icon { font-size: 44px; }
}

/* ============ MODALES ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(5px); }
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

/* ── Edit Fecha Modal — fullscreen override ── */
.modal-content.edit-fecha-modal {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

.edit-fecha-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 0 !important;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--scottish-blue), var(--thistle-purple), var(--scottish-blue));
}

@keyframes modalPopIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 25px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
}

.modal-title {
    font-size: 22px;
    font-family: 'Lora', serif;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.modal-players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-player-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.modal-player-item:hover {
    background: var(--scottish-blue);
    color: white;
    border-color: var(--scottish-blue);
}

.modal-player-item:hover .modal-player-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-player-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-player-item.disabled:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--border-color);
}

/* Entrenador ya usado */
.modal-player-item.used-coach {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
    opacity: 0.8;
    cursor: not-allowed;
}

.modal-player-item.used-coach:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: var(--text-dark);
    border-color: #ef4444;
}

.modal-player-item.used-coach .modal-player-name {
    text-decoration: line-through;
    color: #991b1b;
}

/* Badges de estado */
.modal-player-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-player-badge.available {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.modal-player-badge.used {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* ── Headers de división en modal de entrenadores ── */
.modal-division-header {
    --div-color: #005eb8;
    --div-color-rgb: 0, 94, 184;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 16px;
    margin: 10px 0 0;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--div-color-rgb), 0.1) 0%, rgba(var(--div-color-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--div-color-rgb), 0.18);
    position: relative;
    overflow: hidden;
    transition: background 0.18s, border-color 0.18s;
}
.modal-division-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--div-color);
    border-radius: 10px 0 0 10px;
}
.modal-division-header:first-child { margin-top: 0; }
.modal-division-header:hover {
    background: linear-gradient(135deg, rgba(var(--div-color-rgb), 0.16) 0%, rgba(var(--div-color-rgb), 0.08) 100%);
    border-color: rgba(var(--div-color-rgb), 0.35);
}
.modal-division-header.open {
    border-radius: 10px 10px 0 0;
    border-bottom-color: transparent;
}

.division-label {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--div-color);
}
.modal-division-header .division-count {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--div-color);
    border-radius: 20px;
    padding: 2px 9px;
    min-width: 22px;
    text-align: center;
    line-height: 1.5;
}
.modal-division-header .division-chevron {
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
    color: var(--div-color);
    flex-shrink: 0;
    opacity: 0.7;
}
.modal-division-header.open .division-chevron { transform: rotate(180deg); }

/* Pill de cupos usados (solo en modal de jugadores) */
.cupo-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--div-color);
    background: rgba(var(--div-color-rgb), 0.12);
    border: 1px solid rgba(var(--div-color-rgb), 0.25);
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
}
.cupo-pill.full {
    color: #fff;
    background: var(--div-color);
    border-color: transparent;
}

/* Colores por división */
.modal-division-header.div-primera    { --div-color: #dc2626; --div-color-rgb: 220,38,38; }
.modal-division-header.div-intermedia { --div-color: #d97706; --div-color-rgb: 217,119,6; }
.modal-division-header.div-pre_a      { --div-color: #7c3aed; --div-color-rgb: 124,58,237; }
.modal-division-header.div-pre_b      { --div-color: #0891b2; --div-color-rgb: 8,145,178; }
.modal-division-header.div-pre_c      { --div-color: #2563eb; --div-color-rgb: 37,99,235; }
.modal-division-header.div-staff_fisico { --div-color: #059669; --div-color-rgb: 5,150,105; }
.modal-division-header.div-sin_asignar { --div-color: #6b7280; --div-color-rgb: 107,114,128; }
.modal-division-header.div-usados     { --div-color: #ef4444; --div-color-rgb: 239,68,68; }

/* Items del grupo */
.coach-group-items {
    display: none;
    border: 1px solid rgba(0,0,0,0.08);
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    margin-bottom: 2px;
}
.coach-group-items.open { display: block; }

/* Separador en modal */
.modal-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-separator::before,
.modal-separator::after {
    content: '';
    flex: 1;
    border-bottom: 2px dashed var(--border-color);
}

.modal-separator span {
    padding: 0 15px;
    color: #ef4444;
}

/* Empty warning */
.modal-empty.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-weight: 600;
}

/* ============ ADMIN PANEL - DISEÑO CREATIVO ============ */

/* Header del Admin */
.admin-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.admin-header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0, 94, 184, 0.3);
}

.admin-header-text h2 {
    font-family: 'Lora', serif;
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.admin-header-text p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Dashboard Cards */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.admin-stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.admin-stat-card.card-players::before { background: var(--scottish-blue); }
.admin-stat-card.card-fechas::before { background: var(--thistle-purple); }
.admin-stat-card.card-users::before { background: var(--success); }
.admin-stat-card.card-market::before { background: var(--warning); }

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.card-players .admin-stat-icon { background: rgba(0, 94, 184, 0.1); }
.card-fechas .admin-stat-icon { background: rgba(126, 63, 143, 0.1); }
.card-users .admin-stat-icon { background: rgba(40, 167, 69, 0.1); }
.card-market .admin-stat-icon { background: rgba(243, 156, 18, 0.1); }

.admin-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Lora', serif;
    line-height: 1;
    margin-bottom: 5px;
}

.admin-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Control de Mercado - Destacado */
.market-control {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.market-control::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.market-control-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.market-control-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    transition: all var(--transition-normal);
}

.market-control-icon.locked {
    background: linear-gradient(135deg, var(--error) 0%, #e74c3c 100%);
}

.market-control-icon.unlocked {
    background: linear-gradient(135deg, var(--success) 0%, #2ecc71 100%);
}

.market-control-text h3 {
    color: white;
    font-family: 'Lora', serif;
    font-size: 20px;
    margin-bottom: 5px;
}

.market-control-text p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    max-width: 350px;
}

.market-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.market-status-badge.locked {
    background: rgba(192, 57, 43, 0.2);
    color: #e74c3c;
}

.market-status-badge.unlocked {
    background: rgba(40, 167, 69, 0.2);
    color: #2ecc71;
}

.market-control-btn {
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-control-btn.lock {
    background: var(--error);
    color: white;
}

.market-control-btn.lock:hover {
    background: #a93226;
    transform: scale(1.02);
}

.market-control-btn.unlock {
    background: var(--success);
    color: white;
}

.market-control-btn.unlock:hover {
    background: #218838;
    transform: scale(1.02);
}

/* Market Timer Config (Admin) */
.market-timer-config {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.timer-config-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.timer-config-header .timer-icon {
    font-size: 1.5rem;
}

.timer-config-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.timer-config-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.timer-config-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.timer-config-inputs .form-group {
    flex: 1;
    min-width: 120px;
}

.timer-config-inputs .form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.timer-config-inputs input[type="date"],
.timer-config-inputs input[type="time"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: white;
}

.timer-config-inputs input:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.1);
}

.current-timer-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    border-radius: var(--radius-md);
    color: white;
}

.current-timer-display .timer-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.current-timer-display .scheduled-time {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Countdown Timer para usuarios */
/* === COUNTDOWN TIMER — Scoreboard style === */
.market-countdown {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: linear-gradient(160deg, #060e1f 0%, #0c1a35 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 22px 24px 18px;
    margin-bottom: 20px;
    overflow: hidden;
}

/* Línea dorada en el tope */
.market-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Resplandor radial detrás del timer */
.market-countdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 110px;
    background: radial-gradient(ellipse at top, rgba(255,215,0,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.market-countdown .countdown-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 215, 0, 0.55);
    position: relative;
    z-index: 1;
}

.market-countdown .countdown-timer {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    letter-spacing: 0.06em;
    line-height: 1;
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}

.market-countdown .countdown-date {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.04em;
    position: relative;
    z-index: 1;
}

/* === URGENTE (< 1 hora) === */
.market-countdown.urgent {
    border-color: rgba(239, 68, 68, 0.45);
    animation: countdown-danger 1.2s ease-in-out infinite;
}

.market-countdown.urgent::before {
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
}

.market-countdown.urgent::after {
    background: radial-gradient(ellipse at top, rgba(239,68,68,0.1) 0%, transparent 70%);
}

@keyframes countdown-danger {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 20px 2px rgba(239,68,68,0.18); }
}

.market-countdown.urgent .countdown-timer {
    color: #fca5a5;
    text-shadow: 0 0 30px rgba(239,68,68,0.35);
    animation: shake 0.4s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
}

.market-countdown.urgent .countdown-label {
    color: rgba(252, 165, 165, 0.7);
}

.market-countdown.urgent .countdown-date {
    color: rgba(252, 165, 165, 0.4);
}

/* === EXPIRADO === */
.market-countdown.expired {
    border-color: rgba(34, 197, 94, 0.3);
    animation: none;
}

.market-countdown.expired::before {
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.market-countdown.expired::after {
    background: radial-gradient(ellipse at top, rgba(34,197,94,0.07) 0%, transparent 70%);
}

.market-countdown.expired .countdown-timer {
    color: #86efac;
    text-shadow: 0 0 30px rgba(34,197,94,0.2);
}

.market-countdown.expired .countdown-label {
    color: rgba(134, 239, 172, 0.65);
}

.market-countdown.expired .countdown-date {
    color: rgba(134, 239, 172, 0.35);
}

/* Responsive para timer */
@media (max-width: 768px) {
    .timer-config-inputs {
        flex-direction: column;
    }

    .timer-config-inputs .form-group {
        width: 100%;
    }

    .timer-config-inputs .btn {
        width: 100%;
    }

    .market-countdown {
        padding: 18px 20px 14px;
        border-radius: 14px;
    }

    .market-countdown .countdown-timer {
        font-size: 2.4rem;
    }
}

/* Admin Sections Grid */
.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

@media (max-width: 900px) {
    .admin-sections {
        grid-template-columns: 1fr;
    }
}

/* Admin Section Card */
.admin-section {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.admin-section:hover {
    box-shadow: var(--shadow-md);
}

.admin-section-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.admin-section-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.admin-section-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.admin-section.section-players .admin-section-icon {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, #0077cc 100%);
}

.admin-section.section-stats .admin-section-icon {
    background: linear-gradient(135deg, var(--thistle-purple) 0%, #9b59b6 100%);
}

.admin-section.section-actions .admin-section-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.admin-section-title {
    flex: 1;
}

.admin-section-title h3 {
    font-family: 'Lora', serif;
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.admin-section-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.admin-section-toggle {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.admin-section.expanded .admin-section-toggle {
    transform: rotate(180deg);
}

.admin-section-body {
    padding: 25px;
    display: none;
}

.admin-section.expanded .admin-section-body {
    display: block;
}

/* Form dentro de admin */
.admin-form {
    display: grid;
    gap: 20px;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.admin-form .form-group {
    margin-bottom: 0;
}

.admin-form .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form .form-group label .label-icon {
    font-size: 14px;
}

.admin-form input,
.admin-form select {
    padding: 10px 14px;
    font-size: 14px;
}

/* Image Upload Area */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--scottish-blue);
    background: rgba(0, 94, 184, 0.02);
}

.image-upload-area.has-image {
    border-style: solid;
    border-color: var(--success);
}

.image-preview-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.image-preview-container img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* Filtros de búsqueda en lista admin */
.admin-players-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.admin-filter-input {
    flex: 1;
    min-width: 160px;
}

.admin-filter-select {
    flex: 0 0 auto;
    min-width: 130px;
}

@media (max-width: 600px) {
    .admin-players-filters {
        flex-direction: column;
    }
    .admin-filter-input,
    .admin-filter-select {
        width: 100%;
        min-width: 0;
    }
}

/* Badge de habilidad en lista admin */
.admin-ability-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

/* Players List in Admin */
.admin-players-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    padding-right: 10px;
}

.admin-player-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.admin-player-card:hover {
    background: var(--bg-white);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-player-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-player-info {
    flex: 1;
    min-width: 0;
}

.admin-player-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.admin-player-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.admin-player-position {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-player-position::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--scottish-blue);
    border-radius: var(--radius-full);
}

/* Badges de División/Equipo */
.equipo-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.equipo-primera {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #5c4800;
}

.equipo-intermedia {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #3d3d3d;
}

.equipo-pre_a {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: #3d2810;
}

.equipo-pre_b {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.equipo-pre_c {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.equipo-inactivo {
    background: #e5e7eb;
    color: #6b7280;
}

/* Jugador inactivo */
.admin-player-card.player-inactive {
    opacity: 0.6;
    background: #f9fafb;
}

.admin-player-card.player-inactive:hover {
    opacity: 0.8;
}

/* Preview de asignación de divisiones */
.division-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.division-preview-column {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.division-preview-header {
    padding: 10px 12px;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.division-preview-header.equipo-primera {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #5c4800;
}

.division-preview-header.equipo-intermedia {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #3d3d3d;
}

.division-preview-header.equipo-pre_a {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
}

.division-preview-header.equipo-pre_b {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.division-preview-header.equipo-pre_c {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.division-count {
    font-size: 11px;
    opacity: 0.9;
}

.division-preview-list {
    padding: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.division-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.division-preview-item.found {
    background: #d1fae5;
    color: #065f46;
}

.division-preview-item.not-found {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
}

@media (max-width: 768px) {
    .division-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .division-preview-grid {
        grid-template-columns: 1fr;
    }

    .division-preview-list {
        max-height: 150px;
    }
}

.admin-player-actions {
    display: flex;
    gap: 8px;
}

.admin-player-actions .btn {
    padding: 6px 12px;
    font-size: 11px;
}

.fecha-card-actions {
    display: flex;
    gap: 8px;
}

.fecha-card-actions .btn {
    padding: 6px 12px;
    font-size: 11px;
}

/* ============================================================
   LIGAS
   ============================================================ */

.ligas-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mis-ligas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ligas-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.liga-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.liga-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.liga-card-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.liga-card-img-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--scottish-blue), var(--thistle-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.liga-card-body {
    flex: 1;
    min-width: 0;
}

.liga-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.liga-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.liga-card-members {
    font-size: 12px;
    color: var(--text-muted);
}

.liga-card-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--scottish-blue);
    background: rgba(0,94,184,0.1);
    border-radius: 20px;
    padding: 2px 8px;
}

.liga-owner-badge {
    background: linear-gradient(135deg, var(--gold), #e6ac00);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 6px;
}

/* ── Liga Hero Card ── */
.liga-hero {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    border-radius: 18px;
    padding: 20px;
    position: relative;
    text-align: center;
    overflow: hidden;
}
.liga-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.liga-hero-back {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    border-radius: 10px;
    padding: 7px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.liga-hero-back:hover { background: rgba(255,255,255,0.25); }

.liga-hero-body { padding-top: 12px; }

.liga-hero-img-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.liga-hero-img-wrap .liga-detail-img {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.liga-hero-img-wrap .liga-detail-img-placeholder {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.liga-img-edit-wrap {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.liga-img-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--scottish-blue);
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.liga-hero-name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.liga-hero-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin: 6px 0 0;
}

.liga-hero-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.liga-lock-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}
.liga-hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.liga-hero-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.liga-hero-btn:hover { background: rgba(255,255,255,0.24); }
.liga-hero-btn:active { transform: scale(0.97); }

.liga-hero-btn-wa {
    background: rgba(37,211,102,0.25);
    border-color: rgba(37,211,102,0.3);
}
.liga-hero-btn-wa:hover { background: rgba(37,211,102,0.38); }

/* Legacy — keep for list view */
.liga-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.liga-back-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-primary);
    white-space: nowrap;
}

.liga-back-btn:hover { background: var(--border-color); }

.liga-detail-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.liga-detail-meta {
    font-size: 13px;
    color: var(--text-muted);
}

/* (invite bar replaced by liga-hero-actions) */

/* ── Lista de miembros de la liga ── */
.liga-members-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.liga-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.15s;
}

.liga-member-row:hover { background: rgba(255,255,255,0.05); }
.liga-member-row.is-me { background: rgba(0,94,184,0.08); }

.liga-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.liga-member-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--scottish-blue), var(--thistle-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.liga-member-info { flex: 1; min-width: 0; }

.liga-member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.liga-member-pts {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.liga-member-owner-badge {
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 20px;
    padding: 1px 8px;
}

.liga-member-me-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--scottish-blue);
    border-radius: 20px;
    padding: 1px 7px;
}

/* Botón eliminar miembro individual */
.liga-member-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.05);
    color: rgba(239,68,68,0.5);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    margin-left: auto;
}
.liga-member-remove-btn:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.35);
}

/* Botón eliminar liga — en tab Miembros */
.btn-liga-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1.5px solid rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.05);
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}
.btn-liga-delete:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.5);
}

/* Selector de imagen en modal crear liga */
.liga-img-picker {
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.liga-img-preview {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    border: 2px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
}

.liga-img-picker:hover .liga-img-preview {
    border-color: var(--scottish-blue);
    background: rgba(0,94,184,0.04);
    color: var(--scottish-blue);
}

/* Imagen en header del detalle de liga */
.liga-detail-img-wrap {
    flex-shrink: 0;
}

.liga-detail-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.liga-detail-img-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--scottish-blue), var(--thistle-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

/* Toggle "puntos desde cero" en modal crear liga */
.liga-desde-cero-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(0,94,184,0.05);
    border: 1px solid rgba(0,94,184,0.15);
    border-radius: 10px;
    cursor: pointer;
}
.liga-desde-cero-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--scottish-blue);
    flex-shrink: 0;
    cursor: pointer;
}
.liga-toggle-text span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.liga-toggle-text small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Match Results Toggle */
.match-results-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    margin: 16px 0 0;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-results-toggle:hover {
    background: rgba(0,0,0,0.07);
}

.match-results-toggle-arrow {
    font-size: 11px;
    color: var(--text-muted);
}

/* Match Results Grid */
.match-results-grid {
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 4px;
}

.match-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.match-result-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 90px;
}

.match-result-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.match-result-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--pill-color, #6b7280);
    background: transparent;
    color: var(--pill-color, #6b7280);
    transition: background 0.15s, color 0.15s;
}

.match-result-pill.active {
    background: var(--pill-color, #6b7280);
    color: #fff;
}

.match-result-pill:hover:not(.active) {
    background: color-mix(in srgb, var(--pill-color, #6b7280) 15%, transparent);
}

@media (max-width: 480px) {
    .match-result-label { min-width: 70px; font-size: 12px; }
    .match-result-pill  { font-size: 11px; padding: 3px 8px; }
}

/* Stats Upload Section */
.stats-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stats-config-item {
    text-align: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stats-config-item label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-config-item input {
    width: 100%;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Lora', serif;
}

.stats-config-item input:focus {
    border-color: var(--scottish-blue);
    outline: none;
}

.stats-config-item.positive input { color: var(--success); }
.stats-config-item.negative input { color: var(--error); }

/* Fecha Selector */
.fecha-selector-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.fecha-selector-row .form-group {
    margin-bottom: 0;
}

.fecha-selector-row .form-group:first-child {
    width: 100px;
}

.fecha-selector-row .form-group:last-child {
    flex: 1;
    min-width: 200px;
}

/* Upload Area Styled */
.excel-upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    background: var(--bg-light);
}

.excel-upload-area:hover {
    border-color: var(--thistle-purple);
    background: rgba(126, 63, 143, 0.03);
}

.excel-upload-area.active {
    border-color: var(--scottish-blue);
    border-style: solid;
    background: rgba(0, 94, 184, 0.05);
}

.excel-upload-area.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.upload-area-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.upload-area-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-area-example {
    margin-top: 10px;
    text-align: left;
    width: 100%;
}

.upload-example-lbl {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.upload-example-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
}

.upload-example-row span {
    flex: 1;
    padding: 5px 4px;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-dark);
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-example-row span:last-child { border-right: none; }

/* Fechas List */
.fechas-grid {
    display: grid;
    gap: 12px;
    margin-top: 25px;
}

.fecha-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.fecha-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.fecha-card-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fecha-card-number {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--thistle-purple) 0%, #9b59b6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Lora', serif;
}

.fecha-card-details h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.fecha-card-details p {
    font-size: 13px;
    color: var(--text-muted);
}

.fecha-card-actions {
    display: flex;
    gap: 8px;
}

/* Global Actions */
.global-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.global-action-card {
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.global-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--scottish-blue), var(--thistle-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.global-action-card:hover {
    border-color: var(--scottish-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 94, 184, 0.15);
}

.global-action-card:hover::before {
    opacity: 1;
}

.global-action-card.danger::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.global-action-card.danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.global-action-card.danger:hover {
    border-color: #ef4444;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
}

.global-action-card.warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.global-action-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.global-action-card.warning:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.global-action-icon {
    font-size: 42px;
    margin-bottom: 15px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.global-action-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.global-action-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.global-action-card .btn {
    width: 100%;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .market-control {
        flex-direction: column;
        text-align: center;
    }

    .market-control-info {
        flex-direction: column;
    }

    .market-control-text {
        text-align: center;
    }

    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .fecha-selector-row {
        flex-direction: column;
    }

    .fecha-selector-row .form-group:first-child,
    .fecha-selector-row .form-group:last-child {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }

    .admin-stat-card {
        padding: 20px;
    }

    .admin-stat-value {
        font-size: 28px;
    }
}

/* ============ MI EQUIPO - MOBILE OPTIMIZED ============ */

/* Tablet */
@media (max-width: 768px) {
    .rugby-field {
        padding: 20px 10px;
        min-height: auto;
        border-radius: 15px;
    }

    .rugby-field::before,
    .rugby-field::after {
        opacity: 0.5;
    }

    .formation-container {
        gap: 12px;
    }

    .formation-row {
        gap: 8px;
        flex-wrap: wrap;
    }

    .position-card {
        width: 85px;
        min-height: 100px;
        padding: 10px 6px;
        border-radius: 12px;
    }

    .position-card::before {
        width: 16px;
        height: 6px;
    }

    .position-card .add-icon {
        font-size: 24px;
    }

    .position-name {
        font-size: 8px;
    }

    .player-info-bar .player-selected-name {
        font-size: 8px;
    }

    .player-details-overlay .player-selected-name {
        font-size: 10px;
    }

    .player-details-overlay .position-name {
        font-size: 8px;
    }

    .team-counter {
        font-size: 14px;
        padding: 10px 15px;
        gap: 15px;
    }

    .staff-section {
        gap: 15px;
        padding: 15px;
        margin: 20px 0;
    }

    .staff-card {
        width: 110px;
        min-height: 130px;
    }

    .staff-card::before {
        font-size: 12px;
        padding: 4px 8px;
        top: -10px;
    }

    .captain-hint {
        padding: 12px 15px;
        max-width: 100%;
        flex-direction: column;
        text-align: center;
    }

    .captain-hint-text {
        text-align: center;
        font-size: 12px;
    }

    .captain-hint-icon {
        font-size: 26px;
    }

    .save-team-container {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .btn-save-team,
    .btn-reset-team {
        padding: 12px 25px;
        font-size: 13px;
        width: 100%;
    }

    .captain-crown-btn {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .captain-badge {
        font-size: 7px;
        padding: 3px 8px;
        top: -8px;
    }

    .captain-badge::before {
        content: '👑 ';
        font-size: 8px;
    }

    .remove-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
        top: -6px;
        right: -6px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .rugby-field {
        padding: 15px 6px;
        border-radius: 12px;
        border-width: 2px;
    }

    .formation-container {
        gap: 10px;
    }

    .formation-row {
        gap: 5px;
    }

    /* Cards compactas en móvil */
    .position-card {
        width: 68px;
        min-height: 82px;
        padding: 8px 4px;
        border-radius: 10px;
    }

    .position-card::before {
        width: 14px;
        height: 5px;
        border-radius: 0 0 8px 8px;
    }

    .position-card .add-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .add-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .position-name {
        font-size: 7px;
        line-height: 1.1;
        letter-spacing: 0;
    }

    .player-card-photo {
        border-radius: 8px 8px 0 0;
    }

    .player-info-bar {
        padding: 3px 3px 4px;
        gap: 1px;
        border-radius: 0 0 8px 8px;
    }

    .player-info-bar .player-selected-name {
        font-size: 7px;
        line-height: 1.1;
    }

    .player-info-bar .player-points {
        font-size: 7px;
        padding: 1px 4px;
    }

    .card-equipo-badge {
        font-size: 6px;
        padding: 1px 4px;
    }

    .player-details-overlay {
        padding: 5px 3px;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .player-details-overlay .player-selected-name {
        font-size: 8px;
        line-height: 1.1;
    }

    .player-details-overlay .position-name {
        font-size: 6px;
    }

    .player-details-overlay .player-points {
        font-size: 8px;
        padding: 2px 5px;
        border-radius: 6px;
    }

    .team-counter {
        font-size: 12px;
        padding: 8px 12px;
        gap: 10px;
        border-radius: 20px;
    }

    .staff-section {
        gap: 10px;
        padding: 12px;
        margin: 15px 0;
        border-radius: 15px;
    }

    .staff-card {
        width: 100%;
        min-height: 70px;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px 15px;
        gap: 12px;
        border-radius: 12px;
    }

    .staff-card::before {
        top: 50%;
        left: -10px;
        transform: translateY(-50%);
        border-radius: 0 8px 8px 0;
        padding: 3px 6px;
        font-size: 10px;
    }

    .staff-card .add-icon {
        font-size: 22px;
        margin-bottom: 0;
    }

    .staff-card .position-name {
        font-size: 11px;
    }

    .staff-card .staff-icon {
        font-size: 22px;
        margin-bottom: 0;
    }

    .staff-card.filled .player-image {
        position: relative;
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }

    .staff-card.filled .player-details-overlay {
        position: relative;
        background: transparent;
        padding: 0;
        text-align: left;
    }

    .staff-card.filled .player-details-overlay .player-selected-name {
        font-size: 12px;
        color: white;
    }

    .captain-hint {
        padding: 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .captain-hint-icon {
        font-size: 22px;
    }

    .captain-hint-text {
        font-size: 10px;
    }

    .captain-crown-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 3px;
        left: 3px;
    }

    .captain-crown-btn.is-captain {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .remove-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -5px;
        right: -5px;
    }

    .btn-save-team,
    .btn-reset-team {
        padding: 12px 20px;
        font-size: 12px;
        border-radius: 20px;
        letter-spacing: 0.5px;
    }

    .captain-badge {
        font-size: 6px;
        padding: 2px 6px;
        top: -6px;
        border-radius: 10px;
        letter-spacing: 0.5px;
    }

    .captain-badge::before {
        font-size: 7px;
    }

    /* Capitán card highlight en móvil */
    .position-card.is-captain-card {
        box-shadow: 0 0 15px rgba(255,215,0,0.4), 0 5px 15px rgba(0,0,0,0.3);
    }

    /* Ajuste específico para filas con 3 elementos en móvil */
    .formation-row:nth-child(1),
    .formation-row:nth-child(3),
    .formation-row:nth-child(6) {
        gap: 4px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    .rugby-field {
        padding: 12px 4px;
    }

    .position-card {
        width: 60px;
        min-height: 72px;
        padding: 6px 3px;
        border-radius: 8px;
    }

    .position-card::before {
        width: 12px;
        height: 4px;
    }

    .position-card .add-icon {
        font-size: 16px;
    }

    .position-name {
        font-size: 6px;
    }

    .player-info-bar .player-selected-name {
        font-size: 6px;
    }

    .player-info-bar .player-points {
        font-size: 6px;
        padding: 1px 3px;
    }

    .card-equipo-badge {
        font-size: 5px;
        padding: 1px 3px;
    }

    .player-details-overlay .player-selected-name {
        font-size: 7px;
    }

    .player-details-overlay .player-points {
        font-size: 7px;
        padding: 1px 4px;
    }

    .formation-row {
        gap: 3px;
    }

    .team-counter {
        font-size: 11px;
        padding: 6px 10px;
    }

    .captain-crown-btn {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .remove-btn {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .captain-badge {
        font-size: 5px;
        padding: 2px 4px;
    }

    .captain-badge::before {
        content: '';
    }
}

/* ============ SISTEMA DE ANUNCIOS ============ */

/* Formulario de anuncios en admin */
.announcement-form {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius-lg);
}

.announcement-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.prize-images-upload {
    margin-top: 10px;
}

.prize-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.prize-image-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.prize-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-announcement-preview {
    padding: 15px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Modal de anuncio */
.announcement-modal-content {
    max-width: 500px;
    text-align: center;
}

.announcement-header {
    background: linear-gradient(135deg, var(--scottish-blue) 0%, var(--thistle-purple) 100%);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px;
}

.announcement-header .modal-title {
    color: white;
    font-size: 22px;
}

.announcement-header .modal-close {
    color: white;
}

.announcement-body {
    padding: 25px;
}

.announcement-body p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.announcement-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.announcement-prize-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.announcement-prize-img:hover {
    transform: scale(1.05);
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    justify-content: center;
}

/* Responsive anuncios */
@media (max-width: 480px) {
    .announcement-modal-content {
        max-width: 95%;
        margin: 10px;
    }

    .announcement-header {
        padding: 15px;
    }

    .announcement-header .modal-title {
        font-size: 18px;
    }

    .announcement-body {
        padding: 20px 15px;
    }

    .announcement-body p {
        font-size: 14px;
    }

    .announcement-prize-img {
        max-width: 140px;
        max-height: 140px;
    }
}

/* ============================================================
   EQUIPOS DE LA FECHA — Division tabs + photo cards + bottom sheet
   ============================================================ */

/* --- Hint de instrucción --- */
.eq-hint {
    font-size: 0.72rem;
    color: rgba(44,62,80,0.45);
    text-align: center;
    margin: -10px 0 16px;
    letter-spacing: 0.01em;
}

/* --- Division tabs --- */
.div-tabs-wrap {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.div-tabs-wrap::-webkit-scrollbar { display: none; }

.div-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 2px;
    width: max-content;
    min-width: 100%;
}

.div-tab {
    background: rgba(255,255,255,0.72);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.div-tab:hover {
    border-color: var(--scottish-blue);
    color: var(--scottish-blue);
    background: rgba(0, 94, 184, 0.07);
}

.div-tab.active {
    background: var(--scottish-blue);
    border-color: var(--scottish-blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 94, 184, 0.32);
}

/* --- Loading state --- */
.eq-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.eq-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(0, 94, 184, 0.2);
    border-top-color: var(--scottish-blue);
    border-radius: 50%;
    animation: eq-spin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes eq-spin {
    to { transform: rotate(360deg); }
}

/* --- Empty state --- */
.eq-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
    gap: 12px;
    color: var(--text-muted);
    font-size: 15px;
}

.eq-empty-icon {
    font-size: 48px;
    opacity: 0.45;
}

/* --- Cards grid --- */
.eq-grid {
    display: block;
    padding: 4px 0 8px;
}

/* Position group header */
.eq-position-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-muted);
    padding: 18px 2px 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}
.eq-position-header:first-child {
    padding-top: 4px;
}

/* Cards row within each position group */
.eq-position-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 12px;
    margin-bottom: 4px;
}

/* --- Individual card (photo-only) --- */
.eq-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3 / 4;
    background: #1a2a4a;
    box-shadow: 0 3px 14px rgba(0,0,0,0.22);
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.eq-card:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 28px rgba(0,0,0,0.30);
}

.eq-card:active {
    transform: scale(0.92);
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.eq-photo-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.eq-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.eq-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(145deg, var(--scottish-blue) 0%, #003d7a 100%);
}

/* Selection % badge — top-left */
.eq-sel-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.68);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    line-height: 1.2;
}


/* ============================================================
   PLAYER STATS PANEL — Bottom Sheet
   ============================================================ */

/* ── Ranking Team Modal ───────────────────────────────────────── */
.rtm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    align-items: flex-end;
    justify-content: center;
}
.rtm-overlay.visible {
    display: flex;
    animation: fadeIn 0.2s ease;
}
.rtm-sheet {
    background: #1a1a2e;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}
.rtm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.rtm-title {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}
.rtm-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rtm-body {
    overflow-y: auto;
    padding: 16px;
    flex: 1;
}
.rtm-loading {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 32px 0;
    font-size: 0.9rem;
}
.rtm-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin: 14px 0 6px;
}
.rtm-group-label:first-child { margin-top: 0; }
.rtm-player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 5px;
}
.rtm-player-row.rtm-captain {
    background: rgba(255, 196, 0, 0.12);
    border: 1px solid rgba(255, 196, 0, 0.3);
}
.rtm-player-pos {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    width: 52px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.rtm-player-name {
    flex: 1;
    font-size: 0.88rem;
    color: #fff;
    font-weight: 500;
}
.rtm-captain-badge {
    font-size: 0.7rem;
    background: rgba(255,196,0,0.2);
    color: #ffc400;
    border-radius: 6px;
    padding: 2px 7px;
    font-weight: 700;
    flex-shrink: 0;
}
.rtm-empty-slot {
    color: rgba(255,255,255,0.25);
    font-style: italic;
}
.rtm-no-team {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 32px 0;
    font-size: 0.9rem;
}

.rtm-fecha-pts {
    font-size: 0.82rem;
    font-weight: 700;
    color: #a78bfa;
    margin-left: auto;
    white-space: nowrap;
}

.rtm-fecha-total {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── RTM Mini Cards ── */
.rtm-fecha-subtitle {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.rtm-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.rtm-mini-card {
    width: calc(33.33% - 6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    overflow: hidden;
    padding-bottom: 8px;
}
.rtm-mini-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}
.rtm-mini-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rtm-mini-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    font-size: 1.6rem;
}
/* Fila de centros: igual que las demás filas */
.rtm-row-centros {
    justify-content: flex-start;
}

.rtm-mini-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    margin: 8px auto 4px;
    display: block;
}
.rtm-mini-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin: 8px auto 4px;
}
.rtm-mini-name {
    font-size: 0.67rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 5px 4px 1px;
    line-height: 1.2;
    width: 100%;
}
.rtm-mini-pos {
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
}
.rtm-mini-pts {
    font-size: 0.72rem;
    font-weight: 800;
    color: #a78bfa;
    text-align: center;
    margin-top: 3px;
}

/* Entrenador en el modal de ranking */
.rtm-coach-card {
    border: 1px solid rgba(255, 215, 0, 0.4) !important;
    background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(255,180,0,0.05) 100%) !important;
}
.rtm-coach-badge {
    color: #ffd700 !important;
    font-size: 0.65rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rtm-coach-row {
    border-left: 3px solid rgba(255, 215, 0, 0.5) !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

/* ── Player Stats Bottom Sheet ────────────────────────────────── */
.psp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 800;
    pointer-events: none;
    transition: background 0.3s ease;
}

.psp-overlay.visible {
    background: rgba(0,0,0,0.5);
    pointer-events: auto;
}

.psp-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 801;
    background: linear-gradient(160deg, #081428 0%, #0c1e3e 60%, #081428 100%);
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    transform: translateY(105%);
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 -2px 0 rgba(255,255,255,0.06);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.psp-sheet.visible {
    transform: translateY(0);
}

/* Handle bar */
.psp-handle-bar {
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,0.22);
    border-radius: 2px;
    margin: 14px auto 0;
}

/* Header */
.psp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 14px;
}

.psp-photo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.12);
}

.psp-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.psp-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.psp-identity {
    flex: 1;
    min-width: 0;
}

.psp-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psp-pos-div {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.psp-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.psp-pill-pos {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.10);
}

.psp-pill-div {
    color: rgba(255,215,0,0.9);
    background: rgba(255,215,0,0.12);
}

/* Stats grid */
.psp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0 22px 16px;
    border-radius: 16px;
    overflow: hidden;
}

.psp-stat-item {
    background: rgba(10, 25, 55, 0.7);
    padding: 16px 8px 14px;
    text-align: center;
    transition: background 0.2s;
}

.psp-stat-item.psp-highlight {
    background: rgba(0, 94, 184, 0.28);
}

.psp-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.psp-stat-item.psp-highlight .psp-stat-num {
    color: #7fc6ff;
}

.psp-stat-lbl {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenido scrolleable del sheet */
.psp-scroll-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

/* Stats secundarias: Asist / Positivo / Errados / 🟡 / 🔴 / MVP */
.psp-stats-secondary {
    grid-template-columns: repeat(3, 1fr);
    margin-top: -12px;
    margin-bottom: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.psp-stats-secondary .psp-stat-item {
    padding: 10px 4px 9px;
    background: rgba(10, 25, 55, 0.5);
}

.psp-stats-secondary .psp-stat-num {
    font-size: 16px;
    margin-bottom: 4px;
}

.psp-stats-secondary .psp-stat-lbl {
    font-size: 9px;
}

.psp-stat-item.psp-errado .psp-stat-num {
    color: #ff7070;
}
.psp-stat-item.psp-errado .psp-stat-lbl {
    color: rgba(255, 112, 112, 0.6);
}

/* Selection bar */
.psp-sel-section {
    padding: 0 22px 22px;
}

.psp-sel-header {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}

.psp-sel-header strong {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.psp-sel-bar-bg {
    height: 6px;
    background: rgba(255,255,255,0.10);
    border-radius: 3px;
    overflow: hidden;
}

.psp-sel-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e5fbe, #60b4ff);
    border-radius: 3px;
    transition: width 0.75s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.psp-sel-nodata {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    font-style: italic;
    text-align: center;
    padding: 4px 0;
}
/* Responsive */
@media (max-width: 480px) {
    .eq-position-row {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .psp-name {
        font-size: 17px;
    }

    .psp-stat-num {
        font-size: 22px;
    }

    .psp-stats-grid {
        margin: 0 16px 14px;
    }

    .psp-header {
        padding: 16px 18px 12px;
    }

    .psp-sel-section {
        padding: 0 16px 20px;
    }
}

/* ── Banner de notificaciones de cambios de jugadores ───────────────────── */
.team-notif-banner {
    background: #fff8e1;
    border: 1.5px solid #f9a825;
    border-radius: 10px;
    margin: 0 0 14px 0;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(249,168,37,0.12);
}

.team-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #7a5800;
}

.team-notif-dismiss {
    background: #f9a825;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.team-notif-dismiss:hover {
    background: #e65100;
}

.team-notif-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: #5a4000;
    line-height: 1.6;
}

.team-notif-list li {
    margin-bottom: 4px;
}

/* ── Aviso estático "viernes al mediodía" ───────────────────────────────── */
.team-friday-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(25, 118, 210, 0.07);
    border: 1px solid rgba(25, 118, 210, 0.18);
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    margin: 0 0 14px 0;
    max-width: 100%;
}

.tfn-icon {
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1;
}

.tfn-text {
    font-size: 11.5px;
    color: #4a6fa5;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.tfn-text strong {
    color: #1976d2;
    font-weight: 700;
}

/* ============================================
   EQUIPO DE LA FECHA (statsSection)
   ============================================ */

.fdt-section {
    margin-bottom: 30px;
}

.fdt-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdt-fecha-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--scottish-blue);
    background: var(--scottish-blue-light);
    padding: 3px 10px;
    border-radius: 20px;
}

.fdt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.fdt-empty-icon {
    font-size: 36px;
}

/* ── FIFA IF Flip Cards (Equipo de la Fecha) ─────────────────────── */

/* fdt-field: estadio de noche para el TOTW */
.fdt-field {
    pointer-events: auto !important;
    user-select: none;
    background: url('../images/TOTW.webp') no-repeat center center !important;
    background-size: cover !important;
}

/* Deal animation */
@keyframes fdt-deal {
    0%   { opacity: 0; transform: translateY(-40px) rotate(-15deg) scale(0.7); filter: blur(2px); }
    60%  { opacity: 1; transform: translateY(6px) rotate(2deg) scale(1.04); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

/* Flip card outer wrapper */
.position-card.fdt-if-active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    width: 90px;
    min-height: 130px;
    perspective: 600px;
    cursor: pointer;
    overflow: visible !important;
    animation: fdt-deal 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.position-card.fdt-if-active::before { display: none; }
.position-card.fdt-if-active:hover { transform: none; box-shadow: none; border-color: transparent; }

/* Flip inner */
.fdt-flip-inner {
    width: 100%;
    height: 130px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.position-card.fdt-if-active.flipped .fdt-flip-inner {
    transform: rotateY(180deg);
}

/* Shared front/back */
.fdt-card-front, .fdt-card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

/* ── FRONT ── */
.fdt-card-front {
    background: linear-gradient(160deg, #1e0a3c 0%, #3b0764 40%, #1e0a3c 100%);
    box-shadow: 0 0 0 2px #c9a227, 0 0 12px rgba(201,162,39,0.6), 0 8px 24px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 6px;
}
/* Holographic shimmer overlay */
.fdt-card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255,255,255,0.12) 45%,
        rgba(180,120,255,0.15) 50%,
        rgba(255,255,255,0.08) 55%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: fdt-shimmer 3s ease-in-out infinite;
    border-radius: 12px;
    pointer-events: none;
}
@keyframes fdt-shimmer {
    0%   { background-position: 200% 50%; }
    50%  { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Position badge */
.fdt-pos-badge {
    position: absolute;
    top: 5px;
    left: 6px;
    font-size: 9px;
    font-weight: 800;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 6px rgba(201,162,39,0.8);
    line-height: 1;
}
/* Points badge */
.fdt-pts-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    background: rgba(201,162,39,0.85);
    border-radius: 4px;
    padding: 1px 4px;
    line-height: 1.4;
}
/* Photo wrap */
.fdt-photo-wrap {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 58px;
    height: 62px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.fdt-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}
.fdt-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(201,162,39,0.4);
}
/* Player name */
.fdt-name {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 100%;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.3;
}

/* ── BACK ── */
.fdt-card-back {
    background: linear-gradient(160deg, #0d0120 0%, #1e0a3c 100%);
    box-shadow: 0 0 0 2px #c9a227, 0 0 12px rgba(201,162,39,0.4), 0 8px 24px rgba(0,0,0,0.6);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 5px;
    gap: 2px;
}
.fdt-back-title {
    font-size: 7.5px;
    font-weight: 800;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}
.fdt-stat-row {
    font-size: 8.5px;
    color: #e8d5ff;
    display: flex;
    justify-content: space-between;
    width: 100%;
    line-height: 1.5;
}
.fdt-stat-row span:first-child { color: rgba(255,255,255,0.55); }
.fdt-stat-row span:last-child  { font-weight: 700; color: #fff; }
.fdt-stat-row.mvp-yes span:last-child { color: #fbbf24; }
.fdt-stat-row.fdt-card-yellow span:last-child { color: #fbbf24; }
.fdt-stat-row.fdt-card-red span:last-child { color: #ff7070; }

/* ============================================
   BANNER STICKY: CAMBIOS SIN GUARDAR
   ============================================ */

.unsaved-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: #1a1a2e;
    border-top: 2px solid var(--scottish-blue);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);

    /* Oculto por defecto: deslizado hacia abajo */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.unsaved-banner.visible {
    transform: translateY(0);
}

.unsaved-banner-text {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unsaved-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.unsaved-banner-btn {
    flex-shrink: 0;
    background: var(--scottish-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.unsaved-banner-btn:hover {
    background: var(--scottish-blue-dark);
    transform: scale(1.03);
}

.unsaved-banner-btn:active {
    transform: scale(0.97);
}

.unsaved-banner-btn.discard {
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.2);
}
.unsaved-banner-btn.discard:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    transform: scale(1.03);
}

/* En mobile: padding más compacto */
@media (max-width: 480px) {
    .unsaved-banner {
        padding: 10px 14px;
    }
    .unsaved-banner-text {
        font-size: 13px;
    }
    .unsaved-banner-btn {
        padding: 7px 14px;
        font-size: 13px;
    }
}
