/* Basic Reset & Font Setup */
:root {
    --color-bg-primary: #0B0A1A; /* Very dark blue/purple */
    --color-bg-secondary: #141225; /* Darker container elements */
    --color-bg-container: #1A182E; /* Main app container, section backgrounds */
    --color-text-primary: #E0E0E0; /* Light grey for body text */
    --color-text-headings: #9694D3; /* Lavender for H1-H6 */
    --color-accent-primary: #9694D3; /* Lavender - main accent */
    --color-accent-secondary: #3D3B8A; /* Darker outline purple/blue - borders, subtle accents */
    --color-neon-blue: #00E5FF;   /* Bright Neon Blue */
    --color-neon-purple: #D45DFF; /* Bright Neon Purple/Pink */
    --color-neon-glow-blue: rgba(0, 229, 255, 0.7);
    --color-neon-glow-purple: rgba(212, 93, 255, 0.7);
    --color-text-alt: #b0b0b0; /* Alternative slightly darker text */
    --color-gold-highlight: #ffeb3b; /* For things like title names in summaries */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color-text-headings);
}


/* Application Container Styling */
#app-container {
    width: 1920px;
    height: 900px;
    background-color: var(--color-bg-container);
    border: 3px solid var(--color-accent-secondary);
    box-shadow: 0 0 15px var(--color-accent-secondary), 0 0 30px var(--color-neon-glow-blue);
    /* overflow-y: auto; <<< Let's try removing or changing this */
    overflow-y: hidden; /* If we want child elements to manage their own scroll exclusively */
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
	margin: auto;
}

body.portrait-mode-body #app-container {
    width: 1080px;
    height: 1920px; 
}


/* Basic Navigation and Content Area Styling */
#main-nav {
    background-color: var(--color-bg-secondary); 
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid var(--color-accent-primary); /* Changed from #bf360c */
}

#main-nav a { 
    color: var(--color-text-primary);
    margin: 0 15px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2em;
}

#main-nav a:hover {
    color: var(--color-neon-blue); 
}

#content-area {
    flex-grow: 1; 
    padding: 20px;
    overflow-y: auto;
	
}

/* --- Navigation Styling --- */
#main-nav a.active {
    color: var(--color-neon-blue); 
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Home Page General Styling --- */
.home-container {
    display: flex;
    flex-direction: column;
    gap: 30px; 
}

.home-section {
    background-color: var(--color-bg-secondary); 
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-accent-secondary); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.home-section h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--color-accent-primary); /* Changed from #bf360c */
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--color-text-headings); 
}

/* Recent Show Results Styling */
.recent-results .event-summary {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--color-accent-secondary);
}
.recent-results .event-summary:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.recent-results h3 { /* Event Name */
    color: var(--color-neon-blue); 
    margin-bottom: 5px;
}
.recent-results .event-meta {
    font-size: 0.9em;
    color: var(--color-text-alt);
    margin-bottom: 10px;
}
.recent-results .match-list-summary {
    list-style-type: none;
    padding-left: 0;
}
.recent-results .match-list-summary li {
    padding: 5px 0;
    font-size: 0.95em;
    color: var(--color-text-primary); /* General text for match summary */
}
.recent-results .match-list-summary li strong { /* Winner/Loser labels */
    color: var(--color-accent-primary); 
}
.recent-results .match-list-summary li em { /* For championship name */
    color: var(--color-gold-highlight); 
    font-style: italic;
}


/* Current Champions Styling */
.current-champions .champions-grid { 
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
}

.current-champions .champion-card {
    background-color: var(--color-bg-secondary);
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid var(--color-accent-primary); /* Changed from #bf360c */
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 15px; 
}

.current-champions .champion-card {
    background-color: var(--color-bg-secondary);
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid var(--color-accent-primary);
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 15px; 
}

/* Container for the belt image within the champion card */
.current-champions .title-image-container {
    width: 100px; /* Fixed width for the image area */
    height: 70px; /* Fixed height for the image area */
    flex-shrink: 0; /* Prevent container from shrinking */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px; /* Optional: rounded corners for container */
    overflow: hidden; /* If images are larger, they'll be clipped */
}

.current-champions .championship-belt-image {
    max-width: 100%;  /* Image will scale down to fit container width */
    max-height: 100%; /* Image will scale down to fit container height */
    object-fit: contain; /* Ensures entire image is visible, might leave empty space */
    /* or use object-fit: cover; if you want it to fill, possibly cropping */
}

.current-champions .champion-info {
    flex-grow: 1; 
}

.current-champions .champion-title-name { /* Championship Title itself */
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em; 
    color: var(--color-neon-blue); 
    margin-bottom: 5px;
}
.current-champions .champion-holder-name { /* Wrestler holding title */
    font-size: 1em; 
    color: var(--color-text-primary);
    margin-bottom: 3px;
}

.current-champions .champion-holder-name.vacant-title {
    color: var(--color-text-alt); /* Dimmer color for "VACANT" */
    font-style: italic;
    font-weight: bold;
}

.current-champions .champion-reign-info {
    font-size: 0.8em; 
    color: var(--color-text-alt);
}


/* Top Points Earners Table Styling */
.points-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.points-table th, .points-table td {
    border: 1px solid var(--color-accent-secondary); 
    padding: 10px 12px;
    text-align: left;
}
.points-table th {
    background-color: var(--color-bg-primary); /* Darker header for table */
    font-family: 'Orbitron', sans-serif;
    color: var(--color-neon-blue); 
}
.points-table tbody tr:nth-child(odd) {
    background-color: var(--color-bg-secondary); /* Use secondary for odd rows */
}
.points-table tbody tr:hover {
    background-color: var(--color-bg-container); /* Slightly lighter on hover */
}
.points-table td:first-child, .points-table td:nth-child(3) { 
    text-align: center;
}

/* --- Home Page - Top Points Earners Side-by-Side --- */
.top-points-container {
    display: flex; 
    flex-direction: row; 
    gap: 20px; 
    align-items: flex-start; 
}

.top-points-container > .home-section { 
    flex: 1; 
    min-width: 0; 
}


