* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --accent-red: #ff2b2b;
    --accent-red-dark: #e61e1e;
    --accent-red-light: #ff4d4d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border-color: #2d2d2d;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
    --gradient-red: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-dark) 100%);
    --gradient-bg: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}

body {
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 43, 43, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 43, 43, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 43, 43, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}


.menu-dialog, .profile-dialog {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px var(--shadow-heavy), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 8px;
    min-width: 220px;
    backdrop-filter: blur(20px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-dialog.active, .profile-dialog.active {
    display: block;
}

.menu-item, .profile-admin-btn, .profile-logout-btn {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.menu-item:hover, .profile-admin-btn:hover, .profile-logout-btn:hover {
    background: var(--gradient-red);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 43, 43, 0.3);
}

.menu-item.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.menu-item.disabled:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.profile-dialog {
    padding: 20px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 43, 43, 0.3);
}

.profile-info {
    margin-bottom: 20px;
}

.profile-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-id {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.profile-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.1);
}

.profile-save-btn {
    background: var(--gradient-red);
    color: var(--text-primary);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.profile-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 43, 43, 0.4);
}


.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.admin-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-red) 50%, var(--accent-red-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 50px;
    margin-top: 80px;
    position: relative;
}

.admin-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-red);
    border-radius: 2px;
}


.admin-section {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 
        0 20px 40px var(--shadow-light),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--gradient-red);
    transition: left 0.5s ease;
}

.admin-section:hover::before {
    left: 0;
}

.admin-section:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 43, 43, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-section.full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 40px 60px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-red);
    border-radius: 2px;
}


.ranking-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.general-table-section, .players-escalados-section {
    background: rgba(17, 17, 17, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.general-table-section:hover, .players-escalados-section:hover {
    border-color: rgba(255, 43, 43, 0.3);
    box-shadow: 0 0 30px rgba(255, 43, 43, 0.1);
}


.admin-table-wrapper {
    max-height: 280px; /* Define a altura máxima. Ajuste se precisar. */
    overflow-y: auto;  /* Adiciona a barra de rolagem vertical quando necessário */
    overflow-x: auto;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.admin-table th {
    background: var(--gradient-red);
    padding: 18px 15px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    border: none;
    position: relative;
}

.admin-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.admin-table td {
    padding: 16px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.admin-table tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:nth-child(even) {
    background: rgba(26, 26, 26, 0.5);
}

.admin-table tbody tr:hover {
    background: rgba(255, 43, 43, 0.1);
    transform: scale(1.01);
}

.team-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left !important;
    padding-left: 15px;
}

.team-logo {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 15px;
    border: 2px solid var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 43, 43, 0.3);
    transition: all 0.2s ease;
}

.team-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 43, 43, 0.5);
}

.team-name {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
}

.desempate-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 8px;
    border-left: 4px solid var(--accent-red);
}


.queda-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 12px;
}

.queda-nav-button {
    background: var(--gradient-red);
    border: none;
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.queda-nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.queda-nav-button:hover::before {
    left: 100%;
}

.queda-nav-button:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.queda-nav-button:disabled::before {
    display: none;
}

.queda-nav-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 43, 43, 0.4);
}

.queda-nav-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.queda-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    padding: 12px 24px;
    background: rgba(255, 43, 43, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 43, 43, 0.3);
}


.view-full-table-btn, .view-stats-btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--gradient-red);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.view-full-table-btn::before, .view-stats-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.view-full-table-btn:hover::before, .view-stats-btn:hover::before {
    left: 100%;
}

.view-full-table-btn:hover, .view-stats-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 43, 43, 0.5);
}


.mvp-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mvp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-red);
}

.mvp-section:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 43, 43, 0.5);
    box-shadow: 0 20px 40px rgba(255, 43, 43, 0.1);
}

.mvp-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mvp-left img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 43, 43, 0.4);
    transition: all 0.3s ease;
}

.mvp-left img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 43, 43, 0.6);
}

.mvp-left span {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.mvp-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.mvp-stats {
    color: var(--text-secondary);
    font-size: 16px;
    padding: 8px 16px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--accent-red);
}

.mvp-stats span {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 18px;
}


.players-escalados-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.players-grid {
    display: flex;
    flex-direction: row;  
    flex-wrap: wrap;       
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.player-card {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: auto;
    width: 100%;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--gradient-red);
    transition: left 0.3s ease;
}

