/* FIFA Colors and Global Styles */
:root {
    --fifa-blue: #004B93;
    --fifa-light-blue: #3B82C4;
    --fifa-gold: #FFD700;
    --fifa-red: #E60026;
    --fifa-green: #00A651;
    --fifa-dark: #1a1a1a;
    --fifa-gray: #f8f9fa;
    --fifa-white: #ffffff;
    --fifa-shadow: rgba(0, 75, 147, 0.15);
    --fifa-border: rgba(0, 75, 147, 0.2);
}

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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--fifa-blue) 0%, var(--fifa-light-blue) 100%);
    color: var(--fifa-dark);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.header {
    text-align: center;
    background: var(--fifa-white);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.header h1 {
    color: var(--fifa-blue);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 6px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header h2 {
    color: var(--fifa-red);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.draw-button, .playoff-button, .simulate-tournament-btn, .animation-toggle-button, .support-link-btn {
    border: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.draw-button {
    background: linear-gradient(45deg, var(--fifa-gold), #FFA500);
    color: var(--fifa-dark);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.draw-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.draw-button:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.playoff-button {
    background: linear-gradient(45deg, var(--fifa-red), #c71e39);
    color: var(--fifa-white);
    box-shadow: 0 4px 15px rgba(230, 0, 38, 0.3);
}

.playoff-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 38, 0.4);
}

/* Sections */
.pots-section, .groups-section, .matches-section, .playoffs-section {
    background: var(--fifa-white);
    margin: 12px 0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pots-section h3, .groups-section h3, .matches-section h3, .playoffs-section h3 {
    color: var(--fifa-blue);
    font-size: 1rem;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--fifa-gold);
    padding-bottom: 4px;
}

/* Pots Header */
.pots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pots-header h3 {
    margin-bottom: 0;
}

.toggle-pots {
    background: var(--fifa-light-blue);
    color: var(--fifa-white);
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toggle-pots:hover {
    background: var(--fifa-blue);
    transform: translateY(-1px);
}

/* Pots Container */
.pots-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.pots-container.hidden {
    display: none;
}

.pot {
    background: linear-gradient(135deg, var(--fifa-gray) 0%, #e8e8e8 100%);
    border-radius: 4px;
    padding: 4px;
    border: 1px solid var(--fifa-blue);
}

.pot-header {
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 2px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.6rem;
    margin-bottom: 3px;
}

.pot-team {
    display: flex;
    align-items: center;
    padding: 2px 3px;
    margin: 1px 0;
    background: var(--fifa-white);
    border-radius: 2px;
    border-left: 2px solid var(--fifa-green);
    transition: transform 0.2s ease;
}

.pot-team:hover {
    transform: translateX(5px);
}

.team-flag {
    font-size: 0.7rem;
    margin-right: 3px;
    min-width: 12px;
}

.team-info {
    flex: 1;
}

.team-name {
    font-weight: bold;
    font-size: 0.5rem;
    color: var(--fifa-dark);
    line-height: 1.0;
}

.team-confederation {
    font-size: 0.4rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    background: var(--fifa-gray);
    padding: 0px 1px;
    border-radius: 1px;
    margin-top: 1px;
    font-weight: 500;
}

.team-points {
    font-size: 0.4rem;
    color: var(--fifa-blue);
    font-weight: 600;
    margin-top: 1px;
}

/* Groups Container */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.group {
    background: linear-gradient(135deg, var(--fifa-white) 0%, var(--fifa-gray) 100%);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid var(--fifa-blue);
    transition: transform 0.3s ease;
}

.group:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 75, 147, 0.2);
}

.group-header {
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 6px;
}

.group-team {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    margin: 3px 0;
    background: var(--fifa-white);
    border-radius: 3px;
    border-left: 2px solid var(--fifa-gold);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.group-team:nth-child(even) {
    border-left-color: var(--fifa-red);
}

.group-team .team-flag {
    font-size: 1rem;
    margin-right: 6px;
    min-width: 18px;
}

.group-team .team-name {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--fifa-dark);
    line-height: 1.1;
}

.group-team .team-confederation {
    margin-left: 4px;
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 1px 3px;
    border-radius: 2px;
    font-size: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Matches Container */
.matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.group-matches {
    background: var(--fifa-gray);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid var(--fifa-blue);
}

.group-matches-header {
    background: var(--fifa-red);
    color: var(--fifa-white);
    padding: 4px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: 6px;
}

.match {
    background: var(--fifa-white);
    padding: 6px;
    margin: 4px 0;
    border-radius: 3px;
    border-left: 2px solid var(--fifa-green);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.match-number {
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.55rem;
}

.match-date {
    color: var(--fifa-red);
    font-weight: bold;
    font-size: 0.55rem;
}

.match-teams {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--fifa-dark);
    margin: 3px 0;
    text-align: center;
    line-height: 1.2;
}

.match-venue {
    font-size: 0.55rem;
    color: #666;
    text-align: center;
    font-style: italic;
    margin-top: 2px;
}

.team-with-flag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.vs-text {
    margin: 0 6px;
    font-weight: normal;
    color: var(--fifa-red);
}

/* Match View Toggle */
.matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.toggle-view-btn {
    background: var(--fifa-gray);
    color: var(--fifa-dark);
    border: 1px solid var(--fifa-blue);
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toggle-view-btn:hover {
    background: var(--fifa-light-blue);
    color: var(--fifa-white);
}

.toggle-view-btn.active {
    background: var(--fifa-blue);
    color: var(--fifa-white);
}

/* City View Specific Styling */
.city-matches {
    background: var(--fifa-gray);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid var(--fifa-blue);
}

.city-matches-header {
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 4px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: 6px;
}

.city-match {
    background: var(--fifa-white);
    padding: 4px;
    margin: 3px 0;
    border-radius: 3px;
    border-left: 2px solid var(--fifa-green);
    font-size: 0.55rem;
}

.city-match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.city-match-teams {
    font-weight: bold;
    line-height: 1.2;
}

.city-match-details {
    font-size: 0.5rem;
    color: #666;
}

/* Stage Indicator */
.stage-indicator {
    font-size: 0.6rem;
    color: var(--fifa-red);
    font-weight: normal;
    font-style: italic;
}

/* Calendar View */
.calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.calendar-day {
    background: var(--fifa-gray);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid var(--fifa-blue);
}

.calendar-day-header {
    background: var(--fifa-blue);
    color: var(--fifa-white);
    padding: 4px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: 6px;
}

.calendar-match {
    background: var(--fifa-white);
    padding: 4px;
    margin: 3px 0;
    border-radius: 3px;
    border-left: 2px solid var(--fifa-green);
    font-size: 0.55rem;
}

.calendar-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.calendar-match-teams {
    font-weight: bold;
    line-height: 1.2;
    margin: 2px 0;
}

.calendar-match-venue {
    font-size: 0.5rem;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pots-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 6px;
    }

    .header {
        padding: 8px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .header h2 {
        font-size: 0.8rem;
    }

    .pots-section h3, .groups-section h3, .matches-section h3, .playoffs-section h3 {
        font-size: 0.9rem;
    }

    .pots-container {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .groups-container,
    .matches-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pot, .group, .group-matches {
        margin-bottom: 8px;
        padding: 6px;
    }

    .team-flag {
        font-size: 0.8rem;
    }

    .group-team .team-flag {
        font-size: 0.9rem;
    }

    .team-name {
        font-size: 0.55rem;
    }

    .group-team .team-name {
        font-size: 0.6rem;
    }

    .section-header-with-action {
        flex-direction: column;
        align-items: stretch;
    }

    .simulate-tournament-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Section header with action button */
.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header-with-action h3 {
    margin: 0;
}

.simulate-tournament-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.simulate-tournament-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.simulate-tournament-btn:active:not(:disabled) {
    transform: translateY(0);
}

.simulate-tournament-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.simulate-full-tournament-main-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.simulate-full-tournament-main-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.simulate-full-tournament-main-btn:active {
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--fifa-white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Team status styling */
.qualified-team {
    border-left-color: var(--fifa-green) !important;
}

.projected-team {
    border-left-color: var(--fifa-light-blue) !important;
    opacity: 0.9;
}

.projected-team .team-name::after {
    content: " (Projected)";
    font-size: 0.7rem;
    color: var(--fifa-light-blue);
    font-weight: normal;
}

.playoff-winner-team {
    border-left-color: var(--fifa-red) !important;
    background: linear-gradient(90deg, #ffe6e6 0%, var(--fifa-white) 100%) !important;
}

.playoff-winner-team .team-name {
    font-weight: bold;
    color: var(--fifa-red);
}

.placeholder-team {
    opacity: 0.7;
    font-style: italic;
    border-left-color: #ccc !important;
}

.placeholder-team .team-name {
    color: #888;
}

.placeholder-team .team-confederation {
    background: #ccc !important;
}

.placeholder-points {
    color: #888 !important;
    font-style: italic;
    font-size: 0.45rem !important;
}

/* Team Status Labels */
.team-host-status {
    color: var(--fifa-gold) !important;
    font-weight: bold;
}

.team-qualified-status {
    color: var(--fifa-green) !important;
}

.team-projected-status {
    color: var(--fifa-blue) !important;
}

.team-playoff-status {
    color: var(--fifa-red) !important;
    font-weight: bold;
}

/* Host team styling */
.host-team {
    border-left-color: var(--fifa-gold) !important;
    background: linear-gradient(90deg, #fff9e6 0%, var(--fifa-white) 100%) !important;
}

.host-team .team-confederation::after {
    content: " (Host)";
    font-weight: bold;
    color: var(--fifa-gold);
    margin-left: 5px;
}

/* Confederation colors for team info */
.team-confederation.AFC { background: #FF6B35; }
.team-confederation.CAF { background: #F4D03F; color: #333; }
.team-confederation.CONCACAF { background: #85C1E9; }
.team-confederation.CONMEBOL { background: #82E0AA; color: #333; }
.team-confederation.OFC { background: #D7BDE2; }
.team-confederation.UEFA { background: #F8C471; color: #333; }
.team-confederation.PLAYOFF { background: #BDC3C7; }

/* Playoff Results Styling - ULTRA COMPACT */
.playoffs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.playoff-section {
    background: var(--fifa-gray);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid var(--fifa-red);
}

.playoff-header {
    background: var(--fifa-red);
    color: var(--fifa-white);
    padding: 4px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: 6px;
}

.playoff-path {
    margin: 6px 0;
    padding: 6px;
    background: var(--fifa-white);
    border-radius: 3px;
    border-left: 2px solid var(--fifa-blue);
}

.playoff-path-header {
    font-weight: bold;
    font-size: 0.6rem;
    color: var(--fifa-blue);
    margin-bottom: 4px;
}

.playoff-match {
    margin: 3px 0;
    padding: 4px;
    background: var(--fifa-gray);
    border-radius: 2px;
    border-left: 2px solid var(--fifa-green);
    font-size: 0.55rem;
    line-height: 1.2;
}

.playoff-match.semifinal {
    border-left-color: var(--fifa-light-blue);
}

.playoff-match.final {
    border-left-color: var(--fifa-gold);
    font-weight: bold;
}

.playoff-winner {
    background: linear-gradient(135deg, var(--fifa-gold), #FFA500);
    color: var(--fifa-dark);
    padding: 4px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    font-size: 0.6rem;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.playoff-winner .team-flag {
    font-size: 0.8rem;
    margin-right: 3px;
}

.match-probability {
    font-size: 0.5rem;
    color: #666;
    font-style: italic;
    margin-top: 1px;
}

/* Playoff Toggle Functionality */
.playoffs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.toggle-playoffs {
    background: var(--fifa-light-blue);
    color: var(--fifa-white);
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toggle-playoffs:hover {
    background: var(--fifa-blue);
    transform: translateY(-1px);
}

.playoffs-container.collapsed {
    display: none;
}

.playoffs-container:not(.collapsed) {
    display: grid;
}

/* Simulation Log Styling */
.simulation-log-section {
    background: var(--fifa-white);
    margin: 12px 0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.log-header h3 {
    color: var(--fifa-blue);
    font-size: 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--fifa-gold);
    padding-bottom: 4px;
}

.toggle-log {
    background: var(--fifa-light-blue);
    color: var(--fifa-white);
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toggle-log:hover {
    background: var(--fifa-blue);
    transform: translateY(-1px);
}

.simulation-log {
    max-height: 400px;
    overflow-y: auto;
    background: var(--fifa-gray);
    border-radius: 6px;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    line-height: 1.4;
    border: 1px solid var(--fifa-border);
}

.simulation-log.collapsed {
    display: none;
}

.log-entry {
    margin: 4px 0;
    padding: 2px 0;
}

.log-entry.pot-start {
    color: var(--fifa-blue);
    font-weight: bold;
    border-top: 1px solid var(--fifa-border);
    padding-top: 6px;
    margin-top: 8px;
}

.log-entry.team-drawn {
    color: var(--fifa-dark);
    margin-left: 10px;
}

.log-entry.constraint {
    color: var(--fifa-red);
    margin-left: 20px;
    font-style: italic;
}

.log-entry.success {
    color: var(--fifa-green);
    margin-left: 10px;
}

.log-entry.error {
    color: var(--fifa-red);
    font-weight: bold;
}

.log-entry.validation {
    color: var(--fifa-gold);
    font-weight: bold;
    border-top: 1px solid var(--fifa-gold);
    padding-top: 6px;
    margin-top: 8px;
}

/* Playoff Notes - Cosmetic Only */
.playoff-note {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid var(--fifa-gold);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.playoff-note-content {
    font-size: 0.7rem;
    font-weight: bold;
    color: #856404;
    line-height: 1.3;
}

.playoff-note-details {
    font-size: 0.6rem;
    font-weight: normal;
    color: #6c5701;
    display: block;
    margin-top: 2px;
}

.playoff-reminder {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid var(--fifa-light-blue);
    border-radius: 6px;
    padding: 6px;
    margin-top: 10px;
    text-align: center;
}

.playoff-reminder-content {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--fifa-blue);
    font-style: italic;
}

/* ============================================ */
/* ANIMATED DRAW VISUALIZATIONS */
/* ============================================ */

/* Team Card Flying Animation */
@keyframes flyIntoGroup {
    0% {
        transform: translateX(-100vw) translateY(-50vh) scale(0.3) rotate(-360deg);
        opacity: 0;
    }
    50% {
        transform: translateX(0) translateY(-20vh) scale(1.5) rotate(-180deg);
        opacity: 0.8;
    }
    80% {
        transform: translateX(0) translateY(0) scale(1.1) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: translateX(0) translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100vw) rotate(360deg);
        opacity: 0;
    }
    60% {
        transform: translateX(-20px) rotate(-10deg);
        opacity: 1;
    }
    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px var(--fifa-shadow);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Drawing Animation Classes */
.team-animating {
    animation: flyIntoGroup 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.team-drawn {
    animation: popIn 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.team-highlight {
    animation: pulse 2s ease-in-out infinite;
}

.group-active {
    animation: glow 1.5s ease-in-out infinite;
    border: 3px solid var(--fifa-gold) !important;
    position: relative;
}

.group-active::before {
    content: '⭐ DRAWING NOW ⭐';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--fifa-gold), #ffa500);
    color: var(--fifa-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: bounce 1s ease-in-out infinite;
    z-index: 10;
    white-space: nowrap;
}

/* Pot Drawing Indicator */
.pot-drawing {
    position: relative;
    animation: glow 2s ease-in-out infinite;
    border: 3px solid var(--fifa-red) !important;
    background: linear-gradient(135deg, #ffe6e6, #ffcccc) !important;
}

.pot-drawing::after {
    content: '🎲 DRAWING FROM THIS POT...';
    position: absolute;
    top: -12px;
    right: 10px;
    background: var(--fifa-red);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Team Card Shimmer Effect */
.team-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Confetti Particles */
.confetti-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--fifa-gold);
    pointer-events: none;
    z-index: 9999;
    animation: confetti 3s ease-out forwards;
}

/* Draw Progress Bar */
.draw-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.draw-progress-bar {
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.draw-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--fifa-blue), var(--fifa-light-blue), var(--fifa-gold));
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
    transition: width 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.draw-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--fifa-dark);
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Celebration Animation */
@keyframes celebrate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.group-complete {
    animation: celebrate 0.6s ease-in-out;
    border: 3px solid var(--fifa-green) !important;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9) !important;
}

.group-complete::after {
    content: '✅ COMPLETE';
    position: absolute;
    top: -12px;
    right: 10px;
    background: var(--fifa-green);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: bold;
}

/* Spotlight Effect */
@keyframes spotlight {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 215, 0, 0.8);
    }
}

.team-spotlight {
    animation: spotlight 1.5s ease-in-out infinite;
    border: 2px solid var(--fifa-gold) !important;
    background: linear-gradient(135deg, #fff9e6, #fff4cc) !important;
    position: relative;
    z-index: 5;
}

/* Empty Slot Placeholder - matches group-team styling */
.group-team.empty-slot {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border: 2px dashed #ccc;
    opacity: 0.7;
    animation: pulse-subtle 2s ease-in-out infinite;
}

.group-team.empty-slot .team-flag {
    font-size: 1.5rem;
    opacity: 0.5;
}

.group-team.empty-slot .team-name {
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
}

.group-team.empty-slot .team-confederation {
    color: #bbb;
    font-size: 0.75rem;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Animation Toggle Button */
.animation-toggle-button {
    background: #e0e0e0;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #ccc;
}

.animation-toggle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.animation-toggle-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.support-link-btn {
    background: rgba(0, 75, 147, 0.05);
    color: var(--fifa-blue);
    border: 1px solid var(--fifa-blue);
    box-shadow: 0 2px 8px rgba(0, 75, 147, 0.2);
}

.support-link-btn:hover {
    background: rgba(0, 75, 147, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 75, 147, 0.3);
}