/* ==========================================================================
   EN VIVO - Live Experience Styles (Mobile First)
   ========================================================================== */

/* Variables */
:root {
    --live-red: #dc2626;
    --live-red-dark: #991b1b;
    --live-blue: #2563eb;
    --live-green: #10b981;
    --live-yellow: #f59e0b;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    max-width: 100vw;
    overflow-x: hidden;
    background-color: var(--dark-bg);
    color: var(--text-primary);
}

/* Prevent all elements from causing overflow */
*,
*::before,
*::after {
    box-sizing: border-box;
    max-width: 100%;
}

.container,
.container-fluid,
.live-main,
.live-grid,
.grid-layout,
.live-card,
section {
    max-width: 100%;
    overflow-x: hidden;
}

.live-main {
    padding-top: 60px;
    min-height: 100vh;
}

.live-main-no-band {
    padding-top: 60px;
    min-height: 100vh;
}

body.live-band-active .live-main {
    padding-top: 92px;
}

/* Video & Info Section */
.video-and-info-section {
    background: var(--dark-bg);
    padding: 0;
}

.container-fluid {
    width: 100%;
    padding: 0;
}

.video-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Video Column */
.video-column {
    background: #000;
}

.live-video-container-full {
    width: 100%;
    background: #000;
}

.video-wrapper-full {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper-full iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Info Column */
.info-column {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.performing-card {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--live-red);
}

.performing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.performing-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.performing-time {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--live-red);
    font-family: 'Courier New', monospace;
}

.performing-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.performing-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--live-red);
    background: rgba(220, 38, 38, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
}

.performing-info {
    flex: 1;
}

