:root{
    --primary:#39d98a;
    --primary-dark:#2fc67c;
    --dark-bg:linear-gradient(135deg,#0f2027,#203a43,#2c5364);
}

*{box-sizing:border-box;}

html,body{
    margin:0;
    padding:0;
    overflow-x:hidden;
}

body{
    font-family:'Segoe UI',Arial,sans-serif;
    background:var(--dark-bg);
    color:#eee;
    display:flex;
    flex-direction:column;
    min-height:100vh;
}

/* ================= HEADER ================= */

header{
    padding:50px 20px 25px;
    text-align:center;
    position:relative;
}

header h1{
    margin:0;
    font-size:clamp(24px,5vw,34px);
    font-weight:600;
}

header h1 a{
    text-decoration:none;
    color:var(--primary);
    transition:0.2s;
}

header h1 a:hover{
    opacity:0.85;
}

.subtitle{
    margin-top:10px;
    color:#bbb;
    font-size:clamp(13px,3.5vw,15px);
}

/* ================= HAMBURGER ================= */

.hamburger{
    display:none;
    position:absolute;
    left:10px;
    top:78px;
    width:46px;
    height:46px;
    cursor:pointer;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:6px;
    z-index:1002;
    background:rgba(100,100,100,0.45);
    backdrop-filter:blur(8px);
    border-radius:50%;
    transition:0.3s ease;
}

.hamburger:hover{
    background:rgba(150,150,150,0.65);
}

.hamburger span{
    width:22px;
    height:3px;
    background:#fff;
    border-radius:3px;
    transition:0.3s;
}

.hamburger.active span:nth-child(1){
    transform:rotate(45deg) translate(5px,5px);
}
.hamburger.active span:nth-child(2){
    opacity:0;
}
.hamburger.active span:nth-child(3){
    transform:rotate(-45deg) translate(5px,-5px);
}

/* ================= NAV DESKTOP ================= */

nav{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:22px;
    padding:40px 30px;
    max-width:1100px;
    margin:auto;
    width:100%;
}

nav a{
    background:rgba(0,0,0,0.45);
    backdrop-filter:blur(10px);
    text-decoration:none;
    color:#fff;
    padding:28px;
    border-radius:18px;
    text-align:center;
    font-size:18px;
    font-weight:600;
    transition:0.25s ease;
    box-shadow:0 8px 20px rgba(0,0,0,0.35);
    border:1px solid rgba(255,255,255,0.05);
}

nav a:hover{
    transform:translateY(-4px);
    border-color:var(--primary);
    box-shadow:0 8px 25px rgba(57,217,138,0.4);
}

nav a.active{
    background:var(--primary);
    color:#111;
}

/* ================= OVERLAY ================= */

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    opacity:0;
    visibility:hidden;
    transition:0.3s;
    z-index:1000;
}

.overlay.active{
    opacity:1;
    visibility:visible;
}



/* ================= FOOTER ================= */

footer{
    margin-top:auto;
    background:rgba(0,0,0,0.5);
    text-align:center;
    padding:18px;
    font-size:14px;
    color:#aaa;
}

footer span{
    color:var(--primary);
    font-weight:600;
}

/* HERO */

.hero{
    text-align:center;
    padding:30px 20px 10px;
    max-width:900px;
    margin:0 auto 20px auto;
}

.hero h2{
    font-size:clamp(22px,4vw,28px);
    margin-bottom:12px;
    font-weight:600;
}

.hero p{
    color:#cbd5e1;
    font-size:clamp(14px,3vw,16px);
    line-height:1.6;
}

/* HOME NAV */

.home-nav{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:24px;
    padding:40px 30px;
    max-width:1100px;
    margin:auto;
}

.home-nav a{
    background:rgba(0,0,0,0.45);
    backdrop-filter:blur(10px);
    text-decoration:none;
    color:#fff;
    padding:32px;
    border-radius:20px;
    text-align:center;
    font-size:18px;
    font-weight:600;
    transition:0.25s ease;
    box-shadow:0 8px 20px rgba(0,0,0,0.35);
    border:1px solid rgba(255,255,255,0.05);
}

.home-nav a:hover{
    transform:translateY(-6px);
    border-color:var(--primary);
    box-shadow:0 12px 30px rgba(57,217,138,0.45);
}

.nav-small {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;

    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 12px 20px;
    margin-top: -10px; /* aproxima visualmente do banner */
    margin-bottom: 25px;

    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* links */
.nav-small a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;

    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);

    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* hover */
.nav-small a:hover {
    background: #0ea5e9;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ativo */
.nav-small a.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(34,197,94,0.4);
}