.player-card:hover::before {
    left: 0;
}

.player-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 43, 43, 0.3);
    box-shadow: 0 8px 20px rgba(255, 43, 43, 0.15);
}

.player-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.player-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid var(--accent-red);
    object-fit: cover;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.player-info img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 43, 43, 0.4);
}

.player-info span {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-info {
    display: flex;
    align-items: center;
}

.org-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--text-secondary);
    object-fit: cover;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.org-info img:hover {
    border-color: var(--accent-red);
    transform: scale(1.05);
}

.org-info span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.players-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.players-nav-button {
    background: var(--gradient-red);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3);
    transition: all 0.2s ease;
    min-width: 50px;
}

.players-nav-button:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.players-nav-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 43, 43, 0.4);
}


#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-squares {
    display: grid;
    grid-template-columns: repeat(2, 70px);
    grid-template-rows: repeat(2, 70px);
    gap: 25px;
    margin-bottom: 40px;
}

.loading-square {
    width: 70px;
    height: 70px;
    background: var(--gradient-red);
    border-radius: 16px;
    animation: rotateScale 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 43, 43, 0.5);
}

.loading-square:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-square:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-square:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes rotateScale {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 0 20px rgba(255, 43, 43, 0.3);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        box-shadow: 0 0 30px rgba(255, 43, 43, 0.8);
    }
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 6px;
    font-weight: 800;
    animation: pulseText 2s ease-in-out infinite;
    user-select: none;
}

@keyframes pulseText {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 43, 43, 0.5);
        opacity: 0.8;
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 43, 43, 0.8);
        opacity: 1;
    }
}


@media (max-width: 1200px) {
    .ranking-container {
        grid-template-columns: 1.5fr 1fr;
        gap: 25px;
    }
}