.performing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.performing-category,
.performing-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.performing-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--live-red) 0%, #ef4444 100%);
    width: 0%;
    transition: width 1s linear;
    border-radius: 10px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.performing-next {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.performing-next strong {
    color: var(--text-primary);
}

/* Next Conjuntos Card */
.next-conjuntos-card {
    background: var(--dark-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.next-header {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.next-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.next-list {
    max-height: 400px;
    overflow-y: auto;
}

.next-list::-webkit-scrollbar {
    width: 6px;
}

.next-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.next-list::-webkit-scrollbar-thumb {
    background: var(--live-blue);
    border-radius: 10px;
}

.next-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.next-item:last-child {
    border-bottom: none;
}

.next-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.next-order {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--live-blue);
    min-width: 40px;
    text-align: center;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.next-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.next-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.next-modalidad {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Live Grid Layout */
.live-grid {
    padding: 1.5rem 0 3rem 0;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Live Cards */
.live-card {
    background: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.card-header svg {
    color: var(--live-red);
}

.refresh-btn,
.fullscreen-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover,
.fullscreen-btn:hover {
    background: var(--dark-card-hover);
    border-color: var(--live-red);
    color: var(--live-red);
}

.refresh-btn:active svg {
    animation: spin 0.5s ease-in-out;
}

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

/* Scores List */
.scores-list {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.score-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.score-item:last-child {
    margin-bottom: 0;
}

.score-position {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--live-red);
    min-width: 40px;
    text-align: center;
}

.score-item:nth-child(1) .score-position {
    color: #fbbf24;
}

.score-item:nth-child(2) .score-position {
    color: #94a3b8;
}

.score-item:nth-child(3) .score-position {
    color: #c2410c;
}

.score-info {
    flex: 1;
}

.score-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.score-details {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.score-points.descalificado {
    color: #ef4444;
    font-weight: bold;
    opacity: 0.8;
}

.leaderboard-table tr.descalificado {
    opacity: 0.6;
    color: #ef4444;
}

.score-points {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--live-green);
    font-family: 'Courier New', monospace;
}

/* Leaderboard */
.leaderboard-content {
    padding: 0;
}

.leaderboard-table {
    max-height: 500px;
    overflow-y: auto;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    position: sticky;
    top: 0;
    background: var(--dark-card);
    z-index: 10;
}

.leaderboard-table th {
    padding: 0.875rem 0.5rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.2;
}

.th-subtitle {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.7;
    text-transform: none;
}

.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
    width: 40px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    min-width: 150px;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table th:nth-child(4),
.leaderboard-table th:nth-child(5),
.leaderboard-table td:nth-child(3),
.leaderboard-table td:nth-child(4),
.leaderboard-table td:nth-child(5) {
    width: 70px;
    text-align: center;
}

.leaderboard-table th:last-child,
.leaderboard-table td:last-child {
    font-weight: 700;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

.leaderboard-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table tr:nth-child(1) td:first-child {
    color: #fbbf24;
    font-weight: 900;
}

.leaderboard-table tr:nth-child(2) td:first-child {
    color: #94a3b8;
    font-weight: 900;
}

.leaderboard-table tr:nth-child(3) td:first-child {
    color: #c2410c;
    font-weight: 900;
}

/* Share Buttons */
.share-card .card-header {
    padding-bottom: 1rem;
}

.share-buttons {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.facebook:hover {
    background: #0c63d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.twitter:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.whatsapp:hover {
    background: #1eb855;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.share-btn.link {
    background: var(--live-blue);
}

.share-btn.link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Chat Card */
.chat-card {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-card .card-header {
    flex-shrink: 0;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--live-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: slideInChat 0.3s ease;
}

@keyframes slideInChat {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.system .message-content {
    background: rgba(37, 99, 235, 0.1);
    border-left: 3px solid var(--live-blue);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

.message-content strong {
    color: var(--live-red);
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-left: 0.75rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--live-red);
    background: rgba(255, 255, 255, 0.08);
}

.chat-send {
    padding: 0.75rem 1.25rem;
    background: var(--live-red);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.chat-send:active {
    transform: scale(0.95);
}

/* Map Card */
.map-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 400px;
    max-height: 600px;
}

.route-map {
    width: 100% !important;
    height: 400px !important;
    background: rgba(15, 23, 42, 0.5);
    overflow: hidden !important;
    position: relative !important;
    border-radius: 8px;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

.route-map > div {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

.route-map img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: none !important;
    border-radius: 8px;
}

.map-legend {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-marker {
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.legend-marker.start {
    background: var(--live-green);
}

.legend-marker.route {
    background: var(--live-blue);
}

.legend-marker.end {
    background: var(--live-red);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--dark-card);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--live-green);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    font-size: 0.875rem;
}

/* Scrollbar Styling */
.scores-list::-webkit-scrollbar,
.leaderboard-table::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.scores-list::-webkit-scrollbar-track,
.leaderboard-table::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.scores-list::-webkit-scrollbar-thumb,
.leaderboard-table::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: var(--live-red);
    border-radius: 10px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .now-performing {
        padding: 2rem 0;
    }

    .performing-card {
        padding: 2rem;
    }

    .performing-header h2 {
        font-size: 1.5rem;
    }

    .performing-number {
        font-size: 4rem;
        min-width: 120px;
    }

    .performing-name {
        font-size: 2rem;
    }

    .share-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-layout {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .chat-card {
        height: 600px;
    }

    .map-card {
        height: 500px;
    }

    /* Video height optimization for tablets */
    .video-wrapper-full {
        padding-bottom: 50%; /* Slightly less height on tablets */
    }
}

@media (min-width: 1024px) {
    /* 2 Column Layout: Video Left, Info Right */
    .video-info-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 0;
        min-height: calc(100vh - 60px);
    }

    .video-column {
        position: sticky;
        top: 60px;
        height: calc(100vh - 60px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .live-video-container-full {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }

    .video-wrapper-full {
        padding-bottom: 56.25%;
        max-width: 100%;
        margin: 0;
    }

    .info-column {
        padding: 2rem;
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }

    .performing-card {
        padding: 2rem;
    }

    .performing-header h2 {
        font-size: 1.5rem;
    }

    .performing-number {
        font-size: 4rem;
        min-width: 120px;
    }

    .performing-name {
        font-size: 2rem;
    }

    .next-list {
        max-height: 500px;
    }

    .grid-layout {
        grid-template-columns: 1.2fr 1fr;
    }

    .live-grid {
        padding: 2rem 0 4rem 0;
    }

    .toast {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ========================================================================== */
/* Mobile Optimizations - NO HORIZONTAL SCROLL                               */
/* ========================================================================== */

@media (max-width: 768px) {
    /* Prevenir scroll horizontal en toda la página */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    * {
        box-sizing: border-box !important;
    }

    .container, .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Ajustes específicos para el mapa en móviles */
    .map-card {
        height: auto !important;
        min-height: 300px !important;
        max-height: 400px !important;
    }

    .route-map {
        width: 100% !important;
        height: 300px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .route-map > div {
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    .route-map img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    /* Video wrapper responsive */
    .video-wrapper,
    .video-wrapper-full {
        position: relative !important;
        padding-bottom: 56.25% !important;
        height: 0 !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }

    .video-wrapper iframe,
    .video-wrapper-full iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Presentándose Ahora - Móvil */
    .performing-number {
        font-size: clamp(0.75rem, 4vw, 1.25rem) !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 70px !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }

    .performing-name {
        font-size: clamp(0.8rem, 3.5vw, 1rem) !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
    }

    .performing-category {
        font-size: clamp(0.7rem, 3vw, 0.875rem) !important;
        word-break: break-word !important;
    }

    .performing-card,
    .next-conjuntos-card,
    .live-card {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Tabla de Posiciones - SIN SCROLL HORIZONTAL */
    .leaderboard-table {
        overflow-x: hidden;
        max-width: 100%;
    }

    .leaderboard-table table {
        width: 100%;
        table-layout: fixed; /* Fuerza las columnas a ajustarse */
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Columnas optimizadas para móvil */
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        width: 30px; /* Posición */
        text-align: center;
        padding: 0.5rem 0.2rem;
    }

    .leaderboard-table th:nth-child(2),
    .leaderboard-table td:nth-child(2) {
        width: auto; /* Nombre - toma el espacio disponible */
        white-space: normal; /* Permite wrap del nombre */
        line-height: 1.2;
        padding-right: 0.3rem;
    }

    /* Ocultar columnas Estadio y Pasacalle en móvil, solo mostrar Total */
    .leaderboard-table th:nth-child(3),
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(3),
    .leaderboard-table td:nth-child(4) {
        display: none; /* Ocultar Estadio y Pasacalle */
    }

    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5) {
        width: 50px; /* Total */
        text-align: center;
        font-weight: bold;
    }

    /* Headers más pequeños */
    .leaderboard-table th {
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
    }

    /* Puntajes Recientes - Optimizado */
    .scores-list {
        padding: 0.75rem;
        max-height: 350px;
    }

    .score-item {
        gap: 0.5rem;
        padding: 0.6rem;
        margin-bottom: 0.5rem;
    }

    .score-position {
        font-size: 1.1rem;
        min-width: 30px;
        flex-shrink: 0;
    }

    .score-info {
        flex: 1;
        min-width: 0; /* Permite que el texto se ajuste */
        overflow: hidden;
    }

    .score-name {
        font-size: 0.8rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .score-details {
        font-size: 0.65rem;
    }

    .score-points {
        font-size: 0.95rem;
        min-width: 45px;
        flex-shrink: 0;
        text-align: right;
    }

    /* Títulos de sección */
    .section-title {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    /* Cards más compactas */
    .live-card {
        margin: 0.5rem;
        padding: 0;
    }

    /* Próximos Conjuntos - Móvil */
    .next-item {
        gap: 0.5rem;
        padding: 0.75rem 0.75rem;
    }

    .next-order {
        font-size: 0.75rem;
        font-weight: 700;
        min-width: 30px;
        padding: 0.35rem 0.25rem;
        flex-shrink: 0;
    }

    .next-name {
        font-size: 0.75rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
}

@media (max-width: 480px) {
    /* Para pantallas muy pequeñas */

    /* Tabla súper compacta */
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.65rem;
    }

    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        width: 25px;
        font-size: 0.65rem;
    }

    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5) {
        width: 45px;
        font-size: 0.75rem;
    }

    /* Puntajes más compactos */
    .score-item {
        padding: 0.5rem;
    }

    .score-position {
        font-size: 1rem;
    }

    .score-name {
        font-size: 0.75rem;
    }

    .score-details {
        font-size: 0.6rem;
    }

    .score-points {
        font-size: 0.85rem;
        min-width: 40px;
    }

    /* Headers aún más pequeños */
    .leaderboard-table th {
        font-size: 0.6rem;
        text-transform: uppercase;
    }

    /* Nombre puede hacer wrap en 2 líneas máximo */
    .leaderboard-table td:nth-child(2) {
        max-width: 60%;
        line-height: 1.1;
    }

    /* Próximos Conjuntos - Pantallas pequeñas */
    .next-order {
        font-size: 0.65rem;
        min-width: 25px;
        padding: 0.3rem 0.2rem;
    }

    .next-name {
        font-size: 0.7rem;
        line-height: 1.25;
    }

    .next-item {
        padding: 0.6rem 0.5rem;
        gap: 0.4rem;
    }
}
