body {
            font-family: 'Inter', sans-serif;
            background-color: #f0f4f8;
            color: #1e293b;
            padding-top: 70px; /* Adicionado para não sobrepor o conteúdo com o header fixo */
        }
        .bracket {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px;
            min-width: 2800px; 
            overflow-x: auto;
            position: relative;
        }
        .round {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            min-width: 300px;
            padding: 0 10px;
            position: relative;
        }
        
        /* Layout triangular - ajustar espaçamento vertical baseado na rodada */
        .west.round-1 { align-items: flex-start; }
        .west.round-2 { align-items: flex-start; padding-top: 60px; }
        .west.round-3 { align-items: flex-start; padding-top: 140px; }
        .west.round-4 { align-items: flex-start; padding-top: 220px; }
        
        .east.round-1 { align-items: flex-end; }
        .east.round-2 { align-items: flex-end; padding-top: 60px; }
        .east.round-3 { align-items: flex-end; padding-top: 140px; }
        .east.round-4 { align-items: flex-end; padding-top: 220px; }
        
        .final { 
            align-items: center; 
            padding-top: 300px;
            justify-content: center;
        }
        .round-title {
            font-size: 1rem;
            font-weight: 700;
            text-align: center;
            margin-bottom: 20px;
            color: #475569;
            white-space: nowrap;
            min-height: 24px;
            width: 300px;
        }
        .match {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            margin: 10px 0;
            padding: 10px 0;
            transition: all 0.2s;
        }
        
        /* Espaçamento progressivo para formar triângulos */
        .round-1 .match { margin: 5px 0; }
        .round-2 .match { margin: 15px 0; }
        .round-3 .match { margin: 35px 0; }
        .round-4 .match { margin: 75px 0; }
        .final .match { margin: 0; }
        .match-wrapper {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            min-width: 280px;
            width: 280px;
                    position: relative; /* allow absolute-positioned children like weather badge */
        }
        .match-body {
             padding: 5px 10px;
        }
        .team {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
        }
        .team:first-child {
            border-bottom: 1px solid #f1f5f9;
        }
        
        /* Estilos para avatares das equipes */
        .team-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 8px;
            flex-shrink: 0;
            border: 2px solid #e5e7eb;
            transition: border-color 0.2s ease;
        }
        
        .team-avatar:hover {
            border-color: #3b82f6;
        }
        
        .winner .team-avatar {
            border-color: #16a34a;
        }
        
        .loser .team-avatar {
            opacity: 0.7;
        }
        
        .team-name {
            flex-grow: 1;
            font-size: 0.875rem;
            color: #334155;
            min-height: 20px; 
            border: none;
            background-color: transparent;
            width: 100%;
        }
        .team-name:focus {
            outline: none;
            background-color: #f1f5f9;
            border-radius: 2px;
        }
        .team-score {
            width: 40px;
            text-align: center;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            padding: 4px;
            font-size: 0.875rem;
            margin-left: 10px;
            appearance: textfield;
            -moz-appearance: textfield;
        }
        .team-score::-webkit-outer-spin-button,
        .team-score::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .winner .team-name {
            font-weight: 700;
            color: #059669;
        }
        .loser .team-name {
            color: #94a3b8;
        }
        .match-info {
            font-size: 0.75rem;
            color: #64748b;
            padding: 6px 10px;
        }
        .match-info-top {
            text-align: center;
            border-bottom: 1px solid #e2e8f0;
            font-weight: 500;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .match-info-icons {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .live-video-icon-container {
            display: flex;
            align-items: center;
        }
        .match-info-bottom {
            text-align: center;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 4px;
        }
        .info-input {
            border: none;
            background-color: transparent;
            text-align: center;
            font-size: 0.75rem;
            color: #64748b;
            width: 100%;
        }
        .info-input:focus {
            outline: none;
            background-color: #f1f5f9;
            border-radius: 2px;
        }
        .info-input.court { width: 35px; }
        .info-input.date { width: 50px; }
        .info-input.time { width: 45px; }

        /* Weather badge styles */
        .weather-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #334155;
            background: rgba(255,255,255,0.9);
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            padding: 2px 6px;
            line-height: 1;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }
        .weather-badge:hover {
            background: rgba(255,255,255,1);
            border-color: #cbd5e1;
        }
        .weather-top-right {
            position: absolute;
            top: 6px;
            right: 8px;
            z-index: 2;
            font-size: 12px;
            opacity: 0.95;
        }
        
        /* Weather tooltip styles */
        .weather-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 8px;
            background: #1f2937;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 11px;
            white-space: nowrap;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease, visibility 0.2s ease;
            pointer-events: none;
        }
        .weather-tooltip.show {
            opacity: 1;
            visibility: visible;
        }
        .weather-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 4px solid transparent;
            border-top-color: #1f2937;
        }

        .final-winner { text-align: center; padding: 20px; }
        .final-winner .team-name { font-size: 1.5rem; font-weight: bold; color: #ca8a04; }
        .final-winner .trophy { font-size: 3rem; margin-bottom: 10px; }
        
        /* Classes para ajuste vertical individual dos jogos */
        .match.adjust-up-small { transform: translateY(-10px); }
        .match.adjust-up-medium { transform: translateY(-20px); }
        .match.adjust-up-large { transform: translateY(-30px); }
        .match.adjust-down-small { transform: translateY(10px); }
        .match.adjust-down-medium { transform: translateY(20px); }
        .match.adjust-down-large { transform: translateY(30px); }
        
        #loading-indicator {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            display: flex; justify-content: center; align-items: center;
            font-size: 1.2rem; color: #334155; z-index: 100;
        }
        
        /* Estilos para a tela de login */
        #login-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 200;
            background-image: url('imgs/fct-bg-big.jpg');
            background-size: cover;
            background-position: center;
        }

        #login-screen::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.6); /* Overlay para ofuscar */
            backdrop-filter: blur(3px); /* Efeito de desfoque */
        }
        
        .login-container {
            background: white;
            padding: 3rem;
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            text-align: center;
            max-width: 450px;
            width: 90%;
            position: relative; /* Garante que o container fique sobre o overlay */
            z-index: 1;
        }

        .login-title-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }

        .login-logo {
            width: 50px;
            height: auto;
        }
        
        .login-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 0;
        }
        
        .login-subtitle {
            color: #64748b;
            margin-bottom: 2rem;
        }
        
        .google-login-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            width: 100%;
            padding: 0.75rem 1.5rem;
            background: #4285f4;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .google-login-btn:hover {
            background: #3367d6;
        }
        
        .google-login-btn:disabled {
            background: #94a3b8;
            cursor: not-allowed;
        }
        
        /* Estilo para o header quando logado */
        .user-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 2rem;
            background: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            position: fixed; /* Fixa o header */
            top: 0;
            left: 0;
            right: 0;
            z-index: 100; /* Garante que fique acima de outros elementos */
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .user-profile {
            position: relative;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .user-profile .user-info {
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: background-color 0.2s;
        }

        .user-profile .user-info:hover {
            background-color: #f8fafc;
        }

        .dropdown-arrow {
            color: #64748b;
            transition: transform 0.2s;
        }

        .user-profile.open .dropdown-arrow {
            transform: rotate(180deg);
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            min-width: 160px;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.2s ease-in-out;
        }

        .dropdown-menu.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: block;
            padding: 0.75rem 1rem;
            color: #374151;
            text-decoration: none;
            font-size: 0.875rem;
            transition: background-color 0.2s;
            width: 100%;
            box-sizing: border-box;
            position: relative;
        }

        .dropdown-item:hover {
            background-color: #f3f4f6;
            color: #111827;
        }

        /* Estilos especiais para o item Admin (Opção 4: texto com gradiente e sublinhado suave) */
        .dropdown-menu { display: flex; flex-direction: column; }
        .dropdown-item.admin-item {
            position: relative;
            order: -1;
            cursor: pointer;
            user-select: none;
            z-index: 1002;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            padding: 0.6rem 1rem 0.5rem 1rem;
            margin: 4px 4px 6px 4px;
            background: transparent;
        }
        .dropdown-item.admin-item .admin-label {
            background: linear-gradient(90deg,#f59e0b,#d97706);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            position: relative;
            padding-bottom: 2px;
        }
        .dropdown-item.admin-item::after {
            content: '';
            position: absolute;
            left: 1rem;
            right: 1rem;
            bottom: 2px;
            height: 2px;
            background: linear-gradient(90deg,rgba(245,158,11,0) 0%,rgba(245,158,11,0.6) 50%,rgba(245,158,11,0) 100%);
            transform: scaleX(0);
            transform-origin: center;
            transition: transform .25s ease;
        }
        .dropdown-item.admin-item:hover::after,
        .dropdown-item.admin-item:focus::after {
            transform: scaleX(1);
        }
        .dropdown-item.admin-item:hover, .dropdown-item.admin-item:focus {
            background: #f8fafc;
            outline: none;
        }
        .dropdown-item.admin-item:active .admin-label {
            filter: brightness(.92);
        }

        /* Submenu do Admin */
        .admin-submenu {
            position: absolute;
            right: 100%; /* abre para a esquerda */
            left: auto;
            top: 0;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            min-width: 180px;
            z-index: 1001;
            display: none;
            margin-right: 4px; /* pequeno espaçamento entre item e submenu */
        }

        .admin-submenu .dropdown-item {
            background-color: white;
            color: #374151;
            font-weight: normal;
            order: initial;
            cursor: pointer;
        }
        .admin-submenu .dropdown-item:hover, .admin-submenu .dropdown-item:focus {
            background-color: #f3f4f6;
            color: #111827;
            outline: none;
        }

        .admin-submenu .dropdown-item:hover {
            background-color: #f3f4f6;
            color: #111827;
        }

        .dropdown-separator {
            height: 1px;
            background-color: #e5e7eb;
            margin: 0.25rem 0;
        }

        .header-logo {
            height: 40px;
            width: auto;
        }

        .header-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1e293b;
        }
                /* View mode switch in header */
                .view-mode-header-switch { display: flex; align-items: center; gap: 8px; margin-left: 16px; }
                .view-mode-header-switch .header-view-toggle { 
                        width: 40px; height: 40px; border-radius: 50%; border: 2px solid #e2e8f0; background: #f8fafc; 
                        display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; 
                        transition: background .2s, border-color .2s, transform .15s; position: relative; color:#475569; 
                }
                .view-mode-header-switch .header-view-toggle:hover { background:#f1f5f9; border-color:#cbd5e1; }
                .view-mode-header-switch .header-view-toggle.active { background: linear-gradient(135deg,#2563eb,#3b82f6); color:#fff; border-color:#1d4ed8; box-shadow:0 2px 4px rgba(0,0,0,0.15); }
                .view-mode-header-switch .header-view-toggle:active { transform: scale(.92); }
                @media (max-width: 640px) {
                    .view-mode-header-switch { gap:4px; margin-left:8px; }
                    .view-mode-header-switch .header-view-toggle { width:36px; height:36px; font-size:18px; }
                }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid #e2e8f0;
        }

        /* Media Query para telas pequenas (celulares) */
        @media (max-width: 640px) {
            .user-last-name, #user-email {
                display: none;
            }
            .header-title {
                display: none;
            }
            .user-header {
                padding: 0.5rem 1rem;
            }
        }

        /* Barra de Notificação */
        #notification-bar {
            position: fixed;
            top: -100px; /* Começa fora da tela */
            left: 50%;
            transform: translateX(-50%);
            background-color: #3b82f6; /* blue-500 */
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            z-index: 9999;
            font-weight: 500;
            transition: top 0.5s ease-in-out;
            display: none;
        }
        #notification-bar.show {
            display: block;
            top: 20px;
        }
        #notification-bar.error {
            background-color: #ef4444; /* red-500 */
        }

        /* Botão Limpar Jogo */
        .clear-match-btn {
            position: absolute;
            top: 4px;
            left: 4px;
            background-color: #ef4444; /* red-500 */
            color: white;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            font-size: 0.8rem;
            line-height: 20px;
            text-align: center;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.2s;
            z-index: 10;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .clear-match-btn:hover {
            background-color: #dc2626; /* red-600 */
        }

        /* Estilos para Status do Jogo */
        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            margin-left: 8px;
        }
        .status-aguardando { background-color: #f1f5f9; color: #64748b; } /* slate-200, slate-500 */
        .status-previsto { background-color: #f5ecc1; color: #b98d0b; } /* indigo-100, indigo-600 */
        .status-live { background-color: #d1fae5; color: #059669; animation: blink 1.5s infinite; } /* green-200, green-700 */
        .status-concluido { background-color: #d1fae5; color: #059669; } /* green-200, green-700 */
        .status-wo { background-color: #ead0eb; color: #b00eb8; } /* red-200, red-800 */
        .status-proximo-jogo { background-color: #fed7aa; color: #9a3412; animation: blink 1.5s infinite; } /* orange-200, orange-800 */
    .status-retirado { background-color: #0f172a; color: #ffffff; } /* slate-900 background, white text */
    .status-adiado { background-color: #dc2626; color: #ffffff; } /* red-600 background, white text */

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .status-selector {
            margin-left: 4px;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            font-size: 0.7rem;
            padding: 1px;
            background-color: #f8fafc; /* slate-50 */
        }

        /* Scroll Controller */
        .scroll-controller {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 120px;
            height: 120px;
            z-index: 1000;
            cursor: grab;
            transition: top 0.3s ease-in-out, left 0.3s ease-in-out, right 0.3s ease-in-out, bottom 0.3s ease-in-out;
        }
        .scroll-controller .view-mode-switch {
            position: absolute;
            top: -52px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(4px);
            padding: 4px 6px;
            border-radius: 30px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            display: flex;
            gap: 4px;
            align-items: center;
            z-index: 1002;
            border: 1px solid #e2e8f0;
        }
        .view-mode-switch .view-toggle {
            border: none;
            background: transparent;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.05rem;
            cursor: pointer;
            transition: background-color .2s, color .2s;
            color: #475569; /* slate-600 */
        }
        .view-mode-switch .view-toggle:hover { background: #f1f5f9; }
        .view-mode-switch .view-toggle.active {
            background: linear-gradient(135deg,#2563eb,#3b82f6);
            color: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,.18);
        }
        .tournament-schedule { margin-top: 2rem; }
    /* --- Programação dos Jogos (Schedule) --- */
    .schedule-wrapper { max-width: 100%; }
    .schedule-table { width: 100%; background: white; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
    .schedule-table thead th { position: sticky; top: 0; background: #f8fafc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .5px; color: #475569; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
    .schedule-table tbody th.time-cell { background: #f8fafc; font-weight: 600; font-size: 0.75rem; color: #334155; padding: 6px 8px; text-align: center; border-right: 1px solid #e2e8f0; width: 80px; }
    .schedule-table tbody th.time-cell .time { font-weight: 500; font-size: 0.7rem; color: #64748b; }
    .schedule-table td.court-cell { min-width: 180px; vertical-align: top; padding: 6px 6px 10px; border-left: 1px solid #f1f5f9; border-top: 1px solid #f1f5f9; }
    .schedule-table tr:first-child td.court-cell { border-top: none; }
    .schedule-table td.court-cell:hover { background: #f8fafc; }
    .schedule-match { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 8px; font-size: 0.7rem; line-height: 1.05rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 4px; }
    .schedule-match-names { font-weight: 600; color: #1e293b; }
    .schedule-match-score { 
        font-weight: 700; 
        color: #059669; 
        font-size: 0.8rem; 
        text-align: center; 
        background: #f0fdf4; 
        border-radius: 4px; 
        padding: 2px 6px; 
        border: 1px solid #bbf7d0;
    }
    .schedule-final-result {
        margin-top: 8px;
        padding: 10px;
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border-radius: 8px;
        border: 2px solid #f59e0b;
        box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2);
        position: relative;
    }
    .schedule-final-result::before {
        content: '';
        position: absolute;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        background: linear-gradient(45deg, #f59e0b, #eab308, #f59e0b);
        border-radius: 8px;
        z-index: -1;
        animation: golden-glow 3s ease-in-out infinite;
    }
    @keyframes golden-glow {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }
    .champion-section, .runner-up-section {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 2px 0;
    }
    .champion-section {
        margin-bottom: 4px;
    }
    .trophy-icon, .medal-icon {
        font-size: 16px;
        line-height: 1;
    }
    .champion-info, .runner-up-info {
        flex: 1;
    }
    .champion-title, .runner-up-title {
        font-size: 0.6rem;
        font-weight: 500;
        color: #92400e;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .champion-name, .runner-up-name {
        font-size: 0.7rem;
        font-weight: 700;
        color: #78350f;
    }
    .champion-name {
        color: #b45309;
    }
    .schedule-match.empty { opacity: .4; }
    .schedule-match-icons { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
    .live-video-icon-container-schedule { display: flex; align-items: center; }
    .court-col { font-size: 0.7rem; font-weight: 600; color: #334155; padding: 8px; white-space: nowrap; }
    /* Ajustar badge dentro da célula */
    .schedule-match .status-badge { margin-left: 0; }
    @media (max-width: 900px) { .schedule-table td.court-cell { min-width: 140px; } }
        .scroll-btn {
            position: absolute;
            width: 40px;
            height: 40px;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.2s;
        }
        .scroll-btn:hover {
            background-color: rgba(0, 0, 0, 0.7);
        }
        .scroll-btn.pos-top { top: 0; left: 40px; }
        .scroll-btn.pos-right { top: 40px; left: 80px; }
        .scroll-btn.pos-bottom { top: 80px; left: 40px; }
        .scroll-btn.pos-left { top: 40px; left: 0; }
        .scroll-btn.pos-center { top: 40px; left: 40px; }

        #scroll-info-balloon {
            position: absolute;
            bottom: auto;
            top: 50%;
            transform: translateY(-50%);
            width: 220px;
            background-color: #1e293b; /* slate-800 */
            color: white;
            padding: 12px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            font-size: 0.8rem;
            text-align: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
            z-index: 1100; /* above header view toggles */
        }

        /* Positioning modifiers: place balloon to the left or right of the controller */
        #scroll-info-balloon.right-of { left: 120%; right: auto; }
        #scroll-info-balloon.left-of { right: 120%; left: auto; }

        #scroll-info-balloon.show {
            opacity: 1;
            visibility: visible;
        }

        #scroll-info-balloon p {
            margin: 0 0 8px 0;
        }

        #scroll-info-balloon button {
            background-color: #3b82f6; /* blue-500 */
            color: white;
            border: none;
            border-radius: 4px;
            padding: 4px 10px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        #scroll-info-balloon button:hover {
            background-color: #2563eb; /* blue-600 */
        }

        .scroll-controller.hidden {
            transform: scale(0);
            opacity: 0;
            pointer-events: none;
        }

        #ghost-button {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background-color: rgba(0, 0, 0, 0.2);
            border-radius: 50%;
            cursor: pointer;
            z-index: 999;
            display: none; /* Começa escondido */
            transition: background-color 0.2s, opacity 0.3s;
            opacity: 0;
        }

        #ghost-button.visible {
            display: block;
            opacity: 1;
        }

        #ghost-button:hover {
            background-color: rgba(0, 0, 0, 0.4);
        }

        /* --- Estilos da Página de Perfil (Modal Overlay) --- */
        #player-profile-page .bg-white {
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            max-height: 90vh;
            overflow-y: auto;
        }

        #profile-image-preview {
            transition: transform 0.2s ease-in-out;
        }

        #profile-image-preview:hover {
            transform: scale(1.05);
        }

        .profile-upload-overlay {
            position: absolute;
            bottom: 0;
            right: 0;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            border: 3px solid white;
            transition: all 0.2s ease-in-out;
        }

        .profile-upload-overlay:hover {
            background: linear-gradient(135deg, #1d4ed8, #1e40af);
            transform: scale(1.1);
        }

        /* Melhorias nos campos de formulário */
        #player-profile-form input:focus,
        #player-profile-form select:focus {
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        #player-profile-form select {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 0.5rem center;
            background-repeat: no-repeat;
            background-size: 1.5em 1.5em;
            padding-right: 2.5rem;
        }

        /* Animações suaves para transições de página */
        #player-profile-page,
        #main-content {
            transition: opacity 0.3s ease-in-out;
        }

        /* Responsividade para dispositivos móveis */
        @media (max-width: 640px) {
            #player-profile-page .bg-white {
                margin: 10px;
                max-height: 95vh;
            }
            
            #player-profile-page .max-w-2xl {
                max-width: 100%;
            }
            
            #profile-image-preview {
                width: 100px;
                height: 100px;
            }
            
            .flex.space-x-4 {
                flex-direction: column;
                gap: 0.5rem;
            }
        }

        /* --- Estilos para Avatares de Iniciais --- */
        .initials-avatar {
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            border: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
        }

        .initials-avatar:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* Tamanhos específicos para diferentes contextos */
        .initials-avatar.profile-large {
            width: 128px !important;
            height: 128px !important;
            font-size: 48px !important;
            border-width: 4px;
        }

        .initials-avatar.header-small {
            width: 40px !important;
            height: 40px !important;
            font-size: 16px !important;
            border-width: 2px;
        }

        .initials-avatar.match-medium {
            width: 24px !important;
            height: 24px !important;
            font-size: 10px !important;
            border-width: 1px;
            margin-right: 6px;
        }

        /* Animação suave para quando o avatar é criado */
        .initials-avatar {
            animation: avatarFadeIn 0.3s ease-in-out;
        }

        @keyframes avatarFadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Estilos para o modal de recorte de imagem */
        #image-crop-modal {
            backdrop-filter: blur(4px);
        }

        .crop-container {
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
            background: #f9fafb;
        }

        .crop-container img {
            display: block;
            max-width: 100%;
        }

        /* Customização do Cropper.js */
        .cropper-container {
            direction: ltr;
            font-size: 0;
            line-height: 0;
            position: relative;
            -ms-touch-action: none;
            touch-action: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .cropper-crop-box {
            border-radius: 50% !important;
        }

        .cropper-view-box {
            border-radius: 50% !important;
        }

        /* ==============================================
           LIVE VIDEO STYLES
           ============================================== */

        /* Live Video Icon */
        .live-video-icon {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            cursor: pointer;
            color: #64748b;
            transition: all 0.2s ease;
            border-radius: 4px;
            padding: 4px;
            margin: 0 2px;
        }

        .live-video-icon:hover {
            color: #dc2626;
            background-color: rgba(220, 38, 38, 0.1);
            transform: scale(1.1);
        }

        .live-video-icon.admin-mode {
            color: #2563eb;
        }

        .live-video-icon.admin-mode:hover {
            color: #1d4ed8;
            background-color: rgba(37, 99, 235, 0.1);
        }

        /* Live video emoji styling */
        .live-video-emoji {
            font-size: 16px;
            line-height: 1;
            display: inline-block;
        }

        /* Live indicator dot */
        .live-video-icon .live-indicator {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 8px;
            height: 8px;
            background-color: #dc2626;
            border-radius: 50%;
            color: #dc2626;
            font-size: 8px;
            line-height: 8px;
            animation: live-pulse 2s infinite;
        }

        @keyframes live-pulse {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.2); }
            100% { opacity: 1; transform: scale(1); }
        }

        /* Live Video Modal */
        .live-video-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .live-video-modal-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(4px);
        }

        .live-video-modal-content {
            position: relative;
            background: white;
            border-radius: 12px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            max-width: 95vw;
            max-height: 95vh;
            width: 1200px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .live-video-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid #e2e8f0;
            background-color: #f8fafc;
        }

        .live-video-modal-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
        }

        .live-video-close-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border: none;
            background: none;
            color: #64748b;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .live-video-close-btn:hover {
            background-color: rgba(220, 38, 38, 0.1);
            color: #dc2626;
        }

        .live-video-iframe-container {
            position: relative;
            width: 100%;
            height: 600px;
            min-height: 400px;
            background-color: #000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .live-video-iframe-container iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        .live-video-loading {
            position: absolute;
            color: white;
            font-size: 16px;
            z-index: 1;
        }

        /* Admin Modal Specific Styles */
        .live-video-modal.admin-modal .live-video-modal-content {
            width: 500px;
            height: auto;
        }

        .live-video-admin-form {
            padding: 20px;
        }

        .live-video-admin-form label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #374151;
        }

        .live-video-url-input {
            width: 100%;
            padding: 12px;
            border: 2px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s ease;
            margin-bottom: 16px;
        }

        .live-video-url-input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .live-video-admin-actions {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
        }

        .live-video-admin-actions button {
            padding: 10px 16px;
            border: none;
            border-radius: 6px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
        }

        .live-video-save-btn {
            background-color: #2563eb;
            color: white;
        }

        .live-video-save-btn:hover {
            background-color: #1d4ed8;
        }

        .live-video-test-btn {
            background-color: #059669;
            color: white;
        }

        .live-video-test-btn:hover {
            background-color: #047857;
        }

        .live-video-remove-btn {
            background-color: #dc2626;
            color: white;
        }

        .live-video-remove-btn:hover {
            background-color: #b91c1c;
        }

        .live-video-help {
            background-color: #f1f5f9;
            padding: 12px;
            border-radius: 6px;
            border-left: 4px solid #2563eb;
        }

        .live-video-help p {
            margin: 0 0 8px 0;
            font-size: 13px;
            color: #475569;
        }

        .live-video-help p:last-child {
            margin-bottom: 0;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .live-video-modal-content {
                width: 95vw;
                height: 95vh;
                margin: 2.5vh auto;
            }

            .live-video-iframe-container {
                height: calc(95vh - 120px);
            }

            .live-video-modal.admin-modal .live-video-modal-content {
                width: 95vw;
                height: auto;
            }

            .live-video-admin-actions {
                flex-direction: column;
            }

            .live-video-admin-actions button {
                width: 100%;
            }
        }

        /* ==============================================
           TOURNAMENT SELECTOR STYLES
           ============================================== */

        .tournament-selector {
            position: relative;
            margin-left: 16px;
            margin-right: 16px;
        }

        .tournament-selector-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 200px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .tournament-selector-btn:hover {
            border-color: #2563eb;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .tournament-selector-btn.open {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .tournament-selector-content {
            flex: 1;
            text-align: left;
        }

        .tournament-name {
            font-size: 14px;
            font-weight: 600;
            color: #1e293b;
            line-height: 1.2;
        }

        .stage-name {
            font-size: 12px;
            color: #64748b;
            line-height: 1.2;
            margin-top: 2px;
        }

        .tournament-selector-arrow {
            color: #64748b;
            transition: transform 0.2s ease;
        }

        .tournament-selector-btn.open .tournament-selector-arrow {
            transform: rotate(180deg);
        }

        .tournament-selector-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            max-height: 400px;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
            margin-top: 4px;
        }

        .tournament-selector-dropdown.open {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .tournament-selector-search {
            padding: 12px;
            border-bottom: 1px solid #e5e7eb;
        }

        .tournament-search-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .tournament-search-input:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .tournament-list {
            max-height: 320px;
            overflow-y: auto;
        }

        .tournament-item {
            border-bottom: 1px solid #f1f5f9;
        }

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

        .tournament-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .tournament-header:hover {
            background-color: #f8fafc;
        }

        .tournament-item.active .tournament-header {
            background-color: #eff6ff;
        }

        .tournament-status {
            font-size: 16px;
            line-height: 1;
        }

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

        .tournament-title {
            font-size: 14px;
            font-weight: 600;
            color: #1e293b;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .tournament-meta {
            font-size: 12px;
            color: #64748b;
            line-height: 1.2;
            margin-top: 2px;
        }

        .tournament-expand-arrow {
            color: #64748b;
            transition: transform 0.2s ease;
        }

        .tournament-expand-arrow.expanded {
            transform: rotate(180deg);
        }

        .stages-list {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background-color: #f8fafc;
        }

        .stages-list.expanded {
            max-height: 200px;
        }

        .stage-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px 8px 32px;
            cursor: pointer;
            transition: all 0.2s ease;
            border-left: 3px solid transparent;
        }

        .stage-item:hover {
            background-color: #f1f5f9;
        }

        .stage-item.active {
            background-color: #dbeafe;
            border-left-color: #2563eb;
        }

        .stage-status {
            font-size: 14px;
            line-height: 1;
        }

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

        .stage-name {
            font-size: 13px;
            font-weight: 500;
            color: #1e293b;
            line-height: 1.2;
        }

        .stage-details {
            font-size: 11px;
            color: #64748b;
            line-height: 1.2;
            margin-top: 1px;
        }

        .no-tournaments {
            padding: 24px;
            text-align: center;
            color: #64748b;
        }

        .no-tournaments p {
            margin: 0 0 12px 0;
            font-size: 14px;
        }

        .btn-create-tournament {
            padding: 8px 16px;
            background-color: #2563eb;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .btn-create-tournament:hover {
            background-color: #1d4ed8;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .tournament-selector {
                margin-left: 8px;
                margin-right: 8px;
            }

            .tournament-selector-btn {
                min-width: 150px;
                padding: 6px 10px;
            }

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

            .stage-name {
                font-size: 11px;
            }

            .tournament-selector-dropdown {
                left: -8px;
                right: -8px;
            }
        }

        /* Tournament Administration Styles */
        .admin-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .table-container {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .action-button {
            transition: all 0.2s ease;
        }

        .action-button:hover {
            transform: translateY(-1px);
        }

        .modal-backdrop {
            backdrop-filter: blur(4px);
        }

        .admin-table-row:hover {
            background-color: #f8fafc;
        }

        .admin-status-badge {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px;
            font-weight: 600;
        }

        .admin-input {
            transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        }

        .admin-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .admin-button {
            transition: all 0.2s ease-in-out;
        }

        .admin-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
        }

        .admin-button:active {
            transform: translateY(0);
        }

        .admin-modal {
            animation: fadeIn 0.2s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .admin-form-group {
            margin-bottom: 1.5rem;
        }

        .admin-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.5rem;
        }

        .admin-error {
            color: #dc2626;
            font-size: 0.875rem;
            margin-top: 0.25rem;
        }

        .admin-success {
            color: #059669;
            font-size: 0.875rem;
            margin-top: 0.25rem;
        }

        .loading-spinner {
            border: 2px solid #f3f4f6;
            border-top: 2px solid #3b82f6;
            border-radius: 50%;
            width: 1rem;
            height: 1rem;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .stage-item {
            transition: all 0.2s ease;
        }

        .stage-item:hover {
            background-color: #f1f5f9;
            transform: translateX(4px);
        }

        .stage-order-badge {
            min-width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.875rem;
        }

        /* Responsive adjustments for admin interface */
        @media (max-width: 768px) {
            .admin-header {
                padding: 1rem;
            }

            .admin-header h1 {
                font-size: 1.5rem;
            }

            .table-container {
                overflow-x: auto;
            }

            .admin-modal .bg-white {
                margin: 1rem;
                max-height: calc(100vh - 2rem);
            }

            .admin-button {
                padding: 0.5rem 1rem;
                font-size: 0.875rem;
            }
        }
