/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent2: #0f3460;
    --gold: #f5a623;
    --white: #ffffff;
    --gray: #f0f0f0;
    --dark-gray: #333;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--gray);
    color: var(--dark-gray);
    line-height: 1.6;
    padding-bottom: 60px;
}

/* Header */
.header {
    background: var(--primary);
    color: var(--white);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo span {
    font-size: 20px;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    background: var(--accent);
}

/* Main Content */
#main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--primary);
    font-size: 28px;
}

.page-header p {
    color: #666;
    margin-top: 8px;
}

/* Banners */
.hero-section {
    position: relative;
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banner-carousel {
    position: relative;
    height: 250px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
    display: flex;
    align-items: center;
    padding: 20px;
}

.banner-text {
    color: var(--white);
    max-width: 500px;
}

.banner-text h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.banner-text p {
    font-size: 16px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: var(--accent);
    width: 30px;
    border-radius: 5px;
}

/* Stats */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 32px;
    color: var(--accent);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Games Section */
.games-section {
    margin-bottom: 30px;
}

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

.section-header h2 {
    font-size: 20px;
    color: var(--primary);
}

.section-header h2 i {
    color: var(--accent);
    margin-right: 8px;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.game-card.finished {
    border-left: 4px solid var(--accent);
}

.game-date {
    text-align: center;
    min-width: 50px;
}

.game-date .day {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.game-date .month {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.game-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.team span {
    font-weight: 500;
}

.game-info {
    text-align: center;
}

.game-info .vs {
    font-weight: bold;
    color: var(--accent);
    font-size: 14px;
}

.game-info .grupo {
    font-size: 12px;
    color: #666;
    display: block;
}

.game-info .hora {
    font-size: 14px;
    color: var(--primary);
}

.game-result {
    text-align: center;
}

.game-result .score {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.game-result .grupo {
    font-size: 12px;
    color: #666;
    display: block;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 14px 32px;
    font-size: 18px;
    width: 100%;
}

/* Forms */
.form-container {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-container h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-group label i {
    color: var(--accent);
    margin-right: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    display: none;
}

.file-label {
    display: block;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-label:hover {
    border-color: var(--accent);
}

.file-label i {
    font-size: 32px;
    color: var(--accent);
}

.file-label span {
    display: block;
    margin-top: 8px;
}

.file-label small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.file-preview {
    margin-top: 12px;
    text-align: center;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

/* Times Grid */
.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.time-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.time-escudo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.time-info h3 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
}

.time-details {
    font-size: 13px;
    color: #666;
}

.time-details span {
    display: block;
}

.time-details i {
    width: 16px;
    color: var(--accent);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

.empty-state p {
    font-size: 16px;
}

.empty-sub {
    font-size: 14px;
    color: #bbb;
}

/* Jogos Page */
.filters-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 14px;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
}

.jogos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-divider {
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-divider .day-name {
    font-size: 14px;
    opacity: 0.8;
}

.jogo-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.jogo-card.pendente {
    border-left: 4px solid #ffc107;
}

.jogo-card.finalizado {
    border-left: 4px solid #28a745;
}

.jogo-card.andamento {
    border-left: 4px solid #17a2b8;
}

.jogo-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.grupo-badge,
.fase-badge,
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.grupo-badge {
    background: var(--primary);
    color: var(--white);
}

.fase-badge {
    background: var(--accent2);
    color: var(--white);
}

.status-badge.pendente {
    background: #ffc107;
    color: #000;
}

.status-badge.finalizado {
    background: #28a745;
    color: var(--white);
}

.status-badge.andamento {
    background: #17a2b8;
    color: var(--white);
}

.jogo-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
}

.jogo-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
}

.score-separator {
    color: #999;
    font-size: 14px;
}

.score-time {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent);
}

.jogo-local {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Classificacao Page */
.grupo-classificacao {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

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

.grupo-header h2 {
    font-size: 20px;
    color: var(--primary);
}

.grupo-header h2 i {
    color: var(--accent);
    margin-right: 8px;
}

.times-count {
    font-size: 14px;
    color: #666;
}

.tabela-classificacao {
    overflow-x: auto;
}

.tabela-classificacao table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tabela-classificacao th {
    background: var(--primary);
    color: var(--white);
    padding: 10px 8px;
    text-align: center;
    font-weight: 500;
}

.tabela-classificacao td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.tabela-classificacao tr.topo {
    background: #f0f8ff;
}

.time-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.escudo-mini {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.posicao {
    font-size: 18px;
    font-weight: bold;
}

.sg {
    font-weight: bold;
}

.sg.positive {
    color: #28a745;
}

.sg.negative {
    color: #dc3545;
}

.pontos {
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 20px 16px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.social-links a {
    color: var(--white);
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 16px;
        width: 100%;
    }
    
    .banner-carousel {
        height: 200px;
    }
    
    .banner-text h2 {
        font-size: 22px;
    }
    
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .game-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .game-date {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: center;
    }
    
    .game-date .day {
        font-size: 18px;
    }
    
    .game-teams {
        flex-direction: column;
        gap: 8px;
    }
    
    .team {
        width: 100%;
        justify-content: center;
    }
    
    .game-info {
        order: 0;
    }
    
    .game-result {
        order: 0;
    }
    
    .times-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .tabela-classificacao {
        font-size: 12px;
    }
    
    .tabela-classificacao th,
    .tabela-classificacao td {
        padding: 6px 4px;
    }
    
    .time-info span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }
    
    .stat-card {
        padding: 8px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .jogo-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .jogo-score {
        order: 0;
    }
}