:root {
    --verde: #006400;
    --verde-claro: #00a550;
    --vermelho: #cc0000;
    --amarelo: #FFD700;
    --dark: #1a1a1a;
    --card-bg: #2a2a2a;
}

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

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.navbar {
    background: linear-gradient(90deg, var(--verde) 0%, #004d00 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--amarelo);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s;
}

.navbar .nav-links a:hover, .navbar .nav-links a.active {
    background: var(--amarelo);
    color: var(--dark);
}

.navbar .nav-links a.btn-logout {
    background: var(--vermelho);
    color: #fff;
}

/* Banner Slider */
.banner-section {
    width: 100%;
    overflow: hidden;
    position: relative;
    max-height: 250px;
}

.banner-section img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.banner-placeholder {
    background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 50%, var(--amarelo) 100%);
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    text-align: center;
    padding: 20px;
}

.banner-placeholder span {
    font-size: 1rem;
    margin-top: 8px;
    color: rgba(255,255,255,0.9);
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--amarelo);
    margin-bottom: 12px;
    font-weight: 700;
}

/* Jogo Card */
.jogo-card {
    background: linear-gradient(135deg, #1e3a1e 0%, #2a1a1a 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid rgba(0,100,0,0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.jogo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #aaa;
    margin-bottom: 14px;
}

.campeonato-badge {
    background: var(--verde);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.times-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.time-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.time-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #444, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.time-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
}

.vs-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.vs-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--amarelo);
}

.placar-resultado {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--verde-claro);
    letter-spacing: 2px;
}

/* Palpite Input */
.palpite-section {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.palpite-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--amarelo);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.palpite-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.palpite-inputs input[type="number"] {
    width: 60px;
    height: 50px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    background: #111;
    color: var(--amarelo);
    border: 2px solid var(--verde);
    border-radius: 10px;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.palpite-inputs input::-webkit-outer-spin-button,
.palpite-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.palpite-inputs input:focus {
    border-color: var(--amarelo);
    box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.palpite-x {
    font-size: 1.2rem;
    color: var(--vermelho);
    font-weight: 900;
}

.btn-apostar {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,100,0,0.4);
}

.btn-apostar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,100,0,0.6);
}

.palpite-salvo {
    text-align: center;
    padding: 10px;
    background: rgba(0,165,80,0.2);
    border: 1px solid var(--verde-claro);
    border-radius: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--verde-claro);
    font-weight: 700;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-aberto { background: var(--verde); }
.status-encerrado { background: #666; }
.status-cancelado { background: var(--vermelho); }

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 16px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.auth-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--amarelo);
    margin-bottom: 6px;
}

.auth-subtitle {
    text-align: center;
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--verde-claro);
    background: rgba(0,165,80,0.1);
    box-shadow: 0 0 0 3px rgba(0,165,80,0.2);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,100,0,0.5);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--verde-claro);
    border: 2px solid var(--verde-claro);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 10px;
}

.btn-danger {
    background: var(--vermelho);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: #f59e0b;
    color: #000;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success { background: rgba(0,165,80,0.2); border: 1px solid var(--verde-claro); color: var(--verde-claro); }
.alert-danger { background: rgba(200,0,0,0.2); border: 1px solid var(--vermelho); color: #ff6666; }
.alert-warning { background: rgba(245,158,11,0.2); border: 1px solid #f59e0b; color: #f59e0b; }

/* Admin */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--amarelo);
}

.stat-label {
    font-size: 0.7rem;
    color: #aaa;
    text-transform: uppercase;
    margin-top: 4px;
}

.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-nav a {
    padding: 8px 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: var(--verde);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

table th {
    background: rgba(0,100,0,0.4);
    padding: 10px 8px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--amarelo);
}

table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

table tr:hover td { background: rgba(255,255,255,0.03); }

.page-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--amarelo);
    margin-bottom: 4px;
}