/* --- Roster Page Layout --- */
.roster-container {
    display: flex;
    height: 100%; 
    gap: 20px;
}

#roster-sidebar {
    width: 300px; 
    flex-shrink: 0; 
    background-color: var(--color-bg-secondary);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 2px solid var(--color-accent-primary); /* Changed from #bf360c */
}

#gsc-logo-sidebar {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    text-align: center;
    color: var(--color-neon-blue);
    padding: 10px 0;
    border-bottom: 1px solid var(--color-accent-secondary);
}

#roster-search {
    width: calc(100% - 20px); 
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary); /* Darker search input */
    color: var(--color-text-primary);
    font-size: 1em;
}
#roster-search::placeholder {
    color: var(--color-text-alt);
}

#roster-list {
    flex-grow: 1; 
    overflow-y: auto;
    border: 1px solid var(--color-accent-secondary);
    border-radius: 5px;
    background-color: var(--color-bg-primary); /* Darker list background */
}

.roster-list-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-accent-secondary);
    color: var(--color-text-alt);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.roster-list-item:last-child {
    border-bottom: none;
}
.roster-list-item:hover {
    background-color: var(--color-bg-container); /* Use app container bg for hover */
    color: var(--color-neon-blue);
}
.roster-list-item.selected {
    background-color: var(--color-accent-primary); /* Main accent for selected */
    color: var(--color-bg-primary); /* Dark text on light accent */
    font-weight: bold;
}


#wrestler-card-area {
    flex-grow: 1; 
    background-color: var(--color-bg-secondary); /* Matches section bg */
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto; 
}

.roster-prompt {
    text-align: center;
    font-size: 1.2em;
    color: var(--color-text-alt);
    margin-top: 50px;
}

/* --- Wrestler Card Styling --- */
.wrestler-card {
    background-color: var(--color-bg-container); /* Use main app bg for card itself */
    border-radius: 8px;
    padding: 10px;
	padding-bottom: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.wrestler-card-header {
    display: flex; /* Ensures left and right sides are in a row */
    gap: 20px;     /* Space between left (bio) and right (encounters) columns */
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-accent-primary);
    align-items: flex-start; /* Align items to the top if their heights differ */
}

/* Left column of the header (Image + Name/Bio) */
.wrestler-header-left {
    flex: 0 0 50%; /* Give it a fixed percentage, or use flex: 1 if you prefer dynamic sizing */
    /* Adjust this flex value based on how much space you want for bio vs encounters */
    display: flex; /* To layout image and name/bio within this column */
    flex-direction: row; /* Image on left, name/bio on right (or column if you prefer stacked) */
    gap: 20px; /* Space between image and name/bio block */
    min-width: 0; /* For flex item proper behavior */
}

.wrestler-header-left img {
    width: 180px; 
    height: 220px; 
    object-fit: cover; 
    border-radius: 8px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary); 
    flex-shrink: 0; /* Prevent image from shrinking if name/bio is long */
}

.wrestler-header-left .name-bio { 
    flex-grow: 1; /* Name/bio block takes remaining space in the left column */
    min-width: 0; /* For flex item proper behavior */
}

.wrestler-header-left .name-bio h2 { /* Wrestler Name */
    margin-top: 0;
    margin-bottom: 5px; /* Reduced margin */
    font-size: 2.2em; /* Slightly reduced if space is tight */
    color: var(--color-text-primary);
    text-shadow: 1px 1px 2px var(--color-bg-primary), 0 0 8px var(--color-neon-glow-blue), 0 0 12px var(--color-neon-blue);
    line-height: 1.1;
}

.wrestler-header-left .nickname {
    font-style: normal;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3em; /* Slightly reduced */
    margin-top: -5px;  /* Adjusted from -30px to be less extreme, fine-tune as needed */
    margin-bottom: 10px;
	color: var(--color-text-alt);
    text-shadow: 0 0 3px #fff, 0 0 5px var(--color-neon-purple);
    font-style: italic;
}

.wrestler-header-left .bio-stats p {
    margin: 3px 0; /* Reduced margin */
    font-size: 0.9em; /* Slightly reduced */
    color: var(--color-text-primary);
    line-height: 1.3;
}

.wrestler-header-left .bio-stats strong { 
    color: var(--color-accent-primary); 
}

/* Right column of the header (Last 5 Encounters) */
.wrestler-header-right.last-encounters-section {
    flex: 1; /* Takes up remaining space in the header row */
    padding-left: 10px; 
    border-left: 1px solid var(--color-accent-secondary); 
    min-width: 0; /* For flex item proper behavior */
    max-height: 300px; /* Approximate height of the image + some padding, to align scroll area */
    display: flex;
    flex-direction: column;
}

.last-encounters-list,
.full-encounters-list { /* <<< ADDED .full-encounters-list here */
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.8em; 
    line-height: 1.35;
    color: var(--color-text-alt);
    overflow-y: auto;  /* This will apply to the container of full-encounters-list too */
    flex-grow: 1;      /* This might only be relevant if the parent is flex */
}

.last-encounters-list li,
.full-encounters-list li { /* <<< ADDED .full-encounters-list li here */
    padding: 5px 0; 
    border-bottom: 1px dotted var(--color-accent-secondary);
}

.last-encounters-list li:last-child,
.full-encounters-list li:last-child { /* <<< ADDED .full-encounters-list li:last-child here */
    border-bottom: none;
}

.last-encounters-list li strong,
.full-encounters-list li strong { /* <<< ADDED .full-encounters-list li strong here */
    /* This styles the <strong> tag which includes the focus wrestler's name */
    /* And also the <strong> tag for the championshipHTML */
    /* If you want ONLY wrestler name in accent, and championship in gold, that's more complex */
    color: var(--color-accent-primary); 
}

.encounter-participant-name {
    color: var(--color-text-primary); /* Your desired color */
    font-weight: bold;
}



/* Ensure the championship name highlight is distinct if needed */
.championship-name-highlight { /* This class is on the <strong> for the title */
    font-weight: bold; 
    color: var(--color-gold-highlight) !important; /* !important was from your test, try removing it first */
}


