* {
    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: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.last-update {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
}

.last-update .update-label {
    font-weight: 500;
}

.last-update .update-time {
    color: #667eea;
    font-weight: 600;
    cursor: help;
}

.tournament-selector {
    display: none;
    text-align: center;
    margin: 15px 0 20px 0;
}

.tournament-selector label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-right: 10px;
}

#tournament-select {
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 250px;
}

#tournament-select:hover {
    border-color: #764ba2;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

#tournament-select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.filters select {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filters select:hover {
    border-color: #764ba2;
}

.filters select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-checkbox:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #764ba2;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-checkbox span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.save-filters-btn,
.load-filters-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.save-filters-btn:hover,
.load-filters-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bracket-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.bracket-filter:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #764ba2;
}

.bracket-filter input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bracket-filter span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.searchable-select {
    position: relative;
    min-width: 250px;
    flex: 1;
}

.searchable-select input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}

.searchable-select input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    cursor: text;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #764ba2;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 5px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dropdown-item:first-child {
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.dropdown-item-disabled {
    padding: 10px 15px;
    color: #999;
    font-style: italic;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

/* Medium screens: Stack teams list above matches, but keep match teams horizontal */
@media (max-width: 1080px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Small screens: Also stack teams within each match */
@media (max-width: 600px) {
    .teams-row {
        flex-direction: column;
    }
    
    .vs-divider-horizontal {
        width: 100%;
        padding: 3px 6px;
        font-size: 0.75rem;
    }
}

@media (min-width: 1081px) and (max-width: 1430px) {
    /* Hide participants column on mid-sized screens too */
    .standings-table th:nth-child(2),
    .standings-table td:nth-child(2) {
        display: none;
    }
    
    .standings-table td:first-child {
        min-width: 250px;
    }
}

/* Medium screen adjustments (tablets, landscape phones) */
@media (min-width: 601px) and (max-width: 1080px) {
    .main-content {
        gap: 20px;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .main-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .last-update {
        font-size: 0.75rem;
        margin-top: -5px;
        margin-bottom: 15px;
    }
    
    .tournament-selector {
        margin: 10px 0 15px 0;
    }
    
    .tournament-selector label {
        font-size: 0.85rem;
        display: block;
        margin-bottom: 5px;
    }
    
    #tournament-select {
        min-width: 100%;
        font-size: 0.9rem;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-checkbox,
    .save-filters-btn,
    .load-filters-btn {
        width: 100%;
        justify-content: center;
    }
    
    .searchable-select {
        min-width: 100%;
        width: 100%;
    }
    
    .searchable-select input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .standings-section,
    .bracket-section {
        padding: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .standings-section h2,
    .bracket-section h2 {
        font-size: 1.3rem;
    }
    
    .toggle-btn {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .team-count,
    .match-count {
        font-size: 0.85rem;
        display: block;
        margin-top: 5px;
    }
    
    /* Make table scrollable on mobile */
    .standings-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .standings-table thead,
    .standings-table tbody,
    .standings-table tr {
        display: table;
        width: 100%;
        table-layout: auto;
    }
    
    .standings-table td:first-child {
        min-width: 120px;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
    
    /* Hide participants column on mobile (now 2nd column) */
    .standings-table th:nth-child(2),
    .standings-table td:nth-child(2) {
        display: none;
    }
    
    .mu-avatar {
        width: 24px;
        height: 24px;
        margin-right: 4px;
    }
    
    .country-flag {
        width: 24px;
    }
    
    /* Round Navigation Mobile */
    .round-navigation {
        padding: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .round-indicator {
        font-size: 1rem;
        width: 100%;
        order: -1;
        margin-bottom: 5px;
    }
    
    .round-count {
        font-size: 0.8rem;
    }
    
    .round-nav-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .round-nav-btn .btn-text {
        display: none;
    }
    
    /* Match Inline Mobile */
    .match-inline {
        gap: 8px;
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .team-inline {
        flex: 1 1 calc(50% - 25px);
        min-width: 120px;
        font-size: 0.85rem;
    }
    
    .team-inline .team-name {
        font-size: 0.85rem;
    }
    
    .mu-avatar-small {
        width: 20px;
        height: 20px;
        margin-right: 4px;
    }
    
    .score-inline {
        font-size: 1.1rem;
        min-width: 40px;
    }
    
    .battle-btn {
        flex: 1 1 100%;
        font-size: 0.85rem;
        padding: 6px 12px;
        margin-top: 5px;
    }
    
    .bracket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bracket-header h2 {
        margin-bottom: 0;
    }
    
    .bracket-filter {
        font-size: 0.85rem;
    }
}

.standings-section,
.bracket-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bracket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bracket-header h2 {
    margin: 0;
}

.bracket-filter input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bracket-filter:hover {
    color: #667eea;
}

.standings-section h2,
.bracket-section h2 {
    color: #667eea;
    font-size: 1.8rem;
}

.standings-section h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.standings-container {
    transition: all 0.3s ease;
}

.toggle-btn {
    background: none;
    border: 2px solid #667eea;
    border-radius: 6px;
    width: auto;
    height: auto;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #667eea;
    font-size: 1rem;
}

.toggle-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
}

.toggle-icon {
    transition: transform 0.3s;
    display: inline-block;
}

.standings-container.collapsed + .toggle-btn .toggle-icon,
.standings-section h2 .toggle-btn .toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.team-count,
.match-count {
    font-size: 1rem;
    color: #999;
    font-weight: normal;
}

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table thead {
    background: #667eea;
    color: white;
}

.standings-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.standings-table th:last-child {
    text-align: right;
}

.standings-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.standings-table tbody tr.team-active {
    background: #e8f5e9;
}

.standings-table tbody tr.team-ko {
    background: #ffcdd2;
    text-decoration: line-through;
    opacity: 0.85;
    color: #000;
}

.standings-table tbody tr.team-selected {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

.standings-table tbody tr:hover {
    background: #f5f5f5;
}

.standings-table tbody tr.team-active:hover {
    background: #c8e6c9;
}

.standings-table tbody tr.team-ko:hover {
    background: #ef9a9a;
}

.standings-table td {
    padding: 12px;
}

.standings-table td:first-child {
    min-width: 200px;
}

.standings-table td:last-child {
    text-align: right;
}

.team-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Bracket */
.bracket-container {
    overflow-x: auto;
    padding-bottom: 20px;
}

/* Round Navigation */
.round-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.round-indicator {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.round-count {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
}

.round-nav-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.round-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.round-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bracket-rounds {
    display: flex;
    gap: 40px;
    min-width: min-content;
}

.bracket-round {
    min-width: 300px;
}

.bracket-round h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.match-inline:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.team-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.team-inline .team-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-inline.winner {
    font-weight: 700;
    color: #28a745;
}

.team-inline.loser {
    opacity: 0.6;
    text-decoration: line-through;
}

.score-inline {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    min-width: 50px;
    text-align: center;
}

.score-inline.pending {
    font-size: 1rem;
    color: #999;
}

.battle-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.battle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.battle-btn .live-indicator {
    color: #28a745;
    animation: pulse 2s infinite;
}

/* Old match styles - keep for compatibility */
.match {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.match:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.match.in-progress {
    border-color: #ffc107;
    background: #fffbf0;
}

.match.completed {
    border-color: #28a745;
}

.match-team {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin-bottom: 8px;
}

.match-team:last-of-type {
    margin-bottom: 0;
}

.match-team.winner {
    background: #e8f5e9;
    border: 2px solid #28a745;
    font-weight: 600;
}

.match-team .team-name {
    flex: 1;
    margin-left: 8px;
}

.match-team .team-score {
    font-weight: bold;
    font-size: 1.2rem;
    color: #667eea;
    margin-left: 10px;
}

.match-vs {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin: 5px 0;
}

.match-vs .series-score {
    font-size: 1.4rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.match-vs .series-score.pending {
    font-size: 0.9rem;
    color: #999;
    font-weight: normal;
}

.match-vs .vs-label {
    font-size: 0.85rem;
    color: #999;
}

.match-team.qualified {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.match-team.eliminated {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    opacity: 0.7;
}

.match-team .team-status {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 600;
}

.match-team.qualified .team-status {
    color: #28a745;
}

.match-team.eliminated .team-status {
    color: #dc3545;
}

.match-time {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.match-time .live-score {
    color: #28a745;
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

.match-time .final-score {
    color: #666;
    font-weight: 600;
    margin-left: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Utility classes */
.loading,
.error,
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

.error {
    color: #dc3545;
}

.progress-text {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

/* Scrollbar styling */
.bracket-container::-webkit-scrollbar {
    height: 8px;
}

.bracket-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.bracket-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.bracket-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Status badges */
.status-active {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #ffc107;
    color: #333;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-completed {
    background: #6c757d;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-ko {
    background: #dc3545;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.match-time a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.match-time a:hover {
    text-decoration: underline;
}

/* MU Avatars */
.mu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    object-fit: cover;
}

.mu-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: cover;
}

.country-flag {
    width: 30px;
    height: auto;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================================
   VERTICAL MATCH LAYOUT STYLES
   ======================================== */

/* Vertical Match Container */
.match-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    width: 100%;
}

.match-vertical:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Vertical Team Display */
.team-vertical {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.team-vertical.team-defender {
    background: #e3f2fd;
    border-color: #90caf9;
}

.team-vertical.team-attacker {
    background: #ffebee;
    border-color: #ef9a9a;
}

.team-vertical .team-name {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

.team-vertical.winner {
    font-weight: 700;
    color: #28a745;
    background: #e8f5e9 !important;
    border-color: #28a745 !important;
}

.team-vertical.loser {
    opacity: 0.6;
    text-decoration: line-through;
    background: #f5f5f5 !important;
}

.team-vertical.has-highlighted-nation {
    border: 3px solid #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Team Score Display - inline with team */
.team-score {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    min-width: 35px;
    text-align: center;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 6px;
    margin-left: auto;
}

.team-score.pending {
    font-size: 1rem;
    color: #999;
    font-weight: 600;
    background: #f8f9fa;
}

/* Possible teams container */
.possible-teams {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.team-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.or-divider {
    text-align: center;
    color: #999;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 0;
}

.view-team-battle-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.view-team-battle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* Vertical Battle Button */
.battle-btn-vertical {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    display: block;
}

.battle-btn-vertical:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.battle-btn-vertical .live-indicator {
    color: #90EE90;
    animation: pulse 2s infinite;
    margin-right: 6px;
}

/* Bracket matches grid for vertical layout */
.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
    align-items: center;
}

/* ===== HORIZONTAL MATCH LAYOUT ===== */
.match-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    width: 100%;
}

.match-horizontal:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
}

.teams-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.team-horizontal {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.team-horizontal.team-defender {
    background: #e3f2fd;
    border-color: #90caf9;
}

.team-horizontal.team-attacker {
    background: #ffebee;
    border-color: #ef9a9a;
}

.team-horizontal.winner {
    font-weight: 700;
    color: #28a745;
    background: #e8f5e9 !important;
    border-color: #28a745 !important;
}

.team-horizontal.loser {
    opacity: 0.6;
    text-decoration: line-through;
    background: #f5f5f5 !important;
}

.team-horizontal.has-highlighted-nation {
    border: 3px solid #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.team-horizontal .team-name {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

.vs-divider-horizontal {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    padding: 4px 6px;
    text-align: center;
    flex-shrink: 0;
}

.battle-btn-horizontal {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    display: block;
}

.battle-btn-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.battle-btn-horizontal .live-indicator {
    color: #90EE90;
    animation: pulse 2s infinite;
    margin-right: 6px;
}

/* Mobile adjustments for vertical layout */
@media (max-width: 600px) {
    .match-vertical {
        max-width: 100%;
        padding: 12px 16px;
    }
    
    .team-vertical .team-name {
        font-size: 0.85rem;
    }
    
    .team-score {
        font-size: 1.1rem;
        padding: 3px 6px;
        min-width: 30px;
    }
    
    .view-team-battle-btn {
        padding: 3px 6px;
        font-size: 0.9rem;
    }
    
    .battle-btn-vertical {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .battle-btn-horizontal {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .match-horizontal {
        padding: 12px 16px;
    }
    
    .teams-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .team-horizontal {
        width: 100%;
    }
    
    .vs-divider-horizontal {
        font-size: 0.75rem;
        padding: 3px 6px;
        width: 100%;
    }
    
    .bracket-matches {
        gap: 15px;
    }
    
    .bracket-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .bracket-filter {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Wrapper for tabs and stats to create unified block */
.battle-info-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    width: 100%;
    border: 1px solid #e0e0e0;
}

.battle-rounds-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    width: 100%;
}

.round-tab {
    flex: 1;
    padding: 6px 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.round-tab:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 0;
}

.round-tab:last-child {
    border-right: 1px solid #e0e0e0;
    border-top-right-radius: 4px;
}

.round-tab:hover:not(.disabled) {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #2196F3;
    z-index: 1;
    position: relative;
}

.round-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    z-index: 2;
    position: relative;
}

.round-tab.disabled {
    background: #fafafa;
    border-color: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
}

.battle-stats {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    background: white;
}

/* Battle bars wrapper with spanning MU logos */
.battle-bars-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
}

.bar-mu-logo-span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bars-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ground-points-bar {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ground-points-progress {
    position: relative;
    flex: 1;
    height: 24px;
    background: linear-gradient(to right, #e3f2fd 0%, #f5f5f5 50%, #ffebee 50%, #ffebee 100%);
    border-radius: 0;
    overflow: hidden;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.ground-points-defender {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, #2196F3, #64B5F6);
    transition: width 0.5s ease;
    border-radius: 0;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.ground-points-attacker {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to left, #f44336, #ef5350);
    transition: width 0.5s ease;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.ground-points-value {
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    z-index: 1;
}

/* Damage Distribution Bar */
.damage-bar {
    width: 100%;
    margin: 0;
    padding: 0;
}

.damage-progress {
    position: relative;
    flex: 1;
    height: 24px;
    background: #f5f5f5;
    border-radius: 0;
    overflow: hidden;
    border: none;
    display: flex;
}

.damage-attacker {
    height: 100%;
    background: linear-gradient(to right, #C62828, #D32F2F);
    display: flex;
    align-items: center;
    padding: 0 8px;
    flex-shrink: 0;
}

.damage-defender {
    height: 100%;
    background: linear-gradient(to right, #0D47A1, #1976D2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    flex-shrink: 0;
}

.damage-value {
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Mobile responsive for battle info */
@media (max-width: 600px) {
    .battle-info-block {
        padding: 0;
        margin: 0;
    }
    
    .battle-rounds-tabs {
        gap: 0;
        margin-bottom: 0;
    }
    
    .round-tab {
        padding: 5px 6px;
        font-size: 0.75rem;
    }
    
    .battle-bars-wrapper {
        padding: 6px;
        gap: 6px;
    }
    
    .bar-mu-logo-span {
        width: 24px;
        height: 24px;
    }
    
    .ground-points-progress {
        height: 20px;
    }
    
    .ground-points-value {
        font-size: 0.7rem;
    }
}

/* Extra small screens - hide MU logos for bigger bars */
@media (max-width: 480px) {
    .bar-mu-logo-span {
        display: none;
    }
    
    .battle-bars-wrapper {
        gap: 0;
    }
}
