/* Bracket specific styles */
html, body {
    height: auto !important;
    margin: 0;
    padding: 0;
    overflow-y: auto !important; 
    overflow-x: auto !important; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e2e8f0;
    position: relative;
    background-color: #0a0a0a; /* Added a base background color */
}

/* Add overlay to body for consistent theming */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 50%, rgba(15, 23, 42, 0.92) 100%);
    backdrop-filter: blur(1px);
    z-index: 0;
    pointer-events: none;
}

/* Fullscreen Mode Styles */
.fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    overflow-y: auto !important;   
	overflow-x: hidden !important; 
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}

/* Live Bracket Hero Section (New Design) */
.live-bracket-hero {
    background-color: #0a0a0a; /* Dark background */
    padding-top: 5rem; /* Space for fixed header */
    padding-bottom: 2rem; /* Add some bottom padding for separation */
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2); /* Subtle border at the bottom of the whole hero */
}

.live-bracket-hero .container {
    /* Re-enable auto margins for centering the main content block */
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px; /* Keep the max-width from common.css */
    padding-bottom: 0; /* Remove bottom padding from container to allow controls to sit flush */
}

.live-bracket-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-align: center; /* Center the title */
}

.live-bracket-description {
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    text-align: center; /* Center the description */
}

/* Tournament Stats Bar (Reintroduced and Styled) */
.tournament-stats-bar-new {
    display: flex;
    align-items: center;
    /* Changed justify-content to space-around for equal spacing */
    justify-content: space-around; 
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1.5rem auto 2.5rem auto; /* Center with more margin top/bottom */
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1; /* Allow items to grow and shrink */
    justify-content: center; /* Center content within each item */
}

.stats-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #00bfff;
}

.stats-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.stats-label {
    font-size: 0.75rem;
    color: rgba(156, 163, 175, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-top: 0.25rem; /* Added margin to separate from the number */
}

.stats-divider {
    width: 1px;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    /* Reduced horizontal margin for dividers */
    margin: 0 1rem; 
}

/* Bracket Controls (Refined Styling) */
.bracket-controls-new {
    display: flex;
    justify-content: center; /* Center the toggle buttons */
    width: 100%; /* Take full width of its parent container */
    padding: 0 1rem; /* Match container padding */
    box-sizing: border-box; /* Include padding in width calculation */
    border-bottom: 2px solid var(--primary-blue); /* Full-width blue underline */
    padding-bottom: 0.5rem; /* Space between buttons and underline */
    margin-top: 1.5rem; /* Add space above controls */
}

.toggle-group-new {
    display: flex;
}

.toggle-btn-new {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.toggle-btn-new:hover {
    color: var(--primary-blue);
}

.toggle-btn-new.active {
    color: white;
    font-weight: 600;
}

/* No specific icon styling needed for new design */
.toggle-btn-new i {
    display: none;
}

/* ORIGINAL BRACKET CONTAINER STYLES - UNMODIFIED */
#react-bracket-root {
    position: relative;
    z-index: 1;
    min-height: 400px;
    min-width: 320px;
    width: fit-content;
    height: fit-content;
    transition: height 0.3s ease-in-out, min-height 0.3s ease-in-out, width 0.3s ease-in-out, min-width 0.3s ease-in-out;
    margin: 0 auto;
    overflow: hidden;
}

/* Loading state enhancement */
.loading-container {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .live-bracket-title {
        font-size: 2rem;
    }
    
    .live-bracket-description {
        font-size: 0.9rem;
    }

    .tournament-stats-bar-new {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .stats-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .bracket-controls-new {
        justify-content: center; /* Center on smaller screens */
    }
    
    .toggle-btn-new {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
.bracket-canvas {
  display: inline-block;         
  min-width: max-content;        
  min-height: max-content;       
}

