/* ~~~~~~~~~~~~~~~~~~ */
/* VARIABLES & RESET  */
/* ~~~~~~~~~~~~~~~~~~ */
:root {
    --primary-green: #006a4e;
    --secondary-green: #6b9e86;
    --background-light: #f9fbfb;
    --white: #ffffff;
    --border-color: #e9ecef;
    --text-dark: #3b3e41;
    --text-light: hsl(0, 0%, 65%);
    --text-red: #dc3545;
    --live-green: #aeecbc;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
    --info-bg: #d1ecf1;
    --info-text: #0c5460;
    --button-bg: #FFEB3B;

    /* Enhanced Professional Variables */
    --primary-gradient: linear-gradient(135deg, #006a4e 0%, #4a7c59 100%);
    --secondary-gradient: linear-gradient(135deg, #6b9e86 0%, #81b295 100%);
    --success-gradient: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    --surface-white: #ffffff;
    --surface-light: #f8fafc;
    --surface-border: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius-sm: 6px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-family: 'Poppins', sans-serif;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Custom subtle scrollbar for main browser */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
.dashboard-content::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track,
.dashboard-content::-webkit-scrollbar-track {
    background: rgba(0, 106, 78, 0.05);
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb,
.dashboard-content::-webkit-scrollbar-thumb {
    background: rgba(0, 106, 78, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover,
.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 106, 78, 0.35);
}

/* Firefox scrollbar styling for main browser */
body,
html,
.dashboard-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 106, 78, 0.2) rgba(0, 106, 78, 0.05);
}

/* Enhanced Typography */
h1, h2, h3, h4 {
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL DASHBOARD LAYOUT */
/* ~~~~~~~~~~~~~~~~~~ */
.dashboard-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    background: var(--background-light);
}

.dashboard-content {
    flex-grow: 1;
    overflow-y: auto;
    height: 100vh;
    overflow-x: hidden;
    /* max-width: calc(100vw - 280px); */
    background: var(--background-light);
}

/* Professional Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(105, 105, 105);
    transition: var(--transition);
    margin-bottom: 1rem;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Professional Sidebar */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--primary-gradient);
    color: var(--white);
    flex-shrink: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

/* Custom subtle scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Firefox scrollbar styling */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.sidebar-logo-link {
    display: block;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    max-width: 140px;
    height: auto;
    filter: brightness(1.1);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-header .username {
    display: block;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.sidebar-header .user-level {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Enhanced Sidebar Navigation */
.sidebar-nav {
    flex-grow: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: rgba(255, 255, 255, 0.3);
}

.sidebar-nav li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-left-color: var(--white);
    font-weight: 600;
}

.sidebar-nav i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    font-size: 1.125rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.support-links {
    margin-bottom: 1.5rem;
}

.support-links span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.support-links a {
    display: block;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.support-links a:hover {
    color: var(--white);
}

.logout-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 0;
    transition: var(--transition);
}

.logout-link:hover {
    color: var(--white);
}

.logout-link i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL DASHBOARD HERO */
/* ~~~~~~~~~~~~~~~~~~ */
.dashboard-hero {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.user-info {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.avatar {
    grid-row: 1 / 3;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.user-details {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.welcome-message h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.dashboard-subheading {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Club-specific styling */
.club-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.club-details h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.subtitle {
    color: rgb(151 151 151 / 90%);
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Professional Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-lg);
    padding: 0.875rem 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.stat-card .value {
    display: block;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.stat-card .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL CONTENT CONTAINER */
/* ~~~~~~~~~~~~~~~~~~ */
.content-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL SECTIONS */
/* ~~~~~~~~~~~~~~~~~~ */
.page-section {
    margin-bottom: 3rem;
}

.page-section.hidden {
    display: none;
}

.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--surface-border);
}

.dashboard-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
}

.dashboard-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0;
    font-weight: 500;
}

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL LEAGUES SECTION */
/* ~~~~~~~~~~~~~~~~~~ */
.leagues-section {
    margin-top: 2rem;
}

.leagues-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Professional Tabs */
.tabs-container {
    background: var(--surface-light);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-border);
}

.tabs.capsule-tabs {
    display: flex;
    gap: 0.5rem;
    background: none;
    padding: 0;
    border-radius: 0;
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--white);
    color: var(--primary-green);
    box-shadow: var(--shadow-sm);
}

/* Professional League Cards Grid */
.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-cards-grid,
.wallet-grid,
.settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

/* Enhanced League Card */
.dashboard-league-card {
    background: var(--white);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
    padding: 0;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.dashboard-league-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.card-header {
    padding: 0.5rem;
    border-bottom: 1px solid var(--surface-border);
    background: var(--white);
}

.card-title-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.league-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 0 1 auto;
}

.hosted-by {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
    font-style: italic;
    margin-top: 0.5rem;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.675rem;
    border-radius: 9999px;
    width: fit-content;
    white-space: nowrap;
}

.rank-badge.rank-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #744210;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.rank-badge.rank-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #4a5568;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-badge.rank-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #d4a574 100%);
    color: #2d1b0e;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-badge.rank-standard {
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--surface-border);
}

.status-and-tour {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.tour-tag-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.status-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3rem 0.625rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-live {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

.status-badge.status-upcoming {
    background: linear-gradient(135deg, #4299e1 0%, #63b3ed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.status-badge.status-completed {
    background: linear-gradient(135deg, #718096 0%, #a0aec0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(113, 128, 150, 0.3);
}

/* Card Info Grid */
.card-info-grid {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.125rem 1.25rem;
    background: var(--background-light);
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
}

.info-item svg {
    width: 18px;
    height: 18px;
    color: var(--primary-green);
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.125rem;
}

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

/* Card Footer */
.card-footer {
    padding: 0.875rem 1.25rem;
    background: var(--surface-light);
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.card-footer svg {
    color: var(--primary-green);
    transition: var(--transition);
}

.dashboard-league-card:hover .card-footer svg {
    transform: translateX(4px);
}

/* ~~~~~~~~~~~~~~~~~~ */
/* PROFESSIONAL BUTTONS & NAVIGATION */
/* ~~~~~~~~~~~~~~~~~~ */
.nav-item-club, .nav-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.nav-item-club {
    background: var(--button-bg);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(255, 235, 59, 0.4);
}

.nav-item-club:hover {
    background: #fdd835;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 235, 59, 0.6);
}



.nav-item.nav-item-cta {
    background: linear-gradient(135deg, #006a4e 0%, #4a7c59 100%);
    color: white;
    padding: 12px 16px;
    /* box-shadow: 0 4px 16px rgba(0, 106, 78, 0.4); */
    transform: translateY(-8px);
    min-width: 70px;
}

.nav-item-cta:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px rgba(0, 106, 78, 0.5);
}

.nav-item-cta i{
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.nav-item-cta::before{
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 106, 78, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.join-league-hero-btn {
    background: var(--success-gradient);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4);
    border: none;
    cursor: pointer;
}

.join-league-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.6);
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
    min-height: 44px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(0, 106, 78, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 106, 78, 0.5);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(107, 158, 134, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 158, 134, 0.5);
}

.btn-outline {
    color: var(--primary-green);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: var(--surface-light);
    border-color: var(--primary-green);
    transform: translateY(-1px);
}

/* Professional Join League Modal - Fixed positioning */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal, .modal-content {
    background: var(--surface-white);
    margin: 2rem;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal,
.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-btn, .modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover, .modal-close-btn:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

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

.modal-body {
    margin-bottom: 2rem;
}

.modal-body .icon-container {
    text-align: center;
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
}

.modal-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
}

.modal-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.modal-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.info-box {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.info-box h4 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.info-box li:before {
    content: '•';
    color: var(--primary-green);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Fixed Mobile Navigation - Only show on mobile */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 86px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    /* box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1); */
    border-top: 1px solid rgba(0, 106, 78, 0.1);
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    /* border-top: 1px solid var(--surface-border); */
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.98) 100%);
}


/* Desktop sidebar - Only show on desktop */
.sidebar {
    display: flex;
    flex-direction: column;
}

/* Responsive Navigation Control */
@media (max-width: 1023px) {
    .mobile-nav {
        display: flex;
    }

    .dashboard-content {
        margin-bottom: 80px !important;
        max-width: 100vw;
    }

    .sidebar {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex !important;
        flex-direction: column;
    }

    .mobile-nav {
        display: none !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    /* color: var(--text-muted); */
    color: #64748b;
    font-size: 0.75rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 16px;
    /* font-weight: 600; */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 60px;
    letter-spacing: 0.025em;
    overflow: hidden;
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item.active {
    color: #006a4e;
    background: rgba(0, 106, 78, 0.08);
    transform: translateY(-2px);
}

.nav-item.active i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 106, 78, 0.3));
}

/* Hover effects */
.nav-item:hover:not(.active) {
    color: #475569;
    background: rgba(100, 116, 139, 0.05);
    transform: translateY(-1px);
}

.nav-item:hover:not(.active) i {
    transform: scale(1.05);
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 106, 78, 0.1) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: inherit;
}

/* Active indicator dot */
.nav-item.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #006a4e;
    border-radius: 50%;
    animation: activeIndicator 0.3s ease-out;
}

.nav-item:active::before {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.15s ease;
}

@keyframes activeIndicator {
    0% { transform: translateX(-50%) scale(0); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}


/* Stagger animation on load */
.nav-item:nth-child(1) { animation-delay: 0ms; }
.nav-item:nth-child(2) { animation-delay: 50ms; }
.nav-item:nth-child(3) { animation-delay: 100ms; }
.nav-item:nth-child(4) { animation-delay: 150ms; }
.nav-item:nth-child(5) { animation-delay: 200ms; }

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

.nav-item {
    animation: slideUpFade 0.4s ease-out both;
}

/* Mobile More Options */
.more-options-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.more-options-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.more-options-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top-left-radius: var(--border-radius-xl);
    border-top-right-radius: var(--border-radius-xl);
    padding: 2rem;
    z-index: 1020;
    transform: translateY(100%);
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
}


.more-options-menu.open {
    transform: translateY(0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-border);
}

.menu-header h4 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

#close-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

#close-menu-btn:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--surface-border);
    transition: var(--transition);
}

