* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-container {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    overflow: hidden;
    display: block;
}

.logo {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    object-fit: cover;
    object-position: center;
    display: block !important;
}

.header-text h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-text h2 {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 30px;
}

.timer-section {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
}

.content-bottom {
    display: contents;
}

/* Timer Section */
.timer-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.timer-display {
    text-align: center;
}

.timer-display h3 {
    font-size: 2.0em;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.blinds {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 500;
}

.timer {
    font-size: 3.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ff6b6b;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.1em;
    font-family: 'Arial Black', Arial, sans-serif;
    text-align: center;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.custom-time-control {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.custom-time-control input {
    padding: 8px 12px;
    border: 2px solid #4ecdc4;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    width: 80px;
}

.custom-time-control input:focus {
    outline: none;
    border-color: #45b7aa;
    background: white;
}

.controls button {
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #4ecdc4;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.controls button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

/* Fichas Section */
.fichas-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 350px;
}

.fichas-display h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.fichas-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.fichas-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fichas-item label {
    font-weight: bold;
    color: #4ecdc4;
    font-size: 0.8em;
}

.fichas-item span {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 0.95em;
    text-align: center;
    min-width: 60px;
    max-width: 80px;
}

.fichas-item input {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    font-size: 0.95em;
    text-align: center;
    min-width: 60px;
    max-width: 80px;
}

.eliminacoes-section {
    border-top: 2px solid #4ecdc4;
    padding-top: 15px;
}

/* Etapa Section */
.etapa-section {
    grid-column: span 1;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.eliminacoes-section h4 {
    color: #ff6b6b;
    margin-bottom: 10px;
    text-align: center;
}

.eliminacao-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.eliminacao-controls select {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

.eliminacao-controls button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.eliminacao-controls button:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

#eliminacoes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eliminacao-item {
    background: rgba(255, 107, 107, 0.2);
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #ff6b6b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eliminacao-item .jogador-info {
    color: #fff;
    font-weight: bold;
}

.eliminacao-item .posicao {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.btn-finalizar-classificacao {
    background: #dc3545;
    color: white;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.btn-finalizar-classificacao:hover {
    background: #c82333;
}

.btn-encerrar-inscricoes {
    background: #28a745;
    color: white;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-encerrar-inscricoes:hover {
    background: #218838;
}

/* Ranking Section */
.ranking-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ranking-section h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid #4ecdc4;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* Cores especiais para as posições */
.player-item.pos-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border-left-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.player-item.pos-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(192, 192, 192, 0.1));
    border-left-color: #c0c0c0;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

.player-item.pos-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(205, 127, 50, 0.1));
    border-left-color: #cd7f32;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.player-item.pos-4 {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(138, 43, 226, 0.1));
    border-left-color: #8a2be2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.player-item.pos-5 {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.3), rgba(255, 20, 147, 0.1));
    border-left-color: #ff1493;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
}

.player-item.mesa-final {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.2), rgba(0, 255, 127, 0.05));
    border-left-color: #00ff7f;
}

/* Container para pontos e badges */
.player-points-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Badges especiais */
.ranking-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-ranking {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    animation: pulse 2s infinite;
}

.badge-microfone {
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    color: white;
}

.badge-mesa-final {
    background: linear-gradient(45deg, #00ff7f, #32cd32);
    color: #333;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.05); }
    100% { transform: translateY(-50%) scale(1); }
}

.player-position {
    font-weight: bold;
    color: #ffd700;
    width: 30px;
}

.player-name {
    flex: 1;
    margin-left: 10px;
}

.player-points {
    font-weight: bold;
    color: #4ecdc4;
}

/* Etapa Section */
.etapa-section, .historico-section {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.etapa-section h3, .historico-section h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.etapa-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.etapa-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.etapa-controls input {
    padding: 8px;
    border: none;
    border-radius: 5px;
    width: 80px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #4ecdc4;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

/* Participantes Section */
.participantes-section, .classificacao-section, .arrecadacao-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.participantes-section h5, .classificacao-section h5, .arrecadacao-section h5 {
    margin-bottom: 15px;
    color: #ffd700;
}

.participante-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.participante-controls input {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
}

.participante-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.participante-item input[type="checkbox"] {
    margin-right: 10px;
}

.remove-btn {
    background: #ff6b6b;
    padding: 5px 10px;
    font-size: 0.8em;
}

.remove-btn:hover {
    background: #ff5252;
}

/* Estilos para classificações do histórico */
.classificacoes-historico {
    margin-top: 10px;
}

.classificacao-item {
    display: inline-block;
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Estilos para pontos na classificação */
.pontos-display {
    margin-left: 10px;
    font-weight: bold;
    color: #4CAF50;
}

/* Estilos para classificação item */
.classificacao-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.participante-nome {
    font-weight: bold;
    color: #fff;
}

.pontos-exibidos {
    margin-left: 10px;
    padding: 4px 8px;
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    border-radius: 4px;
    color: #28a745;
    font-weight: bold;
    font-size: 0.9em;
    min-width: 60px;
    text-align: center;
}

/* Arrecadação Section */
.participantes-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.atrasados-linha {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 8px;
}

.arrecadacao-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.participantes-linha label,
.atrasados-linha label {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.participantes-linha input,
.atrasados-linha input {
    width: 80px;
    padding: 5px;
    border: none;
    border-radius: 3px;
    margin-left: 10px;
}

.totais-financeiros {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.totais-financeiros div {
    margin-bottom: 8px;
}

.premiacao-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.arrecadacao-linha {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px !important;
}

.arrecadacao-linha span {
    font-size: 14px;
    white-space: nowrap;
}

.premiacoes {
    background: rgba(255, 215, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.premiacoes h6 {
    margin-bottom: 15px;
    color: #ffd700;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.premiacoes #premiacoes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.premiacoes #premiacoes-list div {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    border-left: 3px solid #ffd700;
}

/* Classificação */
.classificacao-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.posicao-select {
    padding: 5px;
    border: none;
    border-radius: 3px;
    margin-left: 10px;
}

/* Etapa Actions */
.etapa-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.etapa-actions button {
    flex: 1;
}

/* Histórico melhorado */
.etapa-historico {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

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

.etapa-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
}

.etapa-controls-hist {
    display: flex;
    gap: 10px;
}

.etapa-controls-hist button {
    padding: 5px 10px;
    font-size: 0.8em;
}

.edit-btn {
    background: #ffa726;
}

.edit-btn:hover {
    background: #ff9800;
}

.btn-webhook {
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 0.9em !important;
    transition: background-color 0.3s !important;
}

.btn-webhook:hover {
    background: #1976D2 !important;
}

.delete-btn {
    background: #ff6b6b;
}

.delete-btn:hover {
    background: #ff5252;
}

.etapa-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.etapa-classificacao {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.etapa-classificacao h5 {
    color: #ffd700;
    margin-bottom: 10px;
}

.classificacao-item-hist {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visitante-badge {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .arrecadacao-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .timer {
        font-size: 2em;
    }
    
    .etapa-controls {
        flex-direction: column;
        align-items: stretch;
    }
}