.page-subtitle {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.text-link {
    color: var(--verde-claro);
    text-decoration: none;
    font-weight: 600;
}

.ranking-row {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.ranking-pos {
    width: 30px;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--amarelo);
}

.ranking-nome { flex: 1; font-weight: 600; }
.ranking-pts { font-size: 1.2rem; font-weight: 900; color: var(--verde-claro); }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state .icon { font-size: 3rem; margin-bottom: 10px; }

footer {
    text-align: center;
    padding: 30px 16px;
    color: #555;
    font-size: 0.8rem;
    margin-top: 20px;
}

@media (max-width: 400px) {
    .time-logo { width: 45px; height: 45px; }
    .time-name { font-size: 0.7rem; }
    .palpite-inputs input[type="number"] { width: 50px; height: 44px; font-size: 1.2rem; }
}

/* Uploader */
.file-upload-area {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #aaa;
}

.file-upload-area:hover {
    border-color: var(--verde-claro);
    color: var(--verde-claro);
}

.logo-preview {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.banner-preview {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
}

select.form-control option { color: #000; }
 
.palpites-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}
.palpite-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.palpite-item .nome {
    color: #ccc;
    font-weight: 600;
}
.palpite-item .placar {
    color: var(--amarelo);
    font-weight: 800;
}
.palpite-item .valor {
    color: var(--verde-claro);
    font-weight: 700;
}
.palpites-resumo .palpite-item .placar {
    color: #fff;
}

/* WhatsApp Floating Button */
.whatsapp-fab {
    position: fixed;
    right: 16px;
    bottom: 24px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2fd66c, #1ebc59);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.6);
    z-index: 9999;
    text-decoration: none;
    transition: 0.3s;
}
.whatsapp-fab .wa-icon { display:flex; align-items:center; justify-content:center; width: 100%; height: 100%; }
.whatsapp-fab svg { width: 45px; height: 45px; fill: #fff; }
.whatsapp-fab img { width: 45px; height: 45px; object-fit: contain; }
.whatsapp-fab:hover { transform: scale(1.05); box-shadow: 0 0 35px rgba(46, 204, 113, 0.9); }
.whatsapp-fab:active { transform: translateY(0) scale(0.98); }
.whatsapp-fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.18) inset;
    pointer-events: none;
}

.whatsapp-fab.wa-image { background: transparent; box-shadow: none; }
.whatsapp-fab.wa-image::after { display: none; }
.whatsapp-fab.wa-image { width: auto; height: auto; }
.whatsapp-fab.wa-image .wa-icon img { width: 72px; height: 72px; border-radius: 50%; object-fit: contain; box-shadow: none; }
.whatsapp-fab.wa-image:hover .wa-icon img { transform: none; }
.wa-fab-wrap .whatsapp-fab.wa-image { background: transparent !important; box-shadow: none !important; filter: none !important; }

.wa-badge { position: fixed; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); width: 72px; height: 72px; z-index: 9999; }
.wa-badge img { width: 72px; height: 72px; display: block; border-radius: 50%; object-fit: contain; box-shadow: none; background: transparent; }
.wa-badge svg { position: absolute; left: 0; top: -6px; width: 72px; height: 72px; pointer-events: none; }
.wa-badge text { fill: #fff; font-size: 12px; font-weight: 700; paint-order: stroke; -webkit-text-stroke: 2px rgba(0,0,0,0.6); }

.adizap-wrap { position: fixed; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); width: 200px; height: 200px; z-index: 9999; pointer-events: none; }
.adizap-wrap .adizap-curve { position: absolute; left: 0; top: -20px; width: 200px; height: 120px; pointer-events: none; }
.adizap-wrap text { fill: #fff; font-size: 14px; font-weight: 700; letter-spacing: 2px; paint-order: stroke; -webkit-text-stroke: 2px rgba(0,0,0,0.6); }
.adizap-wrap .whatsapp-fab { position: absolute; right: 8px; bottom: 0; pointer-events: auto; }

@media (max-width: 480px) {
    .whatsapp-fab { right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); width: 80px; height: 80px; }
    .whatsapp-fab svg { width: 36px; height: 36px; }
    .whatsapp-fab.wa-image .wa-icon img { width: 64px; height: 64px; }
    .wa-badge { right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); width: 64px; height: 64px; }
    .wa-badge img { width: 64px; height: 64px; }
    .wa-badge svg { width: 64px; height: 64px; top: -6px; }
    .adizap-wrap { right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); width: 160px; height: 170px; }
    .adizap-wrap .adizap-curve { width: 160px; height: 100px; top: -18px; }
}
