:root {
    /* Professional Color Palette */
    --primary-dark: #1a1a2e;
    --primary-blue: #16213e;
    --theme-blue: #007bff;
    --accent-gold: #e94560;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #95a5a6;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --border-color: #e9ecef;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --green-color: #28a745;
    
    /* Professional Typography */
    --font-primary: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Spacing and Layout */
    --header-height: 70px;
    --sidebar-width: 280px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.2);
    
    /* Chess Board Colors - Clean and efficient */
    --chess-light-square: #d4c4a8;
    --chess-dark-square: #2a2a3e;
    --chess-selected: #28a745;
    --chess-move-from: #1e7e34;
    --chess-move-to: #28a745;
    --coord-color: #999;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 14px;
    font-weight: 400; /* Regular */
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700; /* Bold */
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 2.5rem;
    font-weight: 700; /* Bold */
    color: var(--primary-dark);
}

.section-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.25rem;
    font-weight: 700; /* Bold */
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Logo Styling with Animated Ivory/Marble Gradient */
.logo-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900; /* Black weight for brand elements */
    letter-spacing: 0.5px;
    
    /* Animated gradient with ivory dominant flow */
    background: linear-gradient(
        90deg,
        #f8f6f0,  /* Warm ivory */
        #f8f6f0,  /* Warm ivory */
        #e94560,  /* Red accent */
        #16213e,  /* Theme dark blue */
        #f8f6f0   /* Warm ivory */
    );
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* Slower flowing animation */
    animation: gradientFlow 8s ease-in-out infinite;
}

/* Keyframes for smooth gradient animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Fallback for browsers that don't support gradient text */
@supports not (-webkit-background-clip: text) {
    .logo-text {
        color: #f8f6f0;
    }
}

/* Brand Font Weight Hierarchy */
.fw-bold, .font-weight-bold, strong, b {
    font-family: 'Source Sans Pro', sans-serif !important;
    font-weight: 700 !important; /* Bold for emphasis */
}

.navbar-brand {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 900; /* Black for brand elements */
}

.btn {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600; /* Semi-bold for buttons */
}

.nav-link {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400; /* Regular for navigation */
}

.form-label, label {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600; /* Semi-bold for form labels */
}

.badge {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600; /* Semi-bold for badges */
}

.card-title {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 700; /* Bold for card titles */
}

.lead {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400; /* Regular for lead text */
}

/* Light and Extra Light Weight Applications */
.text-muted, .muted {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for muted/secondary text */
}

.text-secondary {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for secondary information */
}

.small, small {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for small text */
}

.form-text, .form-control::placeholder {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for helper text and placeholders */
}

.breadcrumb {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for breadcrumb navigation */
}

.caption, .figure-caption {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for captions */
}

.timestamp, .meta-info {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for timestamps and meta information */
}

.stats-label, .stats-secondary {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 200; /* Extra Light for very subtle statistical labels */
}

.watermark, .background-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 200; /* Extra Light for background/watermark text */
}

.table thead th {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600; /* Semi-bold for table headers */
}

.table tbody td {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400; /* Regular for table data */
}

.table .text-muted {
    font-weight: 300; /* Light for muted table content */
}

.footer {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300; /* Light for footer content */
}

.footer h5 {
    font-weight: 700; /* Bold for footer headings */
}

.copyright {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 200; /* Extra Light for copyright text */
}

/* Navigation */
.navbar {
    background-color: var(--primary-dark) !important;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
    height: var(--header-height);
}

/* Mobile navbar collapse background */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--primary-dark) !important;
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-gold) !important;
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* Main Content */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding-bottom: 2rem;
}

/* Cards and Containers */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.btn-accent:hover {
    background-color: #d73851;
    border-color: #d73851;
    color: white;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}


.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="chess" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><rect x="0" y="0" width="5" height="5" fill="rgba(255,255,255,0.02)"/><rect x="5" y="5" width="5" height="5" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23chess)"/></svg>');
    opacity: 0.15;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        -45deg,
        transparent 40%,
        rgba(255, 223, 102, 0.025) 47%,
        rgba(255, 255, 255, 0.035) 50%,
        rgba(255, 223, 102, 0.025) 53%,
        transparent 60%
    );
    animation: subtleFlowingLight 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