.champ-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* alinha verticalmente ao centro */
    gap: 20px;
    /* espaço entre logo, nome e combobox */
    padding: 20px 40px;
    /* ajusta padding para ficar mais compacto */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0ea5e9 100%);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    justify-content: flex-start;
    /* elementos juntos à esquerda */
}

/* efeito subtil decorativo */
.champ-banner::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
    border-radius: 50%;
}

/* container info */
.champ-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* nome campeonato */
.champ-info h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

/* tipo torneio */
.champ-banner .subtitle {
    margin-top: 6px;
    font-size: 15px;
    color: #cbd5e1;
    font-weight: 400;
}

/* select época */
.champ-banner select {
    margin-top: 15px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.champ-banner select:hover {
    background: rgba(255,255,255,0.25);
}

.champ-banner select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56,189,248,0.6);
}

/* botão estilo champ-banner select */
.champ-banner button {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, rgba(56,189,248,0.6), rgba(34,197,94,0.6));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* hover */
.champ-banner button:hover {
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* focus */
.champ-banner button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.6);
}

.champ-season {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* espaço entre as combobox */
}

.champ-banner img.logo-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.champ-banner img.player-img {
    width:130px;
    height:130px;
    object-fit:contain;
    border-radius:50%;
    background:#fff;
    padding:6px;
}

/* ================= MOBILE LAYOUT ================= */
@media (max-width:900px) {

    /* HAMBURGER */
    .hamburger {
        display: flex;
    }

    /* MENU PRINCIPAL MOBILE */
    #mainNav {
        position: fixed;
        top: 40px;
        left: -300px;
        width: 280px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        padding: 90px 20px 20px;
        background: #111827;
        gap: 12px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 1001;
    }

    #mainNav.open {
        left: 0;
    }

    /* LINKS MOBILE */
    #mainNav a {
        width: 100%;
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.05);
        color: #cbd5e1;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
        display: block;
    }

    #mainNav a:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    #mainNav a.active {
        background: linear-gradient(135deg, #22c55e, #16a34a);
        color: #0f172a;
        font-weight: 600;
        box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
    }

    /* SEARCH BOX MOBILE */
    .nav-search {
        width: 100%;
        margin: 10px 0;
        padding: 0 4px;
    }

    .search-box {
        width: 100%;
        position: relative;
        display: flex;
        align-items: center;
    }

    .search-box input {
        width: 100%;
        padding: 10px 12px 10px 36px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(6px);
        color: #fff;
        font-size: 14px;
        transition: all 0.25s ease;
    }

    .search-box input::placeholder {
        color: #94a3b8;
    }

    .search-box input:focus {
        outline: none;
        border-color: var(--primary);
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 0 2px rgba(57, 217, 138, 0.25);
    }

    .search-box input:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* ICONO DE PESQUISA */
    .search-icon {
        position: absolute;
        left: 12px;
        font-size: 14px;
        opacity: 0.7;
        pointer-events: none;
    }

    /* GRID / LINKS RESPONSIVOS */
    .nav-small {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 10px 0;
            margin: 0;
            justify-content: flex-start;
            background: transparent;
            border: none;
            box-shadow: none;
    }

    /* LINKS DENTRO DE NAV-SMALL */
    .nav-small a {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
    }

}

/* ================= CLUB PAGE ================= */

.container{
    width: 100%;
    /* ocupa toda a largura disponível */
    max-width: 1150px;
    /* nunca ultrapassa 1400px */
    margin:0 auto;
    padding:20px;
}

.club-logo{
    width:70px;
    height:70px;
    object-fit:contain;
}

/* GRID CARDS */
.card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
    gap:20px;
    margin-top:20px;
}

.h2h-container {
    display: flex;
    align-items: stretch; /* faz com que os cards tenham a mesma altura */
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.player-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* altura igual e conteúdos distribuídos */
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    text-align: center;
    padding: 20px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    transition: transform 0.25s ease;
}

.player-card:hover{
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(57,217,138,0.35);
}

.player-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 12px;
}

.club-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
}

.club-logo {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
}