.menu-list li:last-child a {
    border-bottom: none;
}

.menu-list li a:hover {
    color: var(--primary-green);
    transform: translateX(4px);
}

.menu-list li a i {
    width: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.menu-list .logout-link {
    color: var(--text-red);
}

.menu-list .logout-link:hover {
    color: #c53030;
}

/* ~~~~~~~~~~~~~~~~~~ */
/* RESPONSIVE DESIGN */
/* ~~~~~~~~~~~~~~~~~~ */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .leagues-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        display: none;
    }

    .content-container {
        padding: 1rem;
    }

    .dashboard-header {
        margin-bottom: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .leagues-section h2 {
        font-size: 1.5rem;
    }

    .leagues-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-league-card {
        margin-bottom: 0;
    }

    .card-header {
        padding: 1rem;
    }

    .card-info-grid {
        padding: 1rem;
        flex-direction: column;
        gap: 0.875rem;
    }

    .info-item {
        min-width: unset;
    }

    .card-footer {
        padding: 1rem;
    }

    .league-name {
        font-size: 1.125rem;
    }

    .rank-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
}

@media (max-width: 480px) {
    .tabs-container {
        margin: 0 -0.5rem 1.5rem -0.5rem;
        border-radius: 0;
    }

    .tab-button {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }

    .content-container {
        padding: 0.5rem;
    }
}