@keyframes subtleFlowingLight {
    0% {
        transform: translateX(50%) translateY(50%) rotate(-45deg);
        opacity: 0;
    }
    11% {
        opacity: 0.6;
    }
    89% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(-100%) translateY(-100%) rotate(-45deg);
        opacity: 0;
    }
}

/* Glassmorphism and Modern UI Components */
.glassmorphism-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glassmorphism-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.gradient-icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3);
}

.gradient-badge {
    background: linear-gradient(135deg, var(--accent-color), #ff6b35);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
}

/* Homepage Button Styles */
.btn-outline-accent {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(255, 193, 7, 0.1);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.btn-outline-accent:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.4);
    transform: translateY(-2px);
}

/* Fix spacing issues */
body {
    margin: 0;
    padding: 0;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Homepage section spacing fixes */
.cta-section {
    margin-bottom: 0 !important;
    padding-bottom: 3rem !important;
}


.hero-content {
    position: relative;
    z-index: 3;
}

.text-accent {
    color: var(--accent-gold) !important;
}

.hero-stats .stat-item {
    padding: 0.5rem;
}

.hero-stats h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

/* Tournament Cards */
.tournament-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.tournament-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-gold);
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-blue));
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.5rem 0;
}

.tournament-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    margin-right: 1rem;
}

.prize-pool {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-gold);
    background: linear-gradient(135deg, var(--accent-gold), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(233, 69, 96, 0.1);
}

.tournament-info {
    padding: 0 1.5rem;
}

.tournament-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tournament-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item i {
    width: 16px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Dashboard Styles */
.dashboard-container {
    padding: 2rem 0;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.section-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-content {
    padding: 1rem 1.5rem 1.5rem;
}

/* Tournament List Styles */
.tournament-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tournament-item:last-child {
    border-bottom: none;
}

.tournament-info {
    flex: 1;
}

.tournament-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.meta-item i {
    margin-right: 0.25rem;
}

.tournament-actions {
    margin-left: 1rem;
}

/* Game Styles */
.game-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.game-item:last-child {
    border-bottom: none;
}

/* Alternating game card backgrounds */
.game-item.game-odd {
    background-color: #f8f9fa !important;
}

.game-item.game-even {
    background-color: #ffffff !important;
}

/* Fix games search bar layout */
#gameSearch {
    flex: 1;
    border-left: 0;
    border-right: 0;
}

.games-card .input-group .input-group-text {
    border-right: 0;
    background-color: #f8f9fa;
}

.games-card .input-group .btn {
    border-left: 0;
}

.game-players {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player {
    font-size: 0.9rem;
}

.player-name {
    font-weight: 500;
}

.player-rating {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.game-vs {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.result-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.result-white {
    background: var(--success-color);
    color: white;
}

.result-black {
    background: var(--text-primary);
    color: white;
}

.result-draw {
    background: var(--text-secondary);
    color: white;
}

.result-ongoing {
    background: var(--info-color);
    color: white;
}

/* Chess Board Styles */
.chess-board-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.player-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 48px;
    height: 48px;
    background: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.player-details {
    text-align: center;
}

.player-name {
    font-weight: 600;
    font-size: 1rem;
}

.player-rating {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-display {
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
}

.game-status-display {
    text-align: center;
}

.status-indicator {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.status-active {
    background: var(--success-color);
    color: white;
}

.status-completed {
    background: var(--text-primary);
    color: white;
}

.status-waiting {
    background: var(--warning-color);
    color: var(--text-primary);
}

/* Main Game Clocks Above Board */
.main-clocks-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto 20px auto;
    padding: 0 20px;
    max-width: 600px;
    width: 100%;
}

.main-clock-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-clock-card .time-display {
    font-size: 24px !important;
    min-width: 90px;
    text-align: center;
}

/* Chess Board Optimized Classes */
.chess-board-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* Base chess square styling - replaces 15+ inline style assignments */
.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.2s ease;
}

/* Clean chess square base colors */
.chess-square-light {
    background-color: var(--chess-light-square);
}

.chess-square-dark {
    background-color: var(--chess-dark-square);
}

/* Chess square interaction states - replaces all inline style pollution */
.chess-square-selected {
    background-color: var(--chess-selected) !important;
}

.chess-square-move-from {
    background-color: var(--chess-move-from) !important;
}

.chess-square-move-to {
    background-color: var(--chess-move-to) !important;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 15%, transparent 15%), radial-gradient(circle, rgba(255,255,255,0.3) 15%, transparent 15%) !important;
    background-size: 4px 4px !important;
    background-position: 0 0, 2px 2px !important;
}

/* Coordinate label styling */
.chess-coord-label {
    position: absolute;
    font-size: 14px;
    color: var(--coord-color);
    font-weight: bold;
    text-align: center;
    pointer-events: none;
}

@media (max-width: 768px) {
    .chess-coord-label {
        font-size: 12px;
    }
}

/* Optimized piece animation classes */
.chess-piece-animated {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chess-piece-fast-move {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chess-piece-slow-move {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), filter 0.8s ease;
    filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.3));
}

.chess-piece-lifted {
    transform: scale(1.2);
    filter: drop-shadow(0px 12px 20px rgba(0,0,0,0.5));
}

.chess-piece-settled {
    transform: scale(1);
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.2));
}

