/**
 * Tournament Bracket Tree Visualization CSS
 * Matches the horizontal bracket layout with trophy at center
 */

/* Bracket Container */
.osb-bracket-container {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e3a8a 100%);
    padding: 40px 20px;
    border-radius: 12px;
    margin: 30px 0;
    overflow-x: auto;
}

.osb-bracket-title {
    text-align: center;
    color: #fbbf24;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

/* Live Notice */
.osb-live-notice {
    background: #fef3c7;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: #92400e;
}

.osb-live-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Bracket Tree Container */
.osb-bracket-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 1000px;
    padding: 20px;
}

/* Trophy at Top Center */
.osb-bracket-trophy {
    text-align: center;
    margin-bottom: 40px;
}

.osb-trophy-icon {
    font-size: 4em;
    margin-bottom: 10px;
    animation: trophy-glow 3s ease-in-out infinite;
}

@keyframes trophy-glow {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

.osb-champion-label {
    background: #fbbf24;
    color: #1e3a8a;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2em;
    display: inline-block;
    margin-bottom: 8px;
}

.osb-champion-label-pending {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2em;
    display: inline-block;
}

.osb-champion-name {
    color: white;
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 8px;
}

/* Horizontal Bracket Rounds Layout */
.osb-bracket-rounds-horizontal {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    width: 100%;
}

/* Left and Right Sides */
.osb-bracket-side {
    display: flex;
    gap: 40px;
}

.osb-bracket-left {
    flex-direction: row;
}

.osb-bracket-right {
    flex-direction: row-reverse;
}

/* Bracket Columns (Rounds) */
.osb-bracket-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.osb-round-label {
    text-align: center;
    color: #fbbf24;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Round Matches */
.osb-round-matches-tree {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

/* Team Slots */
.osb-team-slot {
    background: #1e40af;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    transition: all 0.3s;
    position: relative;
}

.osb-team-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Your Team Highlighting */
.osb-your-team {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #34d399;
    animation: highlight-pulse 2s ease-in-out infinite;
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

/* Team Winner */
.osb-team-winner {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

/* Team Content */
.osb-team-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.osb-team-name {
    color: white;
    font-weight: 600;
    font-size: 0.95em;
}

.osb-team-placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9em;
}

.osb-you-indicator {
    color: #fbbf24;
    font-weight: bold;
    font-size: 0.85em;
}

/* Status Dots */
.osb-team-status {
    display: flex;
    align-items: center;
}

.osb-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.osb-dot-pending {
    background: #6b7280;
}

.osb-dot-active {
    background: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.osb-dot-complete {
    background: #10b981;
}

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

/* Center (Championship Final Match) */
.osb-bracket-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
}

.osb-final-match {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border: 3px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-width: 200px;
}

.osb-your-final {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    animation: champion-glow 2s ease-in-out infinite;
}

@keyframes champion-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); }
}

.osb-finalist-name {
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.osb-finalist-placeholder {
    color: #9ca3af;
    font-style: italic;
}

.osb-you-badge-final {
    background: #fbbf24;
    color: #1e3a8a;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85em;
    display: inline-block;
    margin-top: 8px;
}

/* All Groups Section (Bottom) */
.osb-all-groups-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid rgba(251, 191, 36, 0.3);
}

.osb-groups-title {
    text-align: center;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 30px;
}

.osb-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Group Cards */
.osb-group-card {
    background: #1e40af;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    overflow: hidden;
}

.osb-your-group-card {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.osb-group-card-header {
    background: #fbbf24;
    padding: 16px;
    text-align: center;
    position: relative;
}

.osb-your-group-card .osb-group-card-header {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.osb-group-card-header h3 {
    margin: 0;
    color: #1e3a8a;
    font-size: 1.2em;
    font-weight: bold;
}

.osb-your-group-badge {
    background: #1e3a8a;
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    display: inline-block;
    margin-top: 6px;
}

.osb-group-card-body {
    padding: 20px;
}

.osb-team-item {
    background: rgba(59, 130, 246, 0.3);
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.osb-your-team-item {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid #10b981;
}

.osb-team-name-text {
    color: white;
    font-weight: 500;
    font-size: 0.9em;
}

.osb-you-tag {
    background: #fbbf24;
    color: #1e3a8a;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: bold;
}

.osb-no-teams {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .osb-bracket-tree {
        min-width: 800px;
    }

    .osb-bracket-rounds-horizontal {
        gap: 40px;
    }

    .osb-bracket-side {
        gap: 30px;
    }

    .osb-bracket-column {
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    .osb-bracket-title {
        font-size: 1.5em;
    }

    .osb-trophy-icon {
        font-size: 3em;
    }

    .osb-bracket-tree {
        min-width: 600px;
    }

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