@media (max-width: 968px) {
    .ranking-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .general-table-section {
        order: 1;
    }
    
    .players-escalados-section {
        order: 2;
    }
    
    .players-grid {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 !important;
    }

    .header {
        padding: 12px 16px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
    }

    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        max-width: 100%;
    }

    .logo {
        height: 35px;
        width: auto;
    }

    .hamburger {
        display: block;
        background: var(--gradient-red);
        border: none;
        color: white;
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
        transition: all 0.2s ease;
    }

    .hamburger:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(255, 43, 43, 0.3);
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg-card);
        padding: 16px;
        position: absolute;
        top: 100%;
        left: 0;
        border-radius: 0 0 12px 12px;
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link, .nav-greeting {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-primary);
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .nav-link:hover {
        color: var(--accent-red);
    }

    .nav-link:last-child, .nav-greeting:last-child {
        border-bottom: none;
    }

    .admin-container {
        padding: 20px 12px;
        margin-top: 70px;
    }

    .admin-title {
        font-size: 1.8rem;
        margin-top: 20px;
        margin-bottom: 30px;
        padding: 0 8px;
    }

    .admin-section {
        padding: 16px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .admin-section.full-width {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 20px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .general-table-section, .players-escalados-section {
        padding: 16px;
    }

    
    .admin-table-wrapper {
        border-radius: 8px;
        margin: 0 -4px;
    }

    .admin-table {
        font-size: 12px;
        width: 100%;
        min-width: 320px;
    }

    .admin-table th, .admin-table td {
        padding: 10px 6px;
        white-space: nowrap;
    }

    .admin-table th {
        font-size: 11px;
        padding: 12px 6px;
    }

    
    .team-cell {
        padding-left: 8px;
        min-width: 120px;
    }

    .team-logo {
        width: 30px;
        height: 30px;
        margin-right: 8px;
        border-radius: 6px;
    }

    .team-name {
        font-size: 11px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    
    .mvp-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 16px;
    }

    .mvp-left {
        gap: 12px;
        width: 100%;
    }

    .mvp-left img {
        width: 50px;
        height: 50px;
    }

    .mvp-left span {
        font-size: 14px;
        line-height: 1.3;
        flex: 1;
    }

    .mvp-right {
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }

    .mvp-stats {
        font-size: 13px;
        padding: 6px 10px;
        width: 100%;
    }

    
    .players-escalados-section h3 {
        font-size: 1.4rem;
        margin-bottom: 16px;
    }

    .players-grid {
        gap: 10px;
        max-height: 350px;
        padding-right: 4px;
    }

    .player-card {
        padding: 12px;
        border-radius: 10px;
    }

    .player-card:hover {
        transform: translateY(-2px);
    }

    .player-info {
        margin-bottom: 10px;
    }

    .player-info img {
        width: 38px;
        height: 38px;
        margin-right: 10px;
    }

    .player-info span {
        font-size: 14px;
    }

    .org-info img {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }

    .org-info span {
        font-size: 12px;
    }

    
    .queda-nav {
        gap: 8px;
        padding: 12px 8px;
        margin-bottom: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .queda-nav-button {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .queda-nav-button svg {
        width: 16px;
        height: 16px;
    }

    .queda-title {
        font-size: 14px;
        padding: 8px 12px;
        text-align: center;
        min-width: 80px;
    }

    .players-nav {
        gap: 15px;
        margin-top: 20px;
    }

    .players-nav-button {
        padding: 10px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    
    .view-full-table-btn, .view-stats-btn {
        padding: 12px 20px;
        font-size: 13px;
        margin-top: 15px;
        width: 100%;
        text-align: center;
        border-radius: 8px;
    }

    .desempate-info {
        font-size: 12px;
        padding: 10px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 16px 8px;
    }

    .admin-title {
        font-size: 1.5rem;
        margin-top: 15px;
        margin-bottom: 25px;
        padding: 0 4px;
    }

    .admin-section {
        padding: 12px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .admin-section.full-width {
        padding: 16px 8px;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .general-table-section, .players-escalados-section {
        padding: 12px;
    }

    
    .admin-table {
        font-size: 10px;
    }

    .admin-table th, .admin-table td {
        padding: 6px 4px;
    }

    .admin-table th {
        font-size: 9px;
        padding: 8px 4px;
    }

    .team-cell {
        padding-left: 4px;
        min-width: 100px;
    }

    .team-logo {
        width: 24px;
        height: 24px;
        margin-right: 6px;
        border-radius: 4px;
    }

    .team-name {
        font-size: 9px;
        max-width: 60px;
    }

    .mvp-section {
        padding: 12px;
    }

    .mvp-left img {
        width: 40px;
        height: 40px;
    }

    .mvp-left span {
        font-size: 12px;
    }

    .mvp-stats {
        font-size: 11px;
        padding: 4px 8px;
    }

    .mvp-stats span {
        font-size: 13px;
    }

    
    .players-escalados-section h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .players-grid {
        gap: 8px;
        max-height: 280px;
        padding-right: 2px;
    }

    .player-card {
        padding: 10px;
        border-radius: 8px;
    }

    .player-info img {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }

    .player-info span {
        font-size: 12px;
    }

    .org-info img {
        width: 24px;
        height: 24px;
        margin-right: 6px;
    }

    .org-info span {
        font-size: 11px;
    }

    .queda-nav {
        gap: 6px;
        padding: 8px 4px;
        margin-bottom: 12px;
    }

    .queda-nav-button {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .queda-nav-button svg {
        width: 14px;
        height: 14px;
    }

    .queda-title {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 70px;
    }

    .players-nav-button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .view-full-table-btn, .view-stats-btn {
        padding: 10px 16px;
        font-size: 12px;
        margin-top: 12px;
    }

    .desempate-info {
        font-size: 11px;
        padding: 8px;
        margin-bottom: 12px;
    }

    .loading-text {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .loading-squares {
        grid-template-columns: repeat(2, 40px);
        grid-template-rows: repeat(2, 40px);
        gap: 12px;
        margin-bottom: 25px;
    }

    .loading-square {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-red);
    border-radius: 10px;
    border: 1px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-red-light) 0%, var(--accent-red) 100%);
}


::selection {
    background: rgba(255, 43, 43, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(255, 43, 43, 0.3);
    color: var(--text-primary);
}


button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}


.admin-section {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.admin-section:nth-child(1) { animation-delay: 0.1s; }
.admin-section:nth-child(2) { animation-delay: 0.2s; }
.admin-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.player-card,
.admin-table tbody tr,
.queda-nav-button,
.view-full-table-btn,
.view-stats-btn {
    will-change: transform;
}


@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --bg-tertiary: #222222;
        --bg-card: #1a1a1a;
        --accent-red: #ff0000;
        --accent-red-dark: #cc0000;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-color: #444444;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-square {
        animation: none;
    }
    
    .loading-text {
        animation: none;
    }
}