/* Legacy - will be removed after JS refactor */
.chess-board {
    width: 560px;
    height: 560px;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Game Sidebar */
.game-sidebar {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.game-info-card,
.move-history-card,
.game-chat-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.game-info-card:last-child,
.move-history-card:last-child,
.game-chat-card:last-child {
    margin-bottom: 0;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.move-history {
    max-height: 300px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.system-message {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

/* Tournament Detail Styles */
.tournament-detail-container {
    padding: 2rem 0;
}

.tournament-header-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tournament-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.tournament-status-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.badge-pending {
    background: var(--warning-color);
    color: var(--text-primary);
}

.badge-active {
    background: var(--success-color);
}

.badge-completed {
    background: var(--text-primary);
}

.prize-pool-display {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.prize-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.prize-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.tournament-info-card,
.prize-distribution-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.prize-structure {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prize-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.prize-1st {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5cc 100%);
}

.prize-2nd {
    border-left-color: #c0c0c0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.prize-3rd {
    border-left-color: #cd7f32;
    background: linear-gradient(135deg, #fdf6f0 0%, #f8e9d9 100%);
}

.prize-position {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.prize-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.prize-percentage {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.prize-winner-name {
    font-size: 1.1rem;
    margin: 8px 0;
    color: var(--text-primary);
    font-weight: 600;
}

/* Tournament Bracket Collapsible */
.round-section {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.round-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.round-header:hover {
    background: #e9ecef;
}

.round-title {
    color: var(--text-primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.round-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.round-content.show {
    max-height: 2000px;
    padding: 1rem 1.5rem;
    transition: max-height 0.5s ease-in, padding 0.3s ease;
}

.matches-grid {
    display: grid;
    gap: 0.75rem;
}

.match-card {
    background: white;
    transition: all 0.2s ease;
}

.match-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.match-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.player-row.winner {
    font-weight: 600;
    color: var(--accent-gold);
}

/* Registration Card */
.registration-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.registration-status {
    text-align: center;
    padding: 2rem 1rem;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.registration-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.balance-check {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.balance-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.balance-status.sufficient {
    color: var(--success-color);
}

.balance-status.insufficient {
    color: var(--danger-color);
}

/* Games Card */
.games-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.games-list {
    max-height: 600px;
    overflow-y: auto;
}

.game-item {
    transition: all 0.2s ease;
}

.game-item:hover {
    box-shadow: var(--shadow-sm);
}

/* Participants Card */
.participants-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.participants-list {
    max-height: 400px;
    overflow-y: auto;
}

.participant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.participant-item:last-child {
    border-bottom: none;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.participant-avatar-small {
    width: 32px;
    height: 32px;
    background: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.participant-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.participant-rating {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.participant-country {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Participant Search and Sort Styles */
.participant-search {
    position: relative;
}

.participant-search .input-group-text {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.participant-search .form-control {
    border-color: var(--border-color);
    font-size: 0.9rem;
}

.participant-search .form-control:focus {
    border-color: var(--theme-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.sort-controls .btn-group {
    box-shadow: var(--shadow-sm);
}

.sort-controls .btn-check:checked + .btn-outline-primary {
    background-color: var(--theme-blue);
    border-color: var(--theme-blue);
    color: white;
}

.sort-controls .btn-outline-primary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.sort-controls .btn-outline-primary:hover {
    background-color: var(--bg-light);
    border-color: var(--theme-blue);
    color: var(--theme-blue);
}

.participant-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.participant-controls .btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.participant-controls .btn:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

/* Participant item transitions for filtering */
.participant-item {
    transition: all 0.3s ease;
}

.participant-item[style*="display: none"] {
    opacity: 0;
    transform: translateY(-10px);
}

/* Green Room Sidebar Styles */
.online-players-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    max-height: 600px;
    overflow: hidden;
}

.player-toggle {
    display: flex;
    background: var(--bg-light);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.toggle-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.sidebar-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.sidebar-content {
    max-height: 500px;
    overflow-y: auto;
}

.online-players-list {
    padding: 0;
}

.player-card-compact {
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-card-compact:hover {
    background: var(--bg-light);
}

.player-card-compact.expanded {
    background: #f8f9fa;
}

.player-compact {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.player-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.player-avatar-small i {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.player-basic-info {
    flex: 1;
}

.player-name-small {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.player-rating-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.player-expand-icon {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.player-details {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    background: white;
}

.player-info-expanded .player-username {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.player-demographics {
    margin-bottom: 1rem;
}

.demographic-item {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.player-ratings-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.rating-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.rating-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.player-badges {
    margin-bottom: 1rem;
}

.player-badges .badge {
    font-size: 0.7rem;
    margin-right: 0.25rem;
}

.player-actions {
    text-align: center;
}

.player-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

/* Player Filter Styles */
.filter-section-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.filter-actions {
    margin-top: 1rem;
}

.filter-summary {
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary);
}

.filter-summary .btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.filter-summary .btn-link:hover {
    text-decoration: underline;
}

.section-card .form-control,
.section-card .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.section-card .form-control:focus,
.section-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

.section-card .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Leaderboard Styles */
.leaderboard-container {
    padding: 2rem 0;
}

.podium-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
    padding: 3rem 0;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.podium-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.podium-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.podium-first {
    border: 3px solid #ffd700;
    transform: scale(1.05);
}

.podium-second {
    border: 3px solid #c0c0c0;
}

.podium-third {
    border: 3px solid #cd7f32;
}

.podium-rank {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-number {
    font-weight: 700;
    font-size: 1.1rem;
}

.text-gold { color: #ffd700; }
.text-silver { color: #c0c0c0; }
.text-bronze { color: #cd7f32; }

.player-avatar.champion {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    transform: scale(1.1);
}

.leaderboard-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background: var(--bg-light);
    border-top: none;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

.player-row {
    transition: all 0.3s ease;
}

.player-row:hover {
    background: var(--bg-light);
}

.player-row.current-user {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    font-weight: 500;
}

.rank-display {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.rank-number {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.player-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    background: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.country {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fide-badge {
    background: var(--info-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.fide-rating {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.games-summary {
    text-align: center;
}

.games-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.games-breakdown {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.25rem;
}

.wins { color: var(--success-color); font-size: 0.8rem; }
.losses { color: var(--danger-color); font-size: 0.8rem; }
.draws { color: var(--text-secondary); font-size: 0.8rem; }

.winrate-display {
    text-align: center;
}

.winrate-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.winrate-bar {
    width: 60px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0.25rem auto 0;
    overflow: hidden;
}

.winrate-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, var(--warning-color) 50%, var(--danger-color) 100%);
    transition: width 0.3s ease;
}

.winnings-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-online {
    color: var(--success-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-recent {
    color: var(--warning-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-offline {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Profile Styles */
.profile-container {
    padding: 2rem 0;
}

.profile-header {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.profile-name,
.profile-name-public {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.profile-username {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tournament-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tournament-history-item:last-child {
    border-bottom: none;
}

.position-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.prize-won {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.transaction-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
}

.amount-positive {
    color: var(--success-color);
}

.amount-negative {
    color: var(--danger-color);
}

/* Auth Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.input-group-text {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.form-control {
    border-color: var(--border-color);
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}

/* Tournament Creation */
.create-tournament-container {
    padding: 2rem 0;
}

.form-card {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Tournament Requirements */
.requirement-badge {
    display: inline-block;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.requirement-badge i {
    margin-right: 0.25rem;
}

.time-control-preview {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-gold);
}

/* Form Section Styling */
.section-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
    color: var(--accent-gold);
}

/* Notification Styles */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.notification-item:hover {
    background-color: var(--bg-light);
}

.notification-unread {
    background-color: rgba(233, 69, 96, 0.05);
    border-left: 3px solid var(--accent-gold);
}

.notification-content {
    display: flex;
    flex-grow: 1;
    align-items: flex-start;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
}

.notification-body {
    flex-grow: 1;
}

.notification-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-message {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.875rem;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 1rem;
}

/* Tournament Filters */
.tournament-filters {
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border-radius: calc(var(--border-radius) - 2px);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-light);
    text-decoration: none;
}

.filter-tab.active {
    background: var(--accent-gold);
    color: white;
}

/* Sit and Go tab styling */
.sit-and-go-tab {
    background: var(--primary-blue) !important;
    color: white !important;
    min-width: 140px !important;
    text-align: center !important;
}

.sit-and-go-tab:hover {
    background: #0f1a35 !important;
    color: white !important;
}

/* When Sit and Go tab is active, use same styling as other active tabs */
.sit-and-go-tab.active {
    background: var(--accent-gold) !important;
    color: white !important;
}

/* Upcoming tab width to match */
.filter-tab:nth-child(2) {
    min-width: 140px !important;
    text-align: center !important;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

/* Filter Panel Styles */
.filter-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Filter Toggle Styles */
.filter-toggle .btn {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0;
}

.filter-toggle .btn:hover {
    color: var(--color-primary-hover);
    text-decoration: none;
}

/* Filter Summary Styling */
.filter-summary-below {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.filter-summary-below span {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
    display: block;
}

#filterContent {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
}

.filter-section-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.filter-section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.filter-groups {
    display: grid;
    gap: 1.5rem;
}

.filter-group {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-checkbox,
.filter-radio {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--border-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-checkbox:hover,
.filter-radio:hover {
    background: white;
    border-color: var(--accent-gold);
}

.filter-checkbox input[type="checkbox"],
.filter-radio input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"]:checked + span,
.filter-radio input[type="radio"]:checked + span {
    color: var(--accent-gold);
    font-weight: 600;
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Quick Filters Toggle */
.quick-filters-toggle .btn {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.quick-filters-toggle .btn:hover {
    color: var(--color-primary-hover);
    text-decoration: none;
}

/* Fee Quick Filters */
.fee-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.fee-quick-filters .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.fee-quick-filters .btn-success {
    font-weight: 600;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ff0000 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fee-quick-filters .btn-outline-success {
    color: var(--color-success);
    border-color: var(--color-success);
}

.fee-quick-filters .btn-outline-success:hover {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.fee-quick-filters .btn-outline-secondary {
    font-size: 0.75rem;
}

@media (max-width: 576px) {
    .fee-quick-filters {
        justify-content: space-between;
    }
    
    .fee-quick-filters .btn {
        flex: 0 0 calc(33.333% - 4px);
        text-align: center;
        font-size: 0.75rem;
        padding: 0.2rem 0.3rem;
    }
}

/* FIDE Rating Filters */
.fide-rating-filters {
    margin-top: 0.5rem;
}

.fide-rating-filters .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.fide-rating-filters .btn-info {
    font-weight: 600;
    background-color: var(--bs-info);
    border-color: var(--bs-info);
    color: white;
}

.fide-rating-filters .btn-outline-info {
    color: var(--bs-info);
    border-color: var(--bs-info);
}

.fide-rating-filters .btn-outline-info:hover {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
    color: white;
}

@media (max-width: 576px) {
    .fide-rating-filters .d-flex {
        justify-content: space-between;
    }
    
    .fide-rating-filters .btn {
        flex: 0 0 calc(33.333% - 4px);
        text-align: center;
        font-size: 0.75rem;
        padding: 0.2rem 0.3rem;
    }
}

/* Time Control Buttons */
.time-control-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-control-buttons .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.time-control-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: calc(var(--border-radius) - 2px);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-secondary);
}

.time-control-btn:hover {
    background: white;
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.time-control-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.time-control-btn i {
    margin-right: 0.25rem;
}

/* Advanced Filters */
.advanced-toggle {
    text-align: center;
    padding-top: 1rem;
}

.advanced-toggle button {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.advanced-toggle button:hover {
    color: var(--accent-gold);
}

.advanced-filters {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
}

.filter-actions .btn {
    min-width: 120px;
}

.filter-actions .btn-success {
    background-color: #000000;
    border-color: #000000;
    color: white;
    transition: all 0.2s ease;
}

.filter-actions .btn-success:hover {
    background-color: #333333;
    border-color: #333333;
    transform: translateY(-1px);
}

.empty-state-large {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i,
.empty-state-large i {
    margin-bottom: 1rem;
}

/* Tournament Status Badges */
.tournament-status {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.tournament-card:hover .tournament-status {
    opacity: 1;
    transform: translateY(0);
}

.status-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.status-active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.status-completed {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.status-cancelled {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Tournament Actions */
.tournament-actions {
    padding: 1.5rem;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tournament-actions .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tournament-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .chess-board {
        width: 100%;
        max-width: 480px;
        height: auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .podium-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-stats .row {
        gap: 1rem;
    }
    
    .tournament-item,
    .game-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tournament-actions,
    .game-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .player-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-card {
        padding: 2rem 1.5rem;
    }
    
    .dashboard-section,
    .tournament-info-card,
    .prize-distribution-card {
        padding: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .game-controls {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    .card,
    .tournament-card,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
        --bg-light: #ffffff;
    }
}

/* Dark Mode (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode variables would go here */
}

/* Profile Verification Status */
.verification-status-section {
    margin-bottom: 2rem;
}

.verification-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.verification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.verification-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.verification-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.verification-status.verified {
    color: #22c55e;
}

.verification-status.in-review {
    color: #f59e0b;
}

.verification-status.rejected {
    color: #ef4444;
}

.verification-status.unverified {
    color: #6b7280;
}

.verification-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.verification-benefits {
    text-align: right;
}

.verification-benefits small {
    line-height: 1.8;
}

/* Admin Panel Styles */
.admin-panel {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0;
    overflow: hidden;
}

.admin-panel-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.admin-panel-body {
    padding: 1.5rem;
}

.user-verification-card {
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.user-verification-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.verification-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.verification-badge.verified {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.verification-badge.in-review {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.verification-badge.unverified {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.verification-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Public Profile Enhancements */
.public-profile-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Bio and Professional Sections */
.bio-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.service-highlight {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.specializations, .content-focus {
    margin-top: 1rem;
}

.specializations .badge, .content-focus .badge {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-link.website:hover {
    background: #6c757d;
    border-color: #6c757d;
}

.social-link.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.social-link.instagram:hover {
    background: #e4405f;
    border-color: #e4405f;
}

.social-link.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.social-link.twitch:hover {
    background: #9146ff;
    border-color: #9146ff;
}

/* Chess Background */
.background-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.background-item h6 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.background-item p {
    margin-bottom: 0;
    color: #555;
}

/* Chess Profiles */
.chess-profiles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chess-profile-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.chess-profile-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chess-profile-link:hover {
    background: var(--primary-color);
    color: white;
}

.coach-info, .streamer-info {
    padding: 1rem 0;
}

/* Outline badge styles for status indicators */
.badge.bg-outline-secondary {
    background: transparent !important;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.badge.bg-outline-primary {
    background: transparent !important;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Green Room Specific Styles */
.green-room-title {
    color: var(--green-color) !important;
}

.green-room-title i {
    color: var(--green-color) !important;
}

/* Navigation Green Room Link */
.navbar-nav .nav-link[href*="green-room"] {
    color: var(--green-color) !important;
}

.navbar-nav .nav-link[href*="green-room"]:hover {
    color: var(--green-color) !important;
    opacity: 0.8;
}

.navbar-nav .nav-link[href*="green-room"] i {
    color: var(--green-color) !important;
}

/* View Toggle Controls */
.view-controls {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.view-toggle .btn-check:checked + .btn-outline-secondary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.sort-controls {
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Table View Styles */
.tournaments-table {
    animation: slideIn 0.3s ease-in-out;
}

.tournaments-table .table {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tournaments-table .table thead th {
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tournaments-table .table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.tournaments-table .table thead th.sortable:hover {
    background-color: var(--hover-color);
}

.tournaments-table .table tbody tr {
    transition: background-color 0.2s ease;
}

.tournaments-table .table tbody tr:hover {
    background-color: var(--hover-color);
}

.tournaments-table .table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.tournaments-table .table .progress {
    background-color: #e9ecef;
}

.tournaments-table .table .progress-bar {
    background-color: var(--primary-color);
}

.tournaments-table .btn-group-vertical .btn {
    border-radius: 4px;
    margin-bottom: 2px;
}

.tournaments-table .btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .view-controls .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .tournaments-table .table {
        font-size: 0.875rem;
    }
    
    .tournaments-table .table th,
    .tournaments-table .table td {
        padding: 8px 4px;
    }
    
    .tournaments-table .btn-group-vertical .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card view animation */
.tournaments-grid {
    animation: slideIn 0.3s ease-in-out;
}

/* Live Chat Button - Always Visible */
#live-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-rose) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

#live-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
    background: linear-gradient(135deg, var(--accent-rose) 0%, var(--primary-color) 100%);
}

#live-chat-btn:active {
    transform: scale(0.95);
}

/* Pulse animation to draw attention */
#live-chat-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: pulse 2s infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Mobile responsiveness for live chat button */
@media (max-width: 768px) {
    #live-chat-btn {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Tournament Settings Card */
.tournament-settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tournament-settings-card .card-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.setting-item:hover {
    background: var(--accent-bg);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.setting-value {
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-value i {
    color: var(--accent-color);
    font-size: 0.875rem;
}

/* Tournament Countdown Timer */
.tournament-countdown-container {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-bg), var(--surface-bg));
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.2);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 35px;
}

.countdown-number {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color);
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.countdown-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.countdown-separator {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0 0.2rem;
    opacity: 0.7;
}

/* Countdown animations */
.countdown-timer.urgent .countdown-number {
    animation: countdownPulse 1s ease-in-out infinite;
    color: #dc3545;
}

.countdown-timer.urgent .countdown-separator {
    color: #dc3545;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Mobile responsive countdown */
@media (max-width: 576px) {
    .countdown-display {
        gap: 0.25rem;
    }
    
    .countdown-unit {
        min-width: 35px;
    }
    
    .countdown-number {
        font-size: 1.1rem;
    }
    
    .countdown-label {
        font-size: 0.6rem;
    }
    
    .countdown-separator {
        font-size: 1rem;
        margin: 0 0.1rem;
    }
}

/* Quick time buttons styling */
.quick-time-buttons {
    margin-top: 0.5rem;
}

.quick-time-buttons .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.quick-time-buttons .btn-outline-primary:hover {
    background-color: var(--theme-blue);
    border-color: var(--theme-blue);
}

.quick-time-buttons .btn-outline-secondary:hover {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
}

/* Swiss Standings Table */
.swiss-standings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.swiss-standings-table {
    background: var(--surface-bg);
    border-radius: 8px;
    overflow: hidden;
}

.swiss-standings-table thead {
    background: var(--accent-bg);
    border-bottom: 2px solid var(--accent-color);
}

.swiss-standings-table thead th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    border: none;
}

.swiss-standings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.swiss-standings-table tbody tr:hover {
    background: var(--accent-bg);
    transform: translateX(2px);
}

.swiss-standings-table tbody tr.table-success {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid #22c55e;
}

.swiss-standings-table tbody tr.table-active {
    background: var(--accent-bg);
    border-left: 3px solid var(--accent-color);
}

.swiss-standings-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.auto-refresh-status {
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.auto-refresh-status.text-success {
    color: #22c55e !important;
}

.auto-refresh-status .fa-sync-alt {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Game Sidebar - Dark Theme Enhancements */
.game-sidebar {
    position: fixed;
    top: 0;
    right: -500px; /* Start hidden */
    width: 500px;
    height: 100vh;
    background: linear-gradient(145deg, #1a1d29, #232632);
    border-left: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    color: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.game-sidebar.visible {
    right: 0;
}

/* Header Logo Card */
.header-logo-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.logo-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.logo-text-simple {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    margin: 0;
    letter-spacing: 1px;
    font-size: 1.2rem;
}

/* Scratchpad Card */
.scratchpad-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.note-type-toggle .btn-group {
    border-radius: 8px;
    overflow: hidden;
}

.note-type-toggle .btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.note-type-toggle .btn-check:checked + .btn-outline-light {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: white;
}

.notes-container {
    max-height: 300px;
    overflow-y: auto;
}

.note-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    position: relative;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-type-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.note-type-badge.game {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.note-type-badge.opponent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.note-timestamp {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.note-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.delete-note-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: #f87171;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.note-item:hover .delete-note-btn {
    opacity: 1;
}

.delete-note-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}
