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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stage-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.progress-indicator {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    font-size: 14px;
    opacity: 0.9;
}

main {
    padding: 40px;
}

.prediction-stage {
    display: none;
}

.prediction-stage.active {
    display: block;
}

.prediction-stage h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2em;
}

.stage-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Playoffs Styling */
.playoff-path {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.playoff-path h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.semi-final {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.semi-final-match {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.semi-final-match .date {
    color: #666;
    font-size: 0.9em;
    min-width: 80px;
}

.semi-final-match .teams {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-option {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.team-option:hover {
    background: #e0e0e0;
    border-color: #667eea;
}

.team-option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.path-winner {
    margin-top: 15px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border: 2px solid #667eea;
}

.path-winner-label {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.path-winner-team {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Groups Styling */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.group-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.group-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.team-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    cursor: move;
    transition: all 0.2s ease;
}

.rank-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.rank-item.dragging {
    opacity: 0.5;
}

.rank-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.rank-item .team-name {
    flex: 1;
    font-weight: 500;
}

/* Brackets Styling */
.bracket-round {
    margin-bottom: 40px;
}

.bracket-round h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.bracket-matches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.bracket-match {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e9ecef;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.match-number {
    font-weight: 600;
    color: #667eea;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-team {
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.match-team:hover {
    border-color: #667eea;
}

.match-team.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.match-team.placeholder {
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    main {
        padding: 20px;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }

    .bracket-matches {
        grid-template-columns: 1fr;
    }
}

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

.empty-state p {
    font-size: 1.1em;
    margin-top: 10px;
}

/* Winner Display */
#winner-display {
    margin-top: 60px;
    padding: 40px;
    display: none;
}

.winner-celebration {
    text-align: center;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
    border: 5px solid #ffd700;
    animation: winnerPulse 2s ease-in-out infinite;
}

@keyframes winnerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 25px 80px rgba(255, 215, 0, 0.6);
    }
}

.winner-trophy {
    font-size: 120px;
    margin-bottom: 20px;
    animation: trophyBounce 1s ease-in-out infinite;
}

@keyframes trophyBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.winner-label {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.winner-name {
    font-size: 4.5em;
    font-weight: 900;
    color: #1a1a1a;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

.winner-subtitle {
    font-size: 1.3em;
    color: #666;
    font-weight: 600;
    margin-top: 15px;
    font-style: italic;
}

@media (max-width: 768px) {
    .winner-name {
        font-size: 3em;
    }
    
    .winner-trophy {
        font-size: 80px;
    }
    
    .winner-label {
        font-size: 1.2em;
    }
    
    .winner-celebration {
        padding: 40px 20px;
    }
}


