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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: auto;
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1a0033, #330066, #660099);
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 150, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 0, 0.3) 0%, transparent 50%);
    animation: pulse 6s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.header-content {
    position: relative;
    z-index: 2;
}

.festival-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.title-main {
    display: block;
    color: #ff0080;
    text-shadow: 0 0 20px rgba(255, 0, 128, 0.8);
}

.title-young {
    display: block;
    color: #00ff80;
    text-shadow: 0 0 20px rgba(0, 255, 128, 0.8);
}

.title-year {
    display: block;
    font-size: 2rem;
    color: #ffff00;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #cccccc;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: rgba(26, 0, 51, 0.3);
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.mode-btn.active {
    border-color: #ff0080;
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.3), rgba(255, 0, 128, 0.1));
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

.mode-btn span {
    font-size: 1.2rem;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.control-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.control-btn.primary {
    background: linear-gradient(135deg, #ff0080, #ff4da6);
    border-color: #ff0080;
    font-weight: 600;
}

.control-btn.primary:hover {
    background: linear-gradient(135deg, #ff4da6, #ff80c0);
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.4);
}

/* Views */
.view {
    display: none;
    padding: 1rem;
}

.view.active {
    display: block;
}

/* Region Styles */
.region-section {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.region-header {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px currentColor;
}

/* Bracket Styles */
.bracket-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2rem 0;
}

#bracket {
    display: flex;
    gap: 2rem;
    min-width: fit-content;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 2rem;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 220px;
    flex-shrink: 0;
}

.round-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ff80;
    text-shadow: 0 0 10px rgba(0, 255, 128, 0.8);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.9);
    padding: 0.5rem;
    border-radius: 8px;
    z-index: 10;
}

.bracket-match {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: 120px;
}

.bracket-match:hover {
    border-color: rgba(255, 0, 128, 0.5);
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.2);
}

.bracket-match.completed {
    border-color: #00ff80;
    background: rgba(0, 255, 128, 0.1);
}

.match-team {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.match-team:last-child {
    border-bottom: none;
}

.match-team:hover {
    background: rgba(255, 255, 255, 0.1);
}

.match-team.winner {
    background: linear-gradient(90deg, rgba(0, 255, 128, 0.2), rgba(0, 255, 128, 0.1));
    color: #00ff80;
    font-weight: 600;
}

.match-team.loser {
    opacity: 0.5;
    text-decoration: line-through;
}

.team-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.team-info {
    flex: 1;
    min-width: 0;
}

.team-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-seed {
    font-size: 0.8rem;
    color: #cccccc;
    margin-top: 0.25rem;
}

.empty-slot {
    padding: 1.5rem;
    text-align: center;
    color: #666666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.bye-slot {
    padding: 1.5rem;
    text-align: center;
    color: #888888;
    font-style: italic;
    font-weight: 500;
    background: rgba(255, 255, 0, 0.05);
    border: 1px dashed rgba(255, 255, 0, 0.3);
    border-radius: 12px;
}

/* Battle Mode Styles */
.battle-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.battle-header {
    text-align: center;
    margin-bottom: 3rem;
}

.battle-progress {
    max-width: 400px;
    margin: 0 auto;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0080, #00ff80);
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #cccccc;
}

.battle-arena {
    margin-bottom: 2rem;
}

.versus-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.band-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.band-card:hover {
    border-color: #ff0080;
    background: rgba(255, 0, 128, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 128, 0.3);
}

.band-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.band-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.band-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.band-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.vs-text {
    font-size: 2rem;
    font-weight: 800;
    color: #ffff00;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
    animation: pulse 2s ease-in-out infinite alternate;
}

.battle-complete {
    text-align: center;
    padding: 3rem 1rem;
}

.battle-complete h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #00ff80;
    text-shadow: 0 0 20px rgba(0, 255, 128, 0.8);
}

.winner-display {
    margin: 2rem 0;
}

.winner-card {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 255, 128, 0.2), rgba(0, 255, 128, 0.1));
    border: 2px solid #00ff80;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 255, 128, 0.3);
}

.winner-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #00ff80;
    margin-bottom: 1rem;
}

.winner-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00ff80;
    margin-bottom: 0.5rem;
}

/* Results Mode */
.results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.results-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #00ff80;
    text-shadow: 0 0 20px rgba(0, 255, 128, 0.8);
}

.champion-display {
    margin-bottom: 3rem;
}

.results-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* Stats and Results Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-card h4 {
    color: #00ff80;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.status.complete {
    color: #00ff80;
    font-weight: 600;
}

.status.incomplete {
    color: #ffff00;
    font-weight: 600;
}

.upset-item, .performer-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
}

.final-four-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
}

.final-four-image {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.incomplete-text {
    font-style: italic;
    color: #888888;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.share-section {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 2rem;
}

.share-section h4 {
    color: #ff0080;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.share-section .control-btn {
    margin: 0.5rem;
}

.no-champion {
    text-align: center;
    padding: 2rem;
    color: #cccccc;
}

.champion-stats {
    margin-top: 1rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.champion-stats p {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Enhanced hover effects */
.band-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.match-team:hover .team-image {
    border-color: #ff0080;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #cccccc;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ff0080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .festival-title {
        font-size: 2.5rem;
    }
    
    .versus-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-divider {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .band-card {
        padding: 1.5rem;
    }
    
    .band-image {
        width: 80px;
        height: 80px;
    }
    
    .mode-selector {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .mode-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    #bracket {
        gap: 1.5rem;
        min-width: 1200px;
    }
    
    .bracket-round {
        min-width: 180px;
    }
}