/* Button Styling (Generic - can be used for View All and Return) */
.gsc-button {
    padding: 8px 15px;
    font-family: 'Orbitron', sans-serif;
    border: 1px solid var(--color-accent-primary);
    border-radius: 4px;
    background-color: var(--color-bg-secondary);
    color: var(--color-accent-primary);
    cursor: pointer;
    font-size: 0.9em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-top: 10px; /* Space above the button */
}

.gsc-button:hover {
    background-color: var(--color-accent-primary);
    color: var(--color-bg-secondary);
}

/* View All Encounters Button specific (if needed, or just use .gsc-button) */
#view-all-encounters-btn {
    display: block; /* Make it take full width of its container if desired */
    width: calc(100% - 20px); /* Example: full width with some padding if in a padded parent */
    margin: 15px auto 5px auto; /* Center it and give vertical margin */
    text-align: center;
}


/* Full Match History View */
#full-match-history-view {
    padding: 20px;
    background-color: var(--color-bg-primary); /* Or var(--color-bg-container) */
    height: 100%; /* Try to fill available space */
    overflow-y: auto; /* Scroll if history is very long */
    display: flex;
    flex-direction: column;
}

#full-match-history-view h2 {
    text-align: center;
    color: var(--color-neon-blue);
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-accent-secondary);
    padding-bottom: 10px;
}

#return-to-roster-btn {
    align-self: flex-start; /* Align to the left */
    margin-bottom: 20px;
}




.wrestler-card-section {
    margin-bottom: 15px;
}
.wrestler-card-section h3 { /* Section titles like "Championship History", "Stats" */
    font-size: 1.5em;
    color: var(--color-text-headings);
    border-bottom: 1px solid var(--color-accent-secondary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Dynamic Championship History on Roster Card */
.wrestler-card-section.title-highlights-section h3 { 
    font-size: 1.5em; 
    color: var(--color-text-headings);
    border-bottom: 1px solid var(--color-accent-secondary);
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-transform: uppercase; 
    letter-spacing: 1px;   
}

/* Your existing grid style (ensure it's called championship-history-grid if you changed the JS class name) 
   If you reverted JS to use title-highlights-grid, this is fine.
*/
.title-highlights-grid { /* Or .title-highlights-grid if you used that in JS */
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 0px; /* You had 0px gap */
}

/* Your existing item style, now also used for the dynamic items */
.title-highlight-item {
    background-color: var(--color-bg-secondary); 
    padding: 12px 15px; 
    border-radius: 5px; 
	border: 1px solid var(--color-accent-secondary);
    min-height: 40px; 
    display: flex; 
    align-items: center; /* Vertically center text and image */
    justify-content: space-between; /* Push image to one side, text to other */
}

.title-highlight-item.placeholder {
    background-color: transparent;
    border: 1px solid transparent; /* Or match item border if you want empty boxes */
}

/* Styling for the text part of the dynamic title item */
.title-highlight-item .title-text-dynamic {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Your previous font */
    font-size: 0.95em; /* Your previous font size */
    color: var(--color-text-primary); /* Your previous text color */
    text-align: left;
    flex-grow: 1; /* Allow text to take available space */
}

/* Styling for the inline belt image */
.title-highlight-item .history-belt-image-inline {
    height: 25px; /* Adjust for desired inline height */
    width: auto;  /* Maintain aspect ratio */
    max-width: 60px; /* Max width for the small inline image */
    object-fit: contain;
    margin-left: 10px; /* Space between text and image */
    flex-shrink: 0; /* Prevent image from shrinking */
}

/* Styling for the "CURRENT" tag (same as before) */
.current-champ-tag {
    color: var(--color-gold-highlight); 
    font-weight: bold;
    font-size: 0.85em; /* Relative to its parent's font size */
    margin-left: 5px; /* A little space before the tag */
}

.title-highlight-item.placeholder {
    background-color: transparent; /* Make it invisible */
    border: none;                 /* Remove border if any */
}


/* Stats Tabs Styling */
.stats-tabs .tab-buttons {
    display: static;
    gap: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--color-accent-secondary);
}
.stats-tabs .tab-button {
    padding: 5px 10px;
    cursor: pointer;
    background-color: var(--color-bg-primary); /* Darker bg for inactive tabs */
    color: var(--color-text-alt);
    border: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}
.stats-tabs .tab-button:hover {
    background-color: var(--color-accent-secondary); /* Darker accent on hover */
    color: var(--color-text-primary);
}
.stats-tabs .tab-button.active {
    background-color: var(--color-accent-primary); /* Main accent for active tab */
    color: var(--color-bg-primary); /* Dark text on light accent */
    border-bottom: 2px solid var(--color-accent-primary); 
    margin-bottom: -2px; 
}

.stats-pane {
    padding: 1px;
    background-color: var(--color-bg-secondary); /* Matches section bg */
    border-radius: 0 0 5px 5px; 
}

.stats-pane h4 { /* Record: W-L-D */
    margin-top: 0;
    color: var(--color-neon-blue); 
}
.stats-pane h5 { /* Records by Type: */
    color: var(--color-text-headings); 
    margin-top: 15px;
    margin-bottom: 5px;
}

/* Styles for stats-grid (new from previous step) */
.stats-pane .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 0px 20px; 
    margin-top: 10px;
}

.stats-pane .stat-item {
    background-color: var(--color-bg-primary); /* Darker items within the pane */
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--color-accent-secondary);
}

.stats-pane .stat-label {
    display: block;
    font-size: 0.8em;
    color: var(--color-accent-primary); 
    margin-bottom: 4px;
    font-weight: bold; 
}

.stats-pane .stat-value {
    display: block;
    font-size: 1.1em;
    color: var(--color-text-primary);
    font-family: 'Orbitron', sans-serif; 
    font-weight: bold; 
}


/* --- Matchup Maker Page Layout --- */
.matchup-container-layout {
    display: flex;
    height: 100%; 
    gap: 20px;
}

