:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #cbd5e1;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 450px;
    padding: 30px;
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.header { text-align: center; margin-bottom: 25px; }
.header h1 { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.header p { font-size: 15px; color: var(--text-muted); }

.alert-success { padding: 15px; background: rgba(16, 185, 129, 0.2); border-left: 4px solid var(--primary); margin-bottom: 20px; border-radius: 4px; color: #a7f3d0; font-weight: 600; text-align: center; }

.inline-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.inline-team { display: flex; align-items: center; gap: 10px; width: 40%; }
.inline-team.right { justify-content: flex-end; flex-direction: row-reverse; }
.inline-team img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); }
.inline-team span { font-weight: 600; font-size: 14px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px;}

.score-box { display: flex; align-items: center; gap: 5px; }
.score-box input {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: var(--bg);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: var(--primary);
}
.score-box input:focus { border-color: var(--primary); outline: none; }
.score-box span { font-weight: bold; color: var(--text-muted); }

/* Ocultar setas do input type number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.form-group { margin-bottom: 20px; }
.form-control {
    width: 100%;
    padding: 14px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text);
    font-size: 16px;
}
.form-control:focus { outline: none; border-color: var(--primary); }

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}
.btn:hover { opacity: 0.9; }

.summary { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.summary strong { color: var(--primary); font-size: 16px; }

.ranking-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 14px; }
.ranking-table th, .ranking-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ranking-table th { color: var(--primary); text-transform: uppercase; font-size: 12px; }
.ranking-table .palpite { font-weight: bold; font-size: 16px; color: var(--text); text-align: center; }
.pos-1 { color: #fbbf24 !important; font-weight: bold; } /* Ouro */

/* Estilos do QR Code e Modal */
.qr-thumbnail {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
    display: block;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    background: white;
    padding: 5px;
}
.qr-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.qr-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.qr-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.qr-modal img {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    border: 4px solid var(--primary);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
    background: white;
    padding: 15px;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 500px) {
    .inline-team span {
        display: none;
    }
    .inline-team, .inline-team.right {
        justify-content: center;
    }
}

.blur-guess {
    filter: blur(6px);
    transition: filter 0.3s ease;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    padding: 2px 5px;
}
.blur-guess:hover, .blur-guess:active {
    filter: blur(0);
}
