:root {
    --primary: #00A859;
    --secondary: #0066CC;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #666666;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #0080c0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #008f4a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,168,89,0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,102,204,0.3);
}

.btn-logout {
    background: var(--danger);
    color: var(--white);
    padding: 8px 16px;
    font-size: 14px;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

/* Botões pequenos (para ações de rodada) */
.btn-sm {
    padding: 8px 10px !important;
    font-size: 13px;
    border-radius: 20px;
    flex: 1;
    height: 36px;
    line-height: 20px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Jogo Card */
.jogo-card {
    position: relative;
    padding-top: 18px;
}

.rodada-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.times-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.time {
    flex: 1;
    text-align: center;
}

.escudo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
}

.time-nome {
    font-weight: 600;
    font-size: 14px;
}

.vs {
    font-size: 20px;
    font-weight: bold;
    color: var(--gray);
    padding: 0 15px;
}

.palpite-form {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.palpite-input {
    width: 60px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid var(--primary);
    border-radius: 10px;
    outline: none;
}

.palpite-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.data-jogo {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    margin-top: 10px;
}

/* Pontos */
.pontos-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--success);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* Layout compacto para jogos */
.jogo-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.jogo-linha:last-of-type {
    border-bottom: none;
}

.time-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.escudo-pequeno {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.time-nome-compacto {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark);
    flex: 1;
}

.palpite-input-compacto {
    width: 55px;
    height: 45px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid var(--primary);
    border-radius: 8px;
    outline: none;
    flex-shrink: 0;
}

.palpite-input-compacto:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.palpite-input-compacto:disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

/* Ações da rodada */
.rodada-actions {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.rodada-finalizar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ranking */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.ranking-item:last-child {
    border-bottom: none;
}

.posicao {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.posicao.top3 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.ranking-info {
    flex: 1;
}

.ranking-nome {
    font-weight: 600;
    margin-bottom: 3px;
}

.ranking-pontos {
    color: var(--gray);
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-input, .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus, .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,168,89,0.1);
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login */
.login-container {
    max-width: 420px;
    margin: 40px auto;
}

.login-card {
    padding: 30px;
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .escudo {
        width: 50px;
        height: 50px;
    }

    .time-nome {
        font-size: 12px;
    }

    .palpite-input {
        width: 50px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 380px) {
    .time-nome-compacto {
        font-size: 13px;
    }

    .escudo-pequeno {
        width: 35px;
        height: 35px;
    }

    .palpite-input-compacto {
        width: 50px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .rodada-actions {
        flex-wrap: wrap;
    }
    .btn-sm {
        flex: 1 1 48%;
        height: 34px;
    }
}
/* ===== AJUSTE FINO DOS INPUTS DE PALPITE ===== */

/* Remove qualquer aparência nativa estranha */
.palpite-input,
.palpite-input-compacto {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    border-radius: 10px;
    border: 2px solid var(--primary);
    background-color: #ffffff;
    box-shadow: none;          /* tira qualquer sombra/borda interna */
    outline: none;
}

/* Em alguns navegadores, o "focus ring" cria essa sensação de colchete */
.palpite-input:focus,
.palpite-input-compacto:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15); /* halo suave */
}

/* Remove setas (caso ainda apareçam) */
.palpite-input::-webkit-inner-spin-button,
.palpite-input::-webkit-outer-spin-button,
.palpite-input-compacto::-webkit-inner-spin-button,
.palpite-input-compacto::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.palpite-input[type="number"],
.palpite-input-compacto[type="number"] {
    -moz-appearance: textfield;
}

/* Stepper de Rodadas */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.stepper-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    color: var(--primary);
    border-radius: 50%;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s;
}

.stepper-btn:hover:not(.disabled) {
    background: var(--primary);
    color: var(--white);
}

.stepper-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.stepper-info {
    text-align: center;
}

.stepper-title {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark);
}

/* ================= CHAT ================= */
.chat-card {
    height: 70vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    background: var(--light);
    border-bottom: 1px solid #eee;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.message-me {
    align-self: flex-end;
    align-items: flex-end;
}

.message-other {
    align-self: flex-start;
    align-items: flex-start;
}

.message-info {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 2px;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.message-me .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-other .message-bubble {
    background: white;
    border: 1px solid #ddd;
    border-bottom-left-radius: 2px;
}

.message-img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 5px;
    display: block;
}

.chat-input-area {
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-attach {
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

.btn-send {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

/* ================= CHAT ================= */
.chat-card {
    height: 70vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    background: var(--light);
    border-bottom: 1px solid #eee;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

.message-me {
    align-self: flex-end;
    align-items: flex-end;
}

.message-other {
    align-self: flex-start;
    align-items: flex-start;
}

.message-info {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 2px;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.message-me .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-other .message-bubble {
    background: white;
    border: 1px solid #ddd;
    border-bottom-left-radius: 2px;
}

.message-img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 5px;
    display: block;
}

.chat-input-area {
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-attach {
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

.btn-send {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

/* Destaque para rodada fechada */
.card-fechada {
    background-color: #fff3cd !important;
    border: 1px solid #ffeeba;
}