#matchup-sidebar {
    width: 250px; /* Slightly wider sidebar for more selectors */
    flex-shrink: 0; 
    background-color: var(--color-bg-secondary);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Increased gap */
    border-right: 2px solid var(--color-accent-primary);
    overflow-y: auto; /* Allow sidebar to scroll if many selectors */
}

#matchup-sidebar h2 {
    margin-top: 0;
    text-align: center;
    color: var(--color-neon-blue);
    border-bottom: 1px solid var(--color-accent-secondary);
    padding-bottom: 10px;
}
#matchup-sidebar h4 { /* For "Team 1", "Team 2" subheadings */
    margin-top: 15px;
    margin-bottom: 5px;
    color: var(--color-text-headings);
    font-size: 1.1em;
}


.matchup-form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column; /* Stack label above select */
}

.matchup-form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-accent-primary);
    font-size: 0.9em;
}

#matchup-sidebar select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.matchup-prompt { /* Same as roster-prompt */
    text-align: center;
    font-size: 1.2em;
    color: var(--color-text-alt);
    margin-top: 50px;
}

/* --- START OF CSS FOR MATCHUP MAKER - TALE OF THE TAPE AREA --- */

#tale-of-the-tape-area { 
    flex-grow: 1; 
    background-color: var(--color-bg-secondary); 
    padding: 15px; 
    border-radius: 8px;
    overflow-y: auto; 
    display: flex; /* Using flex to easily center the banner if it's narrower than full width */
    flex-direction: column; 
    align-items: center; /* Centers direct children like the banner and matchup-grid IF they have a defined width less than 100% */
}

/* New style for the Tale of the Tape Banner Image */
#tale-of-the-tape-banner-img {
    display: block; 
    margin: 0 auto 25px auto; /* Center horizontally, increased space below */
    max-width: 700px; /* Adjust max-width of the banner as desired */
    width: 100%;     
    height: 200px;    
    object-fit: fill; 
}

/* Main 3-column grid for competitor panels and stats center */
#matchup-display-grid {
    display: grid;
    grid-template-columns: 1fr minmax(400px, auto) 1fr; /* Wrestler1 | Stats (min 400px, auto grows) | Wrestler2 */
    align-items: flex-start; /* Align tops of panels/table */
    gap: 20px; /* Gap between panels and stats table */
    width: 100%;
    max-width: 1500px; /* Max width for the entire tape display grid */
    margin: 0 auto 20px auto; /* Center grid horizontally, space below */
}

/* Styling for the outer panels holding competitor/team info */
.matchup-competitor-outer-panel {
    /* background-color: var(--color-bg-container); -- Removed, content defines look */
    /* border: 1px solid var(--color-accent-secondary); -- Removed */
    /* border-radius: 8px; -- Removed */
    /* padding: 20px; -- Removed, content will have padding */
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    min-height: 380px; /* Base height, adjust as needed */
}

/* Singles Competitor Image */
.matchup-competitor-image-large { 
    width: 220px; 
    height: 280px; 
    object-fit: cover;
    border-radius: 8px; /* Rounded corners for the image itself */
    border: 3px solid var(--color-accent-primary); 
    margin-bottom: 15px;
    background-color: var(--color-bg-primary); 
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); /* Subtle neon blue glow */
}

/* Name for Singles Panels & Tag Team Main Competitors */
.matchup-competitor-main-name { 
    font-size: 1.8em;
    color: var(--color-text-primary); /* Changed to primary text color as per your roster card */
    text-shadow: 1px 1px 2px var(--color-bg-primary), 0 0 8px var(--color-neon-glow-blue), 0 0 12px var(--color-neon-blue);
    margin-top: 0; /* Reset top margin from h3 default */
    margin-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
    line-height: 1.2;
}

/* Nickname for Singles Panels */
.matchup-competitor-main-nickname { 
    font-family: 'Orbitron', sans-serif;
    color: var(--color-accent-secondary); /* Using accent-secondary as per your roster card change */
    font-size: 1.3em;
    margin-top: -5px;  
    margin-bottom: 10px; 
    text-shadow: 0 0 3px #fff, 0 0 7px var(--color-neon-purple), 0 0 10px var(--color-neon-purple);
    font-style: italic; /* Kept italic as it was in your roster card example */
}

/* Tag Team Specifics within .matchup-competitor-outer-panel */
.matchup-tag-member {
    margin-bottom: 15px; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.matchup-tag-member:last-child {
    margin-bottom: 0;
}

.matchup-competitor-image-square { /* For Tag Team members */
    width: 150px; 
    height: 150px;
    object-fit: cover;
    border-radius: 8px; /* Rounded corners */
    border: 2px solid var(--color-accent-secondary); 
    background-color: var(--color-bg-primary); 
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.2); /* Subtle glow */
}

.matchup-tag-member-name { /* Name for tag team members */
    font-size: 1.2em;
    color: var(--color-text-primary);
    font-weight: bold;
    margin-top: 8px; 
    margin-bottom: 3px;
    font-family: 'Orbitron', sans-serif; 
}

.matchup-tag-member-name.partner-name-above { 
    margin-bottom: 8px; 
    margin-top: 0;
}

.matchup-tag-team-stable-name {
    font-family: 'Orbitron', sans-serif;
    color: var(--color-accent-primary);
    font-size: 1em;
    font-style: italic;
    padding: 6px 10px; /* Added some horizontal padding */
    border-top: 1px dashed var(--color-accent-secondary);
    border-bottom: 1px dashed var(--color-accent-secondary);
    width: auto; /* Let content define width */
    min-width: 60%; /* Ensure it's not too narrow */
    max-width: 90%; /* Prevent it from being too wide */
    margin: 10px auto; 
    box-sizing: border-box;
}

/* Stats Center (#matchup-stats-center) */
#matchup-stats-center {
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding: 0; /* No padding on the center div itself, table will handle spacing */
    width: 100%; 
}

/* The Stats Table Itself */
#stats-table {
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 5px; /* Vertical gap between stat rows */
    table-layout: fixed; /* Important for defined column widths */
}

/* All table cells in the stats table */
#stats-table td { 
    padding: 8px 5px; /* Reduced padding slightly */
    vertical-align: middle;
    height: 42px; /* Consistent height for stat rows */
}