.h2h-score {
    font-size: 32px;
    font-weight: 700;
    color: #39d98a;
    min-width: 80px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-card img{
    width:100px;
    height:100px;
    object-fit:cover;
    object-position:center top;
    border-radius:50%;
    box-shadow:0 3px 10px rgba(0,0,0,0.2);
}

.player-info h3{
    margin:0;
    font-size:18px;
    font-weight:600;
}

.player-info p{
    margin:0;
    font-size:14px;
    color:#cbd5e1;
}

.player-rating{
    font-size:13px;
    color:#94a3b8;
}


/* GAME CARD */

.game-card {
    display: block;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border-left: 6px solid #ddd;
    transition: transform .15s, box-shadow .15s;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

/* vitória */

.game-win{
    border-left-color:#22c55e;
    background:#052e16;
}

/* derrota */

.game-loss{
    border-left-color:#ef4444;
    background:#3f0d0d;
}

/* por jogar */

.game-pending{
    border-left-color:#f59e0b;
    background:#3a2a05;
    opacity:.9;
}

/* layout interno */

.game-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.game-teams {
    font-weight: 600;
    font-size: 16px;
}

.game-score {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 0;
}

.game-champ {
    font-size: 13px;
    color: #777;
}

.game-date{
    font-size:13px;
    color:#9ca3af;
    margin-bottom:6px;
}

.game-teams{
    font-weight:600;
    line-height:1.4;
}

.game-champ{
    margin-top:6px;
    font-size:13px;
    color:#cbd5e1;
}

/* PLAYER CARD */

.player-card{
    display:block;

    padding:16px;

    border-radius:14px;

    background:rgba(0,0,0,0.45);
    backdrop-filter:blur(10px);

    text-decoration:none;
    color:#fff;

    border:1px solid rgba(255,255,255,0.05);

    transition:all 0.25s ease;

    box-shadow:0 6px 18px rgba(0,0,0,0.35);
}

.player-card:hover{
    transform:translateY(-4px);
    border-color:var(--primary);
    box-shadow:0 10px 25px rgba(57,217,138,0.35);
}

.player-name{
    font-weight:600;
}

.player-rank{
    font-weight:400;
}

.player-rating{
    font-weight:400;
}

/* SECTION TITLES */

.section-title{
    margin-top:30px;
    font-size:22px;
    font-weight:600;
}

/* ================= NAV SEARCH ================= */

/* nav-search container */
.nav-search {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;  /* impede que encolha */
}

/* container input + icon */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 220px;   /* largura fixa */
}

/* ícone */
.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    opacity: 0.7;
    pointer-events: none;
}

/* input */
.search-box input {
    width: 100%;   /* ocupa todo o container */
    padding: 8px 12px 8px 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 14px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

/* placeholder */
.search-box input::placeholder {
    color: #94a3b8;
}

/* focus */
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(57, 217, 138, 0.25);
    /* mantém a largura do container para não quebrar linha */
}

/* hover */
.search-box input:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fav-star{
    cursor:pointer;
    font-size:20px;
    color:#888;
    margin-left:6px;
    user-select:none;
    transition:0.2s;
}

.fav-star.active{
    color:#facc15;
}

/* =================================================
   MOBILE GLOBAL FIX
================================================= */

@media (max-width: 768px){

/* containers */

.container{
    padding:16px;
}

/* HERO */

.hero{
    padding:20px 16px 5px;
}

/* GRID CARDS */

.card-grid{
    grid-template-columns:1fr;
    gap:16px;
}

/* HOME NAV */

.home-nav{
    grid-template-columns:1fr;
    padding:20px 16px;
    gap:16px;
}

.home-nav a{
    padding:22px;
    font-size:16px;
}

/* NAV GRID (homepage menu) */

nav{
    grid-template-columns:1fr;
    padding:20px 16px;
    gap:16px;
}

/* BANNER CAMPEONATO */

.champ-banner{
    flex-direction:column;
    align-items:flex-start;
    padding:20px;
    gap:14px;
}

.champ-banner img.logo-img{
    width:60px;
    height:60px;
}

.champ-info h1{
    font-size:22px;
}

/* selects */

.champ-banner select{
    width:100%;
}

/* season controls */

.champ-season{
    width:100%;
}

/* ================= H2H ================= */

.h2h-container{
    flex-direction:column;
    gap:20px;
}

.player-card{
    width:100%;
}

.h2h-score{
    font-size:26px;
}

/* PLAYER IMG */

.player-img{
    width:90px;
    height:90px;
}

/* ================= GAME CARD ================= */

.game-card{
    padding:14px;
}

.game-teams{
    font-size:15px;
}

.game-score{
    font-size:18px;
}

/* ================= NAV SMALL ================= */

.nav-small{
    flex-direction:column;
    align-items:stretch;
}

.nav-small a{
    width:100%;
    text-align:center;
}

/* ================= TABLES ================= */

table{
    font-size:12px;
}

th,td{
    padding:6px 4px;
}

/* evita overflow horizontal */

table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
}

/* ================= CHART ================= */

.chart-container{
    height:350px;
}

/* ================= HEADER ================= */

header{
    padding:40px 16px 20px;
}

.subtitle{
    font-size:13px;
}

/* ================= FOOTER ================= */

footer{
    font-size:13px;
    padding:14px;
}

}