@media (max-width: 375px) {
    .mobile-nav {
        height: 82px;
        padding: 0 4px;
    }

    .nav-item {
        padding: 6px 8px;
        min-width: 52px;
        font-size: 0.7rem;
        margin-left: 3px;
    }

    .nav-item i {
        font-size: 1.3rem;
    }
}

@media (min-width: 430px) {
    .mobile-nav {
        height: 80px;
        padding: 0 16px;
    }

    .nav-item {
        padding: 10px 14px;
        min-width: 64px;
        margin-left: 3px;
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.dashboard-league-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.dashboard-league-card:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-league-card:nth-child(3) {
    animation-delay: 0.2s;
}

.dashboard-league-card:nth-child(4) {
    animation-delay: 0.3s;
}

.stat-card {
    animation: slideInRight 0.6s ease-out forwards;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}


/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }

    .dashboard-league-card {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* Additional Professional Styles for JavaScript Components */

/* Professional Loading and Error States */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.loading-state p {
    margin: 0;
    font-weight: 500;
}

.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.error-state i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 1.5rem;
}

.error-state h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.error-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.empty-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--surface-border);
}

.empty-content i {
    font-size: 4rem;
    /* margin-bottom: 1.5rem; */
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Professional Schedule Item Styling */
.schedule-item {
    background: var(--background-light);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-green);
}

.schedule-tour-tabs{
    margin-bottom: 1rem;
}

.schedule-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.schedule-title strong {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.schedule-meta i {
    color: var(--primary-green);
    width: 14px;
}

/* Professional Status Tags */
.status-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-tag.upcoming {
    background: linear-gradient(135deg, #4299e1 0%, #63b3ed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

.status-tag.completed {
    background: linear-gradient(135deg, #718096 0%, #a0aec0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(113, 128, 150, 0.3);
}

.status-tag.live {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

/* Professional Leaderboard Enhancements */
.leader-row {
    background: linear-gradient(135deg, #fef7cd 0%, #fef3c7 100%) !important;
    border-left: 4px solid #fbbf24;
    font-weight: 600;
}

.highlighted {
    background: var(--surface-light) !important;
}

.live-score {
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.score-negative {
    color: #16a34a;
    font-weight: 700;
}

.score-positive {
    color: #dc2626;
    font-weight: 700;
}

.score-even {
    color: var(--text-secondary);
    font-weight: 600;
}

/* No Results Search State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

/* Professional Player Profile Grid */
.player-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.player-profile-card {
    background: var(--white);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.player-profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

/* Search Bar Enhancement */
.search-bar {
    position: relative;
    margin-bottom: 2rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--white);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 106, 78, 0.1);
}

/* Enhanced Form Input States */
.input-group input:focus,
.modal-body input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 106, 78, 0.1);
}

/* Professional Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

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

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .schedule-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .schedule-title {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .modal, .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .empty-content {
        padding: 2rem 1rem;
    }

    .empty-content i {
        font-size: 3rem;
    }

    .empty-content h3 {
        font-size: 1.25rem;
    }

    .loading-state,
    .error-state {
        padding: 2rem 1rem;
    }
}