/* Middle Column: Stat Labels */
#stats-table .stat-label-col { 
    background-color: rgba(11, 10, 26, 0.6); /* Darker, less transparent overlay based on your primary BG */
    border-left: 2px solid var(--color-neon-blue);  
    border-right: 2px solid var(--color-neon-blue); 
    width: 180px; /* Fixed width for the label column */
    text-align: center; 
}

#stats-table .stat-label-col .stat-label { /* The <span> inside the label cell */
    font-family: 'Orbitron', sans-serif;
    color: var(--color-text-primary); 
    font-size: 0.85em; /* Slightly smaller for fitting */
    font-weight: bold;
    text-transform: uppercase;
    display: block; 
    padding: 4px 0; 
}

/* Left and Right Columns: Stat Values */
#stats-table .stat-value-col { 
    font-family: 'Orbitron', sans-serif; 
    color: var(--color-text-primary);
    font-size: 1.2em; /* Slightly smaller than roster card values for space */
    font-weight: bold;
    /* Width is implicitly determined by table-layout:fixed and label col width */
}

#stats-table .stat-value-left { 
    text-align: right; 
    padding-right: 15px; 
}

#stats-table .stat-value-right { 
    text-align: left; 
    padding-left: 15px; 
}

/* Header row for "INDIVIDUAL CHAMPIONSHIPS" in Tag Team stats */
#stats-table .stats-indiv-header-cell { 
    text-align: center;
    padding-top: 10px; /* Reduced space above */
    padding-bottom: 5px; /* Space below */
}
#stats-table .stats-indiv-header-cell h3 {
    font-size: 1em; /* Slightly smaller */
    color: var(--color-neon-purple);
    margin: 0;
    padding: 6px; 
    text-transform: uppercase;
    background-color: rgba(20, 18, 37, 0.5); /* Using secondary BG with alpha */
    border-radius: 4px;
}

/* Placeholder Divs if Wrestlers Not Selected (style as needed) */
.wrestler-info-placeholder {
    color: var(--color-text-alt);
    font-style: italic;
    padding: 20px;
    border: 2px dashed var(--color-accent-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 1.1em; /* Adjusted */
    box-sizing: border-box;
}
.wrestler-info-placeholder.singles-placeholder { 
    width: 220px;  
    height: 280px; 
}
.wrestler-info-placeholder.tag-placeholder { 
    width: 150px;  
    height: 150px;  
    font-size: 0.9em;
    padding: 10px;
}


/* --- RESULTS PAGE --- */

/* New rule to prepare the content area for a scrollable child */
#content-area.results-view {
    display: flex;
    flex-direction: column;
    padding: 0; /* Padding moved to the child scroll container */
}

#results-page-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Fix for flexbox scrolling bugs */
}

/* --- Results Page - Filter Controls Area (Simplified) --- */
#results-filter-controls {
    flex-shrink: 0; /* Prevent this bar from shrinking */
    padding: 10px 20px;
    border-bottom: 2px solid var(--color-accent-primary);
}

#reset-filters-btn-results { 
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.2s ease, color 0.2s ease;
    background-color: var(--color-text-alt);
    color: var(--color-bg-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    float: right;
}

#reset-filters-btn-results:hover {
    background-color: var(--color-text-primary);
}


/* --- THE SCROLLABLE GRID CONTAINER --- */
#results-grid-container {
    flex-grow: 1; /* Allows the grid container to take remaining vertical space */
    overflow: auto; /* THIS enables BOTH horizontal and vertical scrollbars */
    padding: 20px; /* Add padding here instead of on #content-area */
    background-color: var(--color-bg-primary); /* Background for the scrollable area */
}

#results-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em; /* Smaller font for more data visibility */
    min-width: 2800px; /* Force a min-width to trigger horizontal scrolling */
}

#results-data-table th, 
#results-data-table td {
    border: 1px solid var(--color-accent-secondary);
    padding: 6px 8px; /* Compact padding */
    text-align: left;
    vertical-align: top; 
    white-space: nowrap; /* Prevent text wrapping initially, relying on horizontal scroll */
}

/* Allow specific columns to wrap if necessary */
#results-data-table td:nth-child(7),  /* Winner(s) */
#results-data-table td:nth-child(8),  /* Loser(s) */
#results-data-table td:nth-child(9),  /* Draw */
#results-data-table td:nth-child(10), /* Match Type */
#results-data-table td:nth-child(11), /* Division */
#results-data-table td:nth-child(19) { /* Notes */
    white-space: normal;
}

#results-data-table td .clickable-filter {
    cursor: pointer;
}

#results-data-table td .clickable-filter:hover {
    text-decoration: underline;
    color: var(--color-neon-blue);
}

#results-data-table thead th {
    background-color: var(--color-bg-secondary); /* Header background */
    color: var(--color-neon-blue);
    font-family: 'Orbitron', sans-serif;
    position: sticky; 
    top: 0; 
    z-index: 10;
}

#results-data-table tbody tr:nth-child(even) { 
    background-color: var(--color-bg-secondary);
}

#results-data-table tbody tr:hover {
    background-color: var(--color-bg-container);
}

/* Specific column styling for better readability - PRESERVED FROM YOUR ORIGINAL */
#results-data-table td:nth-child(1), /* # */
#results-data-table td:nth-child(6) { /* Match # (per-show) */
    text-align: center;
    min-width: 40px;
}
#results-data-table td:nth-child(2) { /* Date */
    min-width: 90px;
}
#results-data-table td:nth-child(3) { /* Event */
    min-width: 150px;
    font-weight: bold; 
}
#results-data-table td:nth-child(7), /* Winner(s) */
#results-data-table td:nth-child(8), /* Loser(s) */
#results-data-table td:nth-child(9) { /* Draw */
    min-width: 200px; 
}
#results-data-table td:nth-child(10) { /* Match Type (Combined) */
    min-width: 180px;
}
#results-data-table td:nth-child(11) { /* Division */
    min-width: 200px;
}
#results-data-table td:nth-child(19) { /* Notes */
    min-width: 250px;
    white-space: pre-wrap; 
}

