/* Modern Premium Design System */
:root {
    --bg-main: #0b0f19;
    --bg-sidebar: #111827;
    --bg-card: rgba(30, 41, 59, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --chess-color: #f59e0b;
    --cricket-color: #10b981;
    --football-color: #3b82f6;
    --badminton-color: #ec4899;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(255, 255, 255, 0.05) inset;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-icon i {
    width: 20px;
    height: 20px;
    color: #fff;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

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

.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-btn.active i {
    color: var(--primary);
}

.nav-btn i {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.version {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.content-view {
    display: none;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.3s ease-out;
}

.content-view.active {
    display: flex;
}

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

/* Header UI */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Glassmorphism Panel */
.glass-panel {
    background-color: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Stats Overview Cards */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-premium);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-purple {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.icon-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--cricket-color);
}

.icon-blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--football-color);
}

.stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
}

/* Tournaments Grid */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Tournament Card Styling */
.tourney-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
}

.tourney-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(30, 41, 59, 0.7);
}

.tourney-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tourney-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.badge {
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-sport-chess {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--chess-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-sport-cricket {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--cricket-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-sport-football {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--football-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sport-badminton {
    background-color: rgba(236, 72, 153, 0.15);
    color: var(--badminton-color);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-format {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tourney-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tourney-card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.tourney-card-stat i {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.tourney-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active .status-dot {
    background-color: var(--cricket-color);
    box-shadow: 0 0 8px var(--cricket-color);
}

.status-active {
    color: var(--cricket-color);
}

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

.status-completed {
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 32px;
    background-color: rgba(30, 41, 59, 0.2);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-state.active {
    display: flex;
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 320px;
    margin-bottom: 24px;
}

/* Create Form Specifics */
.create-card {
    padding: 32px;
    max-width: 800px;
    align-self: center;
    width: 100%;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.helper-text {
    font-size: 12px;
    color: var(--text-muted);
}

input[type="text"], input[type="email"], select, textarea {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

input[type="text"]:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea {
    resize: vertical;
}

.quick-fill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.quick-fill-label {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-chip {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Tabs */
.tabs-container {
    border-bottom: 1px solid var(--border-color);
}

.tabs-list {
    display: flex;
    gap: 8px;
    margin-bottom: -1px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Details Header Dynamic Content */
.details-headline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

/* Fixtures / Matches */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.filter-chip {
    background: none;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 9999px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.filter-chip:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.filter-chip.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.round-header {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Fixture Card */
.match-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 24px;
    transition: var(--transition-smooth);
}

@media (max-width: 1024px) {
    .match-card {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    .vs-cell {
        order: 2;
    }
    .match-action {
        justify-self: center;
        order: 4;
    }
}

.match-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.match-side-2 {
    justify-content: flex-end;
}

.match-team {
    font-weight: 600;
    color: var(--text-primary);
}

.match-score {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    min-width: 48px;
    text-align: center;
    color: var(--text-secondary);
}

.match-score.winner {
    color: #fff;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.vs-cell {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-action {
    justify-self: flex-end;
}

/* Standings Table styling */
.table-container {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.standings-table th, .standings-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.standings-table th {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.standings-table tr:last-child td {
    border-bottom: none;
}

.standings-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

.rank-cell {
    width: 60px;
    font-weight: 700;
    color: var(--text-muted);
}

.team-cell {
    font-weight: 600;
    color: #fff;
}

/* Visual Bracket (Knockout) Styling */
.bracket-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding: 24px 0;
}

.bracket-wrapper {
    display: flex;
    gap: 48px;
    min-width: max-content;
    align-items: center;
    padding: 20px;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 24px;
    height: 100%;
    min-width: 220px;
}

.bracket-round-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.bracket-match {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.bracket-match:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.bracket-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    background-color: rgba(15, 23, 42, 0.2);
}

.bracket-team-row:last-child {
    border-bottom: none;
}

.bracket-team-name {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.bracket-team-row.winner .bracket-team-name {
    color: #fff;
    font-weight: 600;
}

.bracket-team-score {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
}

.bracket-team-row.winner .bracket-team-score {
    color: var(--cricket-color);
}

.bracket-match-action-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition-smooth);
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.bracket-match:hover .bracket-match-action-btn {
    opacity: 1;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    padding: 28px;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: rgba(15, 23, 42, 0.4);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.score-team-row .team-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
}

.score-inputs-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-divider {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 2px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Custom Sport Score Input fields */
.score-input-number {
    width: 60px;
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

.score-input-number:focus {
    border-color: var(--primary);
}

.cricket-score-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cricket-divider {
    color: var(--text-muted);
    font-weight: bold;
}

.sport-special-inputs {
    padding: 12px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.chess-result-selectors {
    display: flex;
    gap: 10px;
}

.chess-opt-btn {
    flex: 1;
    background: none;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.chess-opt-btn:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.chess-opt-btn.active {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--chess-color);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Profile & Auth Section */
.profile-section {
    padding: 16px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    margin-top: auto;
}

.user-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-signout {
    opacity: 0.8;
}

.btn-signout:hover {
    opacity: 1;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Editor List Items */
.editor-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.editor-email-text {
    font-weight: 500;
    color: var(--text-secondary);
}

.btn-remove-editor {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.btn-remove-editor:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Mobile Header & Overlay defaults */
.mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(4px);
    z-index: 98;
}

/* Responsive Styles for Mobile */
@media (max-width: 1024px) {
    body {
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        width: 100%;
        display: flex;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--bg-sidebar);
        border-bottom: 1px solid var(--border-color);
        padding: 0 20px;
        height: 64px;
        flex-shrink: 0;
        z-index: 100;
        position: sticky;
        top: 0;
    }

    .mobile-header .brand {
        margin-bottom: 0;
    }

    .mobile-header .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .mobile-header .logo-icon i {
        width: 16px;
        height: 16px;
    }

    .mobile-header .brand-name {
        font-size: 18px;
    }

    .menu-toggle-btn {
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        transition: var(--transition-smooth);
    }

    .menu-toggle-btn:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .sidebar {
        position: fixed;
        top: 64px;
        left: -280px;
        width: 260px;
        height: calc(100vh - 64px);
        z-index: 99;
        transition: var(--transition-smooth);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar .brand {
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        padding: 24px 16px;
        height: auto;
        overflow: visible;
        flex-grow: 1;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .view-header h1 {
        font-size: 26px;
    }

    .view-header .btn {
        width: 100%;
    }

    .header-actions {
        width: 100%;
        display: flex;
        gap: 12px;
    }

    .header-actions .btn {
        flex: 1;
    }

    .stats-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tournaments-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tabs-list {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-list::-webkit-scrollbar {
        display: none;
    }
}

/* Extra small mobile fixes (modals and score rows) */
@media (max-width: 480px) {
    .modal-container {
        padding: 20px 16px;
    }

    .score-team-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .score-team-row .team-name {
        font-size: 14px;
        text-align: center;
    }

    .score-inputs-container {
        justify-content: center;
    }

    .chess-result-selectors {
        flex-direction: column;
        gap: 8px;
    }

    .chess-opt-btn {
        width: 100%;
    }
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    z-index: 200;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    transition: var(--transition-smooth);
}

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

.search-result-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: #fff;
}

.search-result-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Competitor Chips Container */
.competitor-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 40px;
    padding: 8px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
}

.competitor-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.competitor-chip-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.competitor-chip-remove:hover {
    color: var(--danger);
}