/* Boolean-like columns - PRESERVED FROM YOUR ORIGINAL */
#results-data-table td:nth-child(14), /* Title? */
#results-data-table td:nth-child(15), /* Decisive? */
#results-data-table td:nth-child(16), /* Defense? */
#results-data-table td:nth-child(17) { /* Retain? */
    text-align: center;
}

/* Points Columns - PRESERVED FROM YOUR ORIGINAL */
#results-data-table td:nth-child(20), /* Pts (Win) */
#results-data-table td:nth-child(21), /* Pts (Loss) */
#results-data-table td:nth-child(22) { /* Pts (Draw) */
    text-align: right;
    min-width: 60px;
}

#results-data-table tbody tr.admin-action-row {
    background-color: var(--color-accent-secondary) !important;
    color: var(--color-text-primary); 
    font-style: italic;
}

#results-data-table tbody tr.admin-action-row:hover {
    background-color: var(--color-accent-primary) !important;
}

/* --- Stream Tools Page - Stopwatch Section Styling --- */
#stopwatch-section {
    /* background-color: var(--color-bg-secondary); /* Already in .stream-tool-section */
    /* padding: 20px; */ /* Already in .stream-tool-section */
    /* border-radius: 8px; */ /* Already in .stream-tool-section */
    /* border: 1px solid var(--color-accent-secondary); */ /* Already in .stream-tool-section */
    text-align: center; /* Center the display and controls */
    margin-bottom: 30px; /* Add some space below the stopwatch section */
}

#stopwatch-section h3 {
    /* color: var(--color-text-headings); */ /* Base style */
    margin-bottom: 15px;
    font-size: 1.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--color-accent-secondary);
    padding-bottom: 10px;
}

#stopwatch-display {
    font-family: 'Orbitron', sans-serif; /* Digital-style font */
    font-size: 4.5em; /* Large display for timer */
    color: var(--color-text-primary); /* Neon blue for the timer text */
    background-color: rgba(0, 0, 0, 1); /* Dark, slightly transparent background */
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: inline-block; /* To fit content but allow centering */
    min-width: 300px; /* Ensure it has some base width */
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.3), /* Inner glow */
                0 0 15px rgba(0, 229, 255, 0.2);    /* Outer glow */
    border: 1px solid rgba(0, 229, 255, 0.2); /* Subtle border */
    text-shadow: 0 0 15px var(--color-bg-primary),
}

.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between buttons */
}

.stopwatch-controls .gsc-button { /* Targeting existing .gsc-button class for consistency */
    padding: 10px 20px; /* Adjust padding for these specific buttons */
    font-size: 1em;     /* Slightly larger button text */
    min-width: 100px;   /* Give buttons a consistent minimum width */
    border-width: 2px;
    /* Existing .gsc-button styles for background, color, hover will apply */
}

/* Specific styles for Start/Stop/Reset if needed, or use general .gsc-button */
#stopwatch-start {
    /* Example: border-color: var(--color-neon-blue); color: var(--color-neon-blue); */
}
#stopwatch-start:hover {
    /* background-color: var(--color-neon-blue); color: var(--color-bg-secondary); */
}

#stopwatch-stop {
    /* border-color: var(--color-neon-purple); color: var(--color-neon-purple); */
}
#stopwatch-stop:hover {
    /* background-color: var(--color-neon-purple); color: var(--color-bg-secondary); */
}

#stopwatch-reset {
    /* border-color: var(--color-text-alt); color: var(--color-text-alt); */
}
#stopwatch-reset:hover {
    /* background-color: var(--color-text-alt); color: var(--color-bg-primary); */
}

/* Disabled state for buttons */
.stopwatch-controls .gsc-button:disabled {
    background-color: var(--color-accent-secondary) !important;
    color: var(--color-text-alt) !important;
    border-color: var(--color-accent-secondary) !important;
    cursor: not-allowed;
    opacity: 0.6;
}




/* --- Stream Tools Page - Falls Counter Section --- */
#falls-counter-section {
    width: 90%; 
    max-width: 800px;
    /* General .stream-tool-section styles (background, padding, etc.) are assumed */
}

#falls-counter-section h3 { /* Title: "Match Falls Counter / Scoreboard" */
    /* Inherits from .stream-tool-section h3 */
}

.falls-counter-control-group { /* For competitor count select */
    margin-bottom: 20px; 
    display: flex;
    flex-direction: column;
    gap: 8px; 
}

.falls-counter-control-group label {
    font-size: 0.95em; 
    color: var(--color-accent-primary);
    font-weight: bold;
}

#competitor-count-select {
    padding: 10px 12px; 
    border-radius: 5px; 
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 1em; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%; 
    max-width: 350px; 
    box-sizing: border-box;
}

/* Area for Name Inputs and Team Selects */
#fc-name-inputs-area {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--color-accent-secondary);
}

.fc-inputs-grid {
    display: grid;
grid-template-columns: repeat(4, 1fr); /* Creates 4 equal-width columns */
    gap: 5px; /* Increased gap */
}

.fc-competitor-control-wrapper { /* Wraps one competitor's name input + team select */
    display: flex;
    flex-direction: column; 
    gap: 12px; /* Space between name group and team group */
    padding: 15px;
    background-color: rgba(11, 10, 26, 0.3); /* Slightly darker than section bg */
    border: 1px solid var(--color-accent-secondary);
    border-radius: 6px;
}

.fc-competitor-input-group { /* For name label + input + suggestions */
    display: flex;
    flex-direction: column;
    gap: 6px; 
    position: relative; 
}
.fc-competitor-input-group label {
    font-size: 0.9em; 
    color: var(--color-text-alt); 
}

#fc-name-inputs-area input[type="text"] { 
    padding: 10px 12px;
    border-radius: 5px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 1em;
    width: 100%; 
    box-sizing: border-box; 
}

.fc-team-select-group { /* For team label + select */
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.fc-team-select-group label {
    font-size: 0.9em;
    color: var(--color-text-alt);
}
/* Select elements within fc-team-select-group or falls-counter-section directly */
#falls-counter-section select:not(#competitor-count-select) { 
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    width: 100%; 
    box-sizing: border-box;
}


.fc-suggestions-dropdown { /* Autocomplete dropdown */
    position: absolute; top: 100%; left: 0; right: 0;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-accent-secondary); border-top: none; 
    border-radius: 0 0 4px 4px; z-index: 100; 
    max-height: 150px; overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.fc-suggestion-item { padding: 8px 10px; color: var(--color-text-primary); cursor: pointer; font-size: 0.9em; }
.fc-suggestion-item:hover { background-color: var(--color-accent-secondary); color: var(--color-neon-blue); }

/* Scoreboard Display Area (The Horizontal Bar ITSELF for NAMES) */
#fc-scoreboard-display-area {
    background-color: rgba(11, 10, 26, 0.85); 
    color: var(--color-text-primary);
    padding: 8px 10px; 
    margin-top: 25px; 
    border-top: 3px solid var(--color-neon-blue);   
    border-bottom: 3px solid var(--color-neon-blue); /* Or maybe just top for visual separation */
    box-shadow: 0 0 12px var(--color-neon-glow-blue); 
    min-height: 50px; /* Adjust based on one or two lines of names */
    display: flex; 
    justify-content: center; 
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    width: 100%; 
    box-sizing: border-box;
    border-radius: 6px; 
	align-items: stretch;
}

/* NEW: Falls Control Button Bar */
#fc-falls-button-bar {
    display: flex; /* Will contain .fc-competitors-outer-container for buttons */
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 5px 0; /* Some padding */
    margin-top: 3px; /* Space below the name bar */
    box-sizing: border-box;
    /* No main background/border, as individual controls will have borders */
}

/* Wrapper for content INSIDE the scoreboard bar (names) */
.fc-scoreboard-content-wrapper { /* This holds the .fc-competitors-outer-container for names */
    width: 100%;
    display: flex; 
	/* justify-content: center; /* Let fc-competitors-outer-container handle this */
    /* align-items: center; */}

/* Outer container for rows (used for both names and buttons) */
.fc-competitors-outer-container {
    display: flex;
    flex-direction: column; 
    align-items: stretch; 
    width: 100%;
    gap: 3px; /* Small gap between rows if they exist */
}

/* Styling for each row (used for both names and buttons) */
.fc-scoreboard-row {
    display: flex;
    justify-content: space-around; 
    align-items: stretch; /* Make items in row same height if possible */
    width: 100%; 
}

/* Wrapper for each competitor's NAME in the scoreboard */
.fc-competitor-display-item-wrapper { 
    padding: 5px 8px; 
    margin: 0 2px; /* Only horizontal margin for name items */
    text-align: center;
    flex-grow: 1; 
    flex-basis: 0; 
    min-width: 100px; 
    display: flex; /* To center name text vertically */
    align-items: center;
    justify-content: center;
    /* Removed border from here, will be on control items instead */
}

.fc-name-falls-inner-container {
    display: flex;
    align-items: center; /* Align name and falls count on their baseline or center */
    justify-content: center;
    gap: 8px;


.fc-competitor-name-display { /* Actual name text */
    font-size: 1.1em; 
    font-weight: bold;
    color: var(--color-text-primary);
    white-space: normal; /* Allow <br> from JS */
    overflow: hidden;    
    text-overflow: ellipsis; 
    max-width: 180px; /* Adjust if needed */
    line-height: 1.2; /* For two-line names */
}

/* Placeholder text for empty name slots in the scoreboard */
.fc-competitor-display-item-wrapper.empty-slot .fc-competitor-name-display, 
.fc-competitor-name-display.empty-slot-text { 
    color: var(--color-text-alt);
    font-style: italic;
    font-size: 0.9em;
    font-weight: normal;
}

.fc-falls-count-display {
    font-size: 1.1em; /* Match name display or slightly smaller */
    color: var(--color-gold-highlight);
    font-weight: bold;
    min-width: 20px; /* Space for up to 2 digits */
    text-align: center;


/* NEW: Wrapper for each competitor's +/-/count CONTROLS in the button bar */
.fc-competitor-control-item-wrapper {
    padding: 5px;
    margin: 0 2px; /* Only horizontal margin */
    text-align: center;
    flex-grow: 1;
    flex-basis: 0;
    min-width: 100px;
	height: 38px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-secondary); /* Give controls a slight background */
    border-radius: 4px;
    display: flex;
    justify-content: center; /* Center the .fc-falls-controls div */
}

.fc-competitor-control-item-wrapper:empty, /* If no buttons due to fcShowFalls=false */
.fc-competitor-control-item-wrapper > div:empty { /* If .fc-falls-controls is empty */
    border: 1px solid transparent; /* Make empty slots less visually obtrusive */
    background-color: transparent;
}



.fc-falls-controls { /* Container for just - and + buttons now */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out - and + buttons */
    gap: 10px; 
    width: 100%; /* Fill the control wrapper */
    max-width: 70px; /* Constrain width of buttons area */
}

.fc-falls-count { /* The number '0' */
    font-size: 1.2em; 
    color: var(--color-gold-highlight);
    font-weight: bold;
    min-width: 25px; 
    text-align: center;
    padding: 2px 5px;
    background-color: rgba(0,0,0,0.3); /* Darker background for count */
    border-radius: 3px;
}

.fc-fall-button { /* +/- buttons */
    background-color: var(--color-accent-secondary);
    color: var(--color-text-primary);
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1em; 
    font-weight: bold;
    width: 28px;  
    height: 28px; 
    line-height: 28px; 
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.fc-fall-button:hover {
    background-color: var(--color-accent-primary);
    color: var(--color-bg-secondary);
}
.fc-fall-button:active {
    background-color: var(--color-neon-blue);
}


/* --- Stream Tools Page - Twitch Chat Section --- */
#twitch-chat-section {
    /* .stream-tool-section base styles apply */
}

#twitch-chat-section h3 {
    /* Inherits from .stream-tool-section h3 */
}

.twitch-control-group {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    align-items: flex-end; /* Align items with button baseline */
    gap: 10px;
    margin-bottom: 15px;
}

.twitch-control-group label {
    font-size: 0.9em;
    color: var(--color-accent-primary);
    font-weight: bold;
    margin-right: 5px; /* Space between label and input */
    align-self: center; /* Vertically align label with input */
}

#twitch-channel-name {
    flex-grow: 1; /* Allow input to take available space */
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-accent-secondary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    min-width: 150px; /* Minimum width */
}

#twitch-connect-btn,
#twitch-disconnect-btn {
    /* .gsc-button styles will apply */
    padding: 8px 12px; /* Slightly smaller padding for these specific buttons */
}

#twitch-chat-status {
    font-size: 0.85em;
    color: var(--color-text-alt);
    min-height: 1.5em; /* Reserve space for status message */
    text-align: center; /* Center status message in its section */
    padding: 5px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
}

/* --- Twitch Chat Bar Overlay  --- */
/* --- Twitch Chat Bar Overlay --- */
/* This is the main container for the chat bar within the Stream Tools page. */
/* It is NOT position:fixed; it's a normal block element in the page flow. */
#twitch-chat-bar-display {
    width: 100%; /* Takes full width of its parent in the Stream Tools section */
    height: 50px; !important; /* Fixed height for a single line of chat + padding */
    background-color: rgba(11, 10, 26, 0.9);
    color: var(--color-text-primary);
    border-top: 2px solid var(--color-neon-purple);
    border-bottom: 2px solid var(--color-neon-purple); /* Added for symmetry */
    box-shadow: 0 0 10px var(--color-neon-glow-purple);
    z-index: 100; /* If it needs to be above other elements within its section */
    display: flex;
    align-items: center; /* Vertically center #twitch-chat-content */
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden !important; /* CRITICAL: Hides content that scrolls out of view */
}

/* This is the inner container that will hold and scroll the messages. */
#twitch-chat-content {
    display: flex;          /* Makes its children (message items) arrange in a row */
    flex-direction: row;    /* Ensure horizontal layout */
    flex-wrap: nowrap !important; /* CRITICAL: Prevents items from wrapping to next line */
    white-space: nowrap !important; /* CRITICAL: Prevents text within from wrapping, forces a single long line */
    height: 100%;           /* Makes this content area fill the height of the parent bar */
    align-items: center;    /* Vertically centers the line of messages within this content div */
    position: relative;     /* For transform-based scrolling */
    transform: translateX(0px); /* Initial position */
    /* DO NOT set a width here, let it expand with its content */
}

/* Placeholder text style */
.chat-bar-placeholder {
    color: #777;
    font-style: italic;
    width: 100%;
    text-align: center;
    line-height: 35px; /* Match bar height for vertical centering */
    padding: 0 10px;   /* Some padding */
    box-sizing: border-box;
}


/* Individual message items */
.chat-message-item {
    padding: 0 8px;         /* Spacing BETWEEN messages */
    margin: 0;              /* No margins on the items themselves */
    flex-shrink: 0;         /* CRITICAL: Messages do not shrink to fit parent */
    white-space: nowrap;    /* CRITICAL: Text WITHIN a message does not wrap */
    display: inline-flex;   /* Allows vertical alignment of content within each message span */
    align-items: center;    /* Vertically center text inside the item */
    height: 100%;           /* Make message items take full height of the content line */
    font-size: 0.9em;
    line-height: 1.3;       /* Adjust as needed for your font */
}

/* If you are using the more complex .chat-message-item with internal spans for badges/username: */
.chat-badge {
    margin-right: 4px;
    font-weight: bold;
    color: var(--color-accent-primary);
    flex-shrink: 0;
}

.chat-username {
    font-weight: bold;
    margin-right: 3px;
    flex-shrink: 0;
}

.chat-message-text {
    /* No specific white-space needed here if parent .chat-message-item has nowrap */
}


/* --- Clickable Title on Champion Card --- */
.champion-title-name.clickable-title {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--color-accent-secondary);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.champion-title-name.clickable-title:hover {
    color: var(--color-neon-purple);
    text-decoration-color: var(--color-neon-purple);
}


/* --- Championship Detail Page (Corrected Layout) --- */
.championship-detail-layout {
    display: flex;
    flex-direction: column; /* Stack header on top of columns */
    height: 100%; /* CRITICAL: Fill the parent #content-area */
    gap: 15px;
}

.detail-header {
    flex-shrink: 0; /* Prevent the header from shrinking */
    text-align: center; /* Center the H1 text */
    border-bottom: 2px solid var(--color-accent-primary);
    padding-bottom: 10px;
}

.detail-header h1 {
    margin: 0;
    font-size: 2.2em;
    color: var(--color-neon-blue);
}

.detail-columns {
    flex-grow: 1; /* CRITICAL: Make this container take all available vertical space */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    min-height: 0; /* Prevents flexbox overflow bugs */
}

.detail-column-left,
.detail-column-right {
    background-color: var(--color-bg-secondary);
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto; /* CRITICAL: The columns themselves now scroll, not the page */
}

.championship-image-container {
    background-color: var(--color-bg-primary);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.championship-belt-image-large {
    display: block;
    margin: 0 auto; /* This centers the image */
    max-width: 50%;  /* This correctly sizes the image */
    height: auto;
    object-fit: contain;
}

.detail-section h3 {
    color: var(--color-text-headings);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-accent-secondary);
}

.reign-history-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.reign-item {
    padding: 8px 5px;
    font-size: 0.95em;
    border-bottom: 1px dotted var(--color-accent-secondary);
}

.reign-item:last-child {
    border-bottom: none;
}

.reign-item strong {
    color: var(--color-accent-primary);
}



/* Remove old .stats-pane ul styling if it was for the previous list format */
.stats-pane ul { 
   /* Ensure this is removed or does not conflict if you had specific styling for a UL previously */
   display: none; /* If you still have the old <ul> in HTML and want to hide it */
}
.stats-pane li { 
   display: none; /* If you still have the old <li> in HTML and want to hide them */
}

.stats-pane .stat-item.transparent-placeholder {
    background-color: transparent;
    border: none;
    box-shadow: none; /* Remove any inherited shadow */
}

