/* Modern FantaROI Styling - Inspired by Fantacalcio Design */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Competition Type Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%) !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%) !important;
}

/* Theme Variables - Clean White Professional Look */
:root {
    --bg-primary: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    --bg-secondary: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --bg-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-footer: rgba(248, 250, 252, 0.95);
    
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --text-navbar: #1a202c;
    --text-footer: #1a202c;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --border-navbar: rgba(0, 0, 0, 0.1);
    
    --form-bg: white;
    --form-border: rgba(0, 0, 0, 0.1);
    --form-focus: #667eea;
    
    --table-bg: white;
    --table-header-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --table-hover: rgba(102, 126, 234, 0.05);
    
    --dropdown-bg: white;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    z-index: 1050 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
    min-width: 200px !important;
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

/* Ensure dropdowns are always visible above other content */
.btn-group .dropdown-menu {
    position: absolute !important;
    transform: none !important;
}

/* Better spacing for dropdown items */
.dropdown-item {
    padding: 0.5rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    font-size: 0.9rem !important;
}

.dropdown-item i {
    width: 1.2rem !important;
    text-align: center !important;
}

/* Prevent dropdown content from being cut off */
.card {
    overflow: visible !important;
}

.card-header, .card-body {
    overflow: visible !important;
}

/* Fix for header layout */
.d-flex.justify-content-between {
    position: relative !important;
    overflow: visible !important;
}

/* Ensure competition cards don't cut off dropdowns */
.col-md-4 {
    position: static !important;
}

.col-md-4 .card {
    position: relative !important;
    overflow: visible !important;
}

.col-md-4 .card-body {
    position: relative !important;
    overflow: visible !important;
}

/* Fix for competition button groups */
.btn-group {
    position: relative !important;
}

/* ===================== RESPONSIVE DESIGN IMPROVEMENTS ===================== */

/* Mobile-First Approach - Base styles for mobile */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* Container adjustments for mobile */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Typography responsive scaling */
h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.125rem;
    line-height: 1.3;
    margin-bottom: 0.625rem;
}

/* Card responsive improvements */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

.card-header {
    padding: 0.875rem 1rem;
    border-radius: 12px 12px 0 0;
}

/* Financial cards mobile optimization */
.financial-card {
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.financial-card:hover {
    transform: translateY(-2px);
}

.financial-card .card-body {
    padding: 1rem 0.875rem;
}

.financial-card .d-flex {
    justify-content: space-between;
    align-items: center;
}

.financial-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.1;
}

.financial-card .card-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.financial-icon {
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.financial-icon i {
    font-size: 1.5rem;
}

/* ===================== ADAPTIVE FONT SCALING FOR FINANCIAL CARDS ===================== */

/* Base adaptive font scaling classes */
.financial-card .card-title {
    transition: font-size 0.2s ease;
    white-space: normal;
    overflow: visible;
    word-break: keep-all;
    line-height: 1.0;
    hyphens: none;
}

.financial-card .card-subtitle {
    transition: font-size 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Adaptive scaling based on content length - optimized for number visibility */
.financial-card .card-title.text-short {
    font-size: 1.375rem;
}

.financial-card .card-title.text-medium {
    font-size: 1.125rem;
}

.financial-card .card-title.text-long {
    font-size: 1rem;
}

.financial-card .card-title.text-extra-long {
    font-size: 0.875rem;
    line-height: 1.0;
}

/* Container-based adaptive scaling - prioritizing number visibility */
.financial-card.small-container .card-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.financial-card.small-container .card-subtitle {
    font-size: 0.6875rem;
}

.financial-card.medium-container .card-title {
    font-size: 1.125rem;
}

.financial-card.medium-container .card-subtitle {
    font-size: 0.75rem;
}

.financial-card.large-container .card-title {
    font-size: 1.25rem;
}

.financial-card.large-container .card-subtitle {
    font-size: 0.8125rem;
}

/* Currency-specific scaling adjustments */
.financial-card .card-title.currency-chf,
.financial-card .card-title.currency-eur {
    letter-spacing: -0.02em; /* Tighter spacing for currency symbols */
}

.financial-card .card-title.currency-usd,
.financial-card .card-title.currency-gbp {
    letter-spacing: -0.01em;
}

/* Number format scaling */
.financial-card .card-title.large-number {
    font-size: 1.125rem;
    font-weight: 600;
}

.financial-card .card-title.small-number {
    font-size: 1.375rem;
    font-weight: 700;
}

/* Ensure text content area allows for proper number display - maximized for numbers */
.financial-card .d-flex > div:first-child {
    min-width: 0; /* Allow flex item to shrink */
    flex: 1; /* Take available space */
    overflow: visible; /* Show all content */
    margin-right: 0.375rem; /* Minimal space to give maximum room for text */
    max-width: calc(100% - 50px); /* Reserve space for icon */
}

/* Button responsive improvements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Button group mobile fixes */
.btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.btn-group > .btn {
    margin-bottom: 0.25rem;
}

/* Header responsive layout */
.d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.d-flex.justify-content-between.align-items-center > div:first-child {
    text-align: center;
}

.d-flex.justify-content-between.align-items-center > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table th {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0.75rem 0.5rem;
    border-top: none;
}

.table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Form improvements */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--form-border);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--form-focus);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Navbar responsive improvements */
.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-navbar);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-navbar);
}

.navbar-nav .nav-link {
    color: var(--text-navbar);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Dashboard year filter responsive */
.d-flex.align-items-center.gap-3 {
    flex-direction: column;
    gap: 0.75rem !important;
    align-items: stretch;
}

.d-flex.align-items-center.gap-3 .btn {
    width: 100%;
    justify-content: center;
}

.d-flex.align-items-center .form-select {
    width: 100% !important;
    min-width: auto !important;
}

/* ===================== TABLET STYLES (≥576px) ===================== */
@media (min-width: 576px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.625rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .financial-card .card-body {
        padding: 1.25rem 1.125rem;
    }
    
    .financial-card .d-flex {
        justify-content: space-between;
    }
    
    /* Tablet adaptive scaling baseline */
    .financial-card .card-title {
        font-size: 1.375rem;
    }
    
    .financial-card .card-subtitle {
        font-size: 0.8125rem;
    }
    
    /* Tablet-specific adaptive overrides - better number visibility */
    .financial-card.small-container .card-title {
        font-size: 1.125rem !important;
    }
    
    .financial-card.medium-container .card-title {
        font-size: 1.25rem !important;
    }
    
    .financial-card.large-container .card-title {
        font-size: 1.375rem !important;
    }
    
    .financial-icon {
        width: 55px;
        height: 55px;
    }
    
    .financial-icon i {
        font-size: 1.625rem;
    }
    
    .financial-card .card-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.5rem 1.25rem;
    }
    
    .table th {
        padding: 0.875rem 0.75rem;
    }
    
    .table td {
        padding: 0.875rem 0.75rem;
    }
    
    /* Header layout for tablets */
    .d-flex.justify-content-between.align-items-center {
        flex-direction: row;
        align-items: center;
    }
    
    .d-flex.justify-content-between.align-items-center > div:first-child {
        text-align: left;
    }
    
    .d-flex.justify-content-between.align-items-center > div:last-child {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    /* Dashboard year filter for tablets */
    .d-flex.align-items-center.gap-3 {
        flex-direction: row;
        gap: 1rem !important;
        align-items: center;
    }
    
    .d-flex.align-items-center.gap-3 .btn {
        width: auto;
    }
    
    .d-flex.align-items-center .form-select {
        width: auto !important;
        min-width: 150px !important;
    }
}

/* ===================== DESKTOP STYLES (≥768px) ===================== */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .financial-card .card-body {
        padding: 1.75rem 1.375rem;
    }
    
    .financial-card .d-flex {
        justify-content: space-between;
    }
    
    /* Desktop adaptive scaling baseline */
    .financial-card .card-title {
        font-size: 1.5rem;
    }
    
    .financial-card .card-subtitle {
        font-size: 0.875rem;
    }
    
    /* Desktop-specific adaptive enhancements - balanced scaling */
    .financial-card.small-container .card-title {
        font-size: 1.25rem !important;
    }
    
    .financial-card.medium-container .card-title {
        font-size: 1.375rem !important;
    }
    
    .financial-card.large-container .card-title {
        font-size: 1.5rem !important;
    }
    
    /* Enable full adaptive scaling on desktop */
    .financial-card .card-title.text-extra-long {
        font-size: 1.125rem !important;
        line-height: 1.0;
    }
    
    .financial-icon {
        width: 60px;
        height: 60px;
    }
    
    .financial-icon i {
        font-size: 1.75rem;
    }
    
    .financial-card .card-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.625rem 1.5rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
    }
    
    .table {
        font-size: 0.9375rem;
    }
    
    .table th {
        padding: 1rem;
    }
    
    .table td {
        padding: 1rem;
    }
    
    /* Dashboard year filter for desktop */
    .d-flex.align-items-center.gap-3 {
        gap: 1.5rem !important;
    }
}

/* ===================== LARGE DESKTOP STYLES (≥992px) ===================== */
@media (min-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.625rem;
    }
    

    
    .card-body {
        padding: 2rem;
    }
    
    .financial-card .card-body {
        padding: 2rem 1.75rem;
    }
    
    .financial-card .d-flex {
        justify-content: space-between;
    }
    
    /* Large desktop adaptive scaling baseline */
    .financial-card .card-title {
        font-size: 1.75rem;
    }
    
    .financial-card .card-subtitle {
        font-size: 0.9375rem;
    }
    
    /* Large desktop-specific adaptive enhancements - prioritizing readability */
    .financial-card.small-container .card-title {
        font-size: 1.375rem !important;
    }
    
    .financial-card.medium-container .card-title {
        font-size: 1.5rem !important;
    }
    
    .financial-card.large-container .card-title {
        font-size: 1.75rem !important;
    }
    
    /* Enhanced adaptive scaling for large screens - better number visibility */
    .financial-card .card-title.text-short {
        font-size: 1.875rem !important;
    }
    
    .financial-card .card-title.text-medium {
        font-size: 1.625rem !important;
    }
    
    .financial-card .card-title.text-long {
        font-size: 1.375rem !important;
    }
    
    .financial-card .card-title.text-extra-long {
        font-size: 1.125rem !important;
        line-height: 1.0;
    }
    
    .financial-icon {
        width: 70px;
        height: 70px;
    }
    
    .financial-icon i {
        font-size: 2rem;
    }
}

/* ===================== EXTRA LARGE DESKTOP STYLES (≥1200px) ===================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    

}

/* ===================== MOBILE-SPECIFIC FIXES ===================== */
@media (max-width: 575.98px) {
    /* Stack buttons vertically on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group > .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: 8px !important;
    }
    
    /* Mobile navbar improvements */
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    /* Mobile dropdown menu positioning */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0.25rem !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: none !important;
    }
    
    /* Hide financial icons on very small screens */
    .financial-icon {
        display: none;
    }
    
    /* Keep space-between layout on mobile */
    .financial-card .d-flex {
        justify-content: space-between;
    }
    
    /* Mobile financial card typography - maximum visibility */
    .financial-card .card-body {
        padding: 0.875rem 0.75rem;
    }
    
    .financial-card .card-title {
        font-size: 0.875rem !important; /* Very small base for mobile to ensure all numbers fit */
    }
    
    .financial-card .card-subtitle {
        font-size: 0.6875rem !important;
    }
    
    /* Enable adaptive features on mobile for better number visibility */
    .financial-card .card-title.text-short {
        font-size: 1rem !important;
    }
    
    .financial-card .card-title.text-medium {
        font-size: 0.9375rem !important;
    }
    
    .financial-card .card-title.text-long {
        font-size: 0.875rem !important;
    }
    
    .financial-card .card-title.text-extra-long {
        font-size: 0.75rem !important;
    }
    
    /* Give maximum space for text on mobile */
    .financial-card .d-flex > div:first-child {
        margin-right: 0.25rem !important;
        max-width: calc(100% - 40px) !important;
    }
    
    /* Stack league header content vertically */
    .d-flex.justify-content-between.align-items-center {
        text-align: center;
    }
    
    .d-flex.justify-content-between.align-items-center > div:last-child {
        margin-top: 1rem;
    }
    
    /* Mobile table improvements */
    .table-responsive {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    /* Mobile form improvements */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Mobile card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile dashboard improvements */
    .financial-card .card-title {
        font-size: 1.25rem;
    }
    
    .financial-card .card-subtitle {
        font-size: 0.8125rem;
    }
}

/* ===================== COMPONENT-SPECIFIC RESPONSIVE STYLES ===================== */

/* League Header Responsive Layout */
.league-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.league-info {
    text-align: center;
}

.league-title {
    margin-bottom: 0.5rem;
}

.league-details p {
    margin-bottom: 0.25rem;
}

.league-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.btn-group-responsive {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.btn-group-responsive .btn {
    width: 100%;
    margin-bottom: 0.25rem;
}

.btn-group-responsive .btn-group {
    width: 100%;
}

.btn-group-responsive .dropdown-toggle-split {
    width: 100%;
}

/* Dashboard Header Responsive Layout */
.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.dashboard-title {
    text-align: center;
    margin-bottom: 0;
}

.dashboard-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.year-filter-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.year-filter-container .form-label {
    margin-bottom: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.year-filter-container .form-select {
    width: 100%;
}

/* Season Actions Responsive Layout */
.season-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.season-actions .btn {
    width: 100%;
}

/* Button Text Responsive Visibility */
.btn-text {
    display: inline;
}

/* Responsive Button Icons */
@media (max-width: 575.98px) {
    .btn-text {
        display: none;
    }
    
    .btn {
        padding: 0.5rem;
        min-width: 44px; /* Minimum touch target size */
    }
    
    .btn i {
        margin: 0 !important;
    }
}

/* Tablet and Desktop Layouts */
@media (min-width: 576px) {
    .league-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .league-info {
        text-align: left;
        flex: 1;
    }
    
    .league-actions {
        flex-direction: row;
        align-items: center;
        flex-shrink: 0;
    }
    
    .btn-group-responsive {
        flex-direction: row;
        width: auto;
    }
    
    .btn-group-responsive .btn {
        width: auto;
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
    
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .dashboard-title {
        text-align: left;
    }
    
    .dashboard-controls {
        flex-direction: row;
        align-items: center;
        flex-shrink: 0;
    }
    
    .year-filter-container {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .year-filter-container .form-select {
        width: auto;
        min-width: 150px;
    }
    
    .season-actions {
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0;
    }
    
    .season-actions .btn {
        width: auto;
    }
}

/* Desktop Optimizations */
@media (min-width: 768px) {
    .league-header {
        align-items: center;
    }
    
    .dashboard-controls {
        gap: 1.5rem;
    }
    
    .year-filter-container .form-select {
        min-width: 180px;
    }
}

/* ===================== NAVBAR RESPONSIVE IMPROVEMENTS ===================== */

/* Mobile navbar text visibility */
.brand-text,
.nav-text,
.user-name {
    display: inline;
}

/* Hide text on smaller screens, keep icons */
@media (max-width: 575.98px) {
    .nav-text {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .language-text .d-none {
        display: none !important;
    }
}

/* Show abbreviated text on small tablets */
@media (min-width: 576px) and (max-width: 767.98px) {
    .brand-text {
        display: inline;
    }
    
    .nav-text {
        display: none;
    }
    
    .user-name {
        font-size: 0.875rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Full text on desktop */
@media (min-width: 768px) {
    .brand-text,
    .nav-text,
    .user-name {
        display: inline;
    }
}

/* Navbar toggler improvements */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile dropdown improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-navbar);
        border-radius: 8px;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0;
        border-radius: 6px;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin: 0;
        position: static !important;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        margin: 0.125rem 0;
        border-radius: 6px;
        background: rgba(102, 126, 234, 0.05);
    }
    
    .dropdown-item:hover {
        background: rgba(102, 126, 234, 0.1);
    }
    
    .dropdown-divider {
        margin: 0.5rem 0;
        border-color: rgba(0, 0, 0, 0.1);
    }
}

/* ===================== ADDITIONAL RESPONSIVE COMPONENTS ===================== */

/* Competition Cards Responsive Layout */
.competition-card {
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.competition-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.competition-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.competition-card .btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* League Management Cards */
.league-management-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.league-management-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Team Assignment Cards */
.team-assignment-zone {
    min-height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.team-assignment-zone.drag-over {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card .stats-icon {
    font-size: 2rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.stats-card .stats-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Form Group Responsive Improvements */
.form-group-responsive {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group-responsive .form-label {
    font-weight: 500;
    margin-bottom: 0;
}

.form-group-responsive .form-control,
.form-group-responsive .form-select {
    width: 100%;
}

/* Alert Responsive Improvements */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert .alert-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.alert i {
    margin-right: 0.5rem;
}

/* Badge Responsive Improvements */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Progress Bar Responsive Improvements */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Tab Navigation Responsive */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

.nav-tabs .nav-link.active {
    border-bottom-color: #667eea;
    color: var(--text-primary);
    font-weight: 600;
}

/* Mobile Tab Navigation */
@media (max-width: 575.98px) {
    .nav-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .nav-tabs .nav-link {
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        text-align: center;
    }
    
    .nav-tabs .nav-link.active {
        background-color: rgba(102, 126, 234, 0.1);
        border-bottom-color: var(--border-color);
    }
}

/* Pagination Responsive */
.pagination {
    justify-content: center;
    margin: 2rem 0;
}

.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

.pagination .page-link.active {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

/* Mobile Pagination */
@media (max-width: 575.98px) {
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        margin: 0 0.05rem;
    }
    
    .pagination .page-item:not(.active):not(.disabled) .page-link {
        display: none;
    }
    
    .pagination .page-item.active .page-link,
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link,
    .pagination .page-item:nth-child(2) .page-link,
    .pagination .page-item:nth-last-child(2) .page-link {
        display: block;
    }
}

/* List Group Responsive */
.list-group-item {
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.list-group-item.active {
    background-color: #667eea;
    border-color: #667eea;
}

/* Mobile List Group */
@media (max-width: 575.98px) {
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Responsive Utilities */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Enhanced dropdown positioning for all screen sizes */
.dropdown-menu {
    position: absolute !important;
    z-index: 1060 !important;
    min-width: 180px !important;
    max-width: 250px !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
    background-color: white !important;
    padding: 0.5rem 0 !important;
    margin: 0.125rem 0 0 !important;
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
    transform-origin: top right !important;
}

/* Mobile-specific dropdown fixes */
@media (max-width: 768px) {
    .dropdown-menu {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        width: 200px !important;
        margin-top: 0.25rem !important;
    }
    
    .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }
}

/* Ensure proper stacking for all dropdowns */
.dropdown-menu.show {
    z-index: 1060 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force proper positioning and visibility */
.btn-group.show .dropdown-menu {
    position: absolute !important;
    transform: translate3d(0px, 38px, 0px) !important;
    top: 0px !important;
    left: 0px !important;
    will-change: transform !important;
    z-index: 1060 !important;
}

.btn-group.show .dropdown-menu-end {
    transform: translate3d(-100px, 38px, 0px) !important;
    right: 0 !important;
    left: auto !important;
}

/* Override Bootstrap's dropdown positioning completely */
.dropdown-menu[data-bs-popper] {
    position: absolute !important;
    inset: 0px auto auto 0px !important;
    margin: 0 !important;
    transform: translate(0px, 38px) !important;
}

.dropdown-menu-end[data-bs-popper] {
    position: absolute !important;
    inset: 0px 0px auto auto !important;
    margin: 0 !important;
    transform: translate(0px, 38px) !important;
}

/* Container overflow fixes for season page specifically */
.card.border-success, .card.border-warning {
    overflow: visible !important;
}

.card.border-success .card-body, .card.border-warning .card-body {
    overflow: visible !important;
}

/* Force Bootstrap dropdown to show properly */
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    display: block !important;
    position: absolute !important;
    z-index: 1060 !important;
}

/* Critical fix for competition card dropdowns being hidden */
.col-md-4:has(.dropdown.show) {
    z-index: 1070 !important;
    position: relative !important;
}

.card:has(.dropdown.show) {
    z-index: 1070 !important;
    position: relative !important;
}

.btn-group.show {
    z-index: 1070 !important;
    position: relative !important;
}

.btn-group.show .dropdown-menu {
    z-index: 1070 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25) !important;
}

/* Fallback for browsers that don't support :has() */
.dropdown.show,
.dropdown.show .dropdown-menu {
    z-index: 1070 !important;
}

.dropdown.show {
    position: relative !important;
}

.dropdown.show .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
}

/* CSS-only dropdown solution */
.css-dropdown {
    position: relative !important;
}

.css-dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1070 !important;
    min-width: 180px !important;
    padding: 0.5rem 0 !important;
    margin: 0.125rem 0 0 !important;
    background-color: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25) !important;
}

.css-dropdown:hover .css-dropdown-menu {
    display: block !important;
}

.css-dropdown-toggle:hover + .css-dropdown-menu {
    display: block !important;
}

/* Force parent containers to have high z-index when dropdown is hovered */
.css-dropdown:hover {
    z-index: 1070 !important;
    position: relative !important;
}

.card:has(.css-dropdown:hover) {
    z-index: 1070 !important;
    position: relative !important;
}

.col-md-4:has(.css-dropdown:hover) {
    z-index: 1070 !important;
    position: relative !important;
}

/* Fallback for browsers that don't support :has() */
.css-dropdown:hover,
.css-dropdown:hover .css-dropdown-menu {
    z-index: 1070 !important;
}

.css-dropdown-menu:hover {
    display: block !important;
}

/* Row container fixes */
.row {
    overflow: visible !important;
}



/* CSS Variables for consistent theming - Clean White Professional */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%);
    --dark-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    --card-gradient: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --warning-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --info-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Animated background elements - Clean White Theme */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(129, 140, 248, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(165, 180, 252, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.3s ease;
}



/* Navigation styling */
.navbar {
    background: var(--bg-navbar) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-navbar);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--text-navbar) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.navbar-nav .nav-link {
    color: var(--text-navbar) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-navbar) !important;
    transform: translateY(-1px);
}



/* Dropdown Menu Dark Mode Fix */
.dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(20px);
}

.dropdown-item {
    color: var(--text-primary) !important;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(102, 126, 234, 0.1) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
}

/* Container improvements */
.container, .container-fluid {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Modern card design */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

/* Card text elements */
.card .h1, .card .h2, .card .h3, .card .h4, .card .h5, .card .h6,
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card .card-title {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.card .text-muted {
    color: var(--text-secondary) !important;
}

.card p, .card span, .card div {
    color: var(--text-primary);
}

.card .small, .card .badge {
    color: inherit;
}

/* Dashboard cards */
.dashboard-card {
    background: var(--card-gradient);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

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

/* Modern buttons */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    background: var(--success-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    background: var(--danger-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-warning:hover {
    background: var(--warning-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-info {
    background: var(--info-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-info:hover {
    background: var(--info-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-outline-secondary {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Form controls */
.form-control, .form-select {
    border: 2px solid var(--form-border);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    background: var(--form-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: var(--form-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--form-bg);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

/* Financial indicators */
.financial-indicator {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    color: white;
    font-weight: 600;
}

.financial-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.9;
    z-index: -1;
}

.profit {
    background: var(--success-gradient);
}

.loss {
    background: var(--danger-gradient);
}

.neutral {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

/* League cards */
.league-card {
    background: var(--card-gradient);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.league-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

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

/* Competition badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.badge-league {
    background: var(--primary-gradient);
    color: white;
}

.badge-cup {
    background: var(--warning-gradient);
    color: white;
}

.badge-f1 {
    background: var(--danger-gradient);
    color: white;
}

.badge-battle-royal {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.badge-other {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    color: #333;
}

/* Tables */
.table {
    background: var(--table-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: var(--table-hover);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.table th {
    background: var(--table-header-bg);
    border: none;
    font-weight: 700;
    color: var(--text-primary) !important;
    padding: 1rem;
    transition: all 0.3s ease;
}

.table td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-primary) !important;
    transition: color 0.3s ease;
}

/* Force table cell content visibility */
.table th *, .table td *, .table tbody tr *, .table thead tr * {
    color: var(--text-primary) !important;
}

.table .text-muted {
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    color: #0f5132;
    border-left: 4px solid #11998e;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.1) 0%, rgba(63, 94, 251, 0.1) 100%);
    color: #842029;
    border-left: 4px solid #fc466b;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(253, 187, 45, 0.1) 0%, rgba(34, 193, 195, 0.1) 100%);
    color: #664d03;
    border-left: 4px solid #fdbb2d;
}

.alert-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #055160;
    border-left: 4px solid #667eea;
}

/* Statistics display */
.stat-card {
    background: var(--card-gradient);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

/* Loading states */
.loading-spinner {
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Financial Cards */
.financial-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.financial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

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

.financial-icon {
    opacity: 0.3;
    transition: all 0.3s ease;
}

.financial-card:hover .financial-icon {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Insight Cards */
.insight-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: var(--card-gradient);
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.insight-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.insight-icon {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.insight-card:hover .insight-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Gradient backgrounds for insight cards */
.bg-gradient-success {
    background: var(--success-gradient) !important;
    color: white !important;
}

.bg-gradient-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
}

.bg-gradient-warning {
    background: var(--warning-gradient) !important;
    color: white !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
}

/* Chart container */
.chart-container {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 400px;
}

.chart-container:hover {
    box-shadow: var(--shadow-lg);
}



/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .insight-card {
        margin-bottom: 1rem;
    }
    
    .financial-card {
        margin-bottom: 1rem;
    }
    
    .insight-card .card-title {
        font-size: 1.1rem;
    }
    
    .insight-card .card-subtitle {
        font-size: 0.85rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.2);
}

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

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

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

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

/* Enhanced Dashboard Animations */
.insight-card {
    animation: fadeInUp 0.8s ease-out both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

.insight-card:nth-child(1) { animation-delay: 0.1s; }
.insight-card:nth-child(2) { animation-delay: 0.2s; }
.insight-card:nth-child(3) { animation-delay: 0.3s; }
.insight-card:nth-child(4) { animation-delay: 0.4s; }

.insight-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Financial cards animations */
.financial-card {
    animation: slideInLeft 0.8s ease-out both;
    transition: all 0.3s ease;
}

.financial-card:nth-child(1) { animation-delay: 0.1s; }
.financial-card:nth-child(2) { animation-delay: 0.2s; }
.financial-card:nth-child(3) { animation-delay: 0.3s; }

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

/* Chart containers animation */
.chart-container {
    animation: fadeInScale 1s ease-out both;
    transition: all 0.3s ease;
}

.chart-container:nth-child(1) { animation-delay: 0.5s; }
.chart-container:nth-child(2) { animation-delay: 0.6s; }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Dropdown improvements */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    background: var(--dropdown-bg);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--text-primary);
}

.dropdown-item:focus {
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Text utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Icon improvements */
.fas, .far, .fab {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b5cf6;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e2e8f0);
    color: #475569;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
}

.rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: white;
}

/* List Group Enhancements */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    animation: fadeInLeft 0.6s ease-out both;
}

.list-group-item:nth-child(1) { animation-delay: 0.1s; }
.list-group-item:nth-child(2) { animation-delay: 0.2s; }
.list-group-item:nth-child(3) { animation-delay: 0.3s; }
.list-group-item:nth-child(4) { animation-delay: 0.4s; }
.list-group-item:nth-child(5) { animation-delay: 0.5s; }

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Button Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Financial Tips Widget Styles */
.tip-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    animation: slideInRight 0.8s ease-out both;
    position: relative;
    overflow: hidden;
    background: var(--card-gradient);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tip-card:hover::before {
    left: 100%;
}

.tip-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-xl);
}

.tip-card:nth-child(1) { animation-delay: 0.7s; }
.tip-card:nth-child(2) { animation-delay: 0.8s; }
.tip-card:nth-child(3) { animation-delay: 0.9s; }
.tip-card:nth-child(4) { animation-delay: 1.0s; }

/* Custom color classes for tips */
.text-purple { color: #6f42c1 !important; }
.text-orange { color: #fd7e14 !important; }
.text-teal { color: #20c997 !important; }

.border-purple { border-color: #6f42c1 !important; }
.border-orange { border-color: #fd7e14 !important; }
.border-teal { border-color: #20c997 !important; }

.bg-purple { background-color: #6f42c1 !important; }
.bg-orange { background-color: #fd7e14 !important; }
.bg-teal { background-color: #20c997 !important; }

.tip-icon {
    flex-shrink: 0;
}

.tip-content {
    min-width: 0;
}

.tip-title {
    font-weight: 600;
    line-height: 1.2;
}

.tip-message {
    line-height: 1.4;
}

/* Dark Mode Switch Styles */
.form-check-input:checked {
    background-color: var(--primary-gradient);
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Alert Styles */
.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(74, 222, 128, 0.1) 100%);
    color: #166534;
    border-left-color: #22c55e;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* Financial indicators dark theme */
/* Text color fixes */
.text-muted {
    color: #6c757d !important;
}

.card .text-muted {
    color: #6c757d !important;
}

/* Additional text contrast fixes */
.card .display-4, .card .display-5, .card .display-6 {
    color: var(--text-primary);
}

/* Stats card specific fixes */
.financial-card .h4, .financial-card .h5 {
    color: var(--text-primary);
}

.financial-card .text-muted {
    color: var(--text-secondary) !important;
}

/* League card fixes */
.league-card .card-title {
    color: var(--text-primary);
}

.league-card .text-muted {
    color: var(--text-secondary) !important;
}

/* Global text color fixes for all elements */
p, span, div, li, td, th, label, small, strong, em, i, b {
    color: inherit;
}

/* Force visibility for all content inside cards and containers */
.card *, .container *, .row *, .col *, .table * {
    color: inherit !important;
}

/* Override Bootstrap defaults that might interfere */
.card-body *, .card-text *, .card-title *, .card-subtitle * {
    color: var(--text-primary) !important;
}

/* Specific fixes for financial cards */
.financial-card *, .stat-card *, .league-card * {
    color: var(--text-primary) !important;
}

.financial-card .text-muted, .stat-card .text-muted, .league-card .text-muted {
    color: var(--text-secondary) !important;
}

/* Specific element color fixes */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Text utility classes */
.text-primary {
    color: var(--text-primary) !important;
}

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

.text-muted {
    color: var(--text-secondary) !important;
}

/* Stat card text fixes */
.stat-card h1, .stat-card h2, .stat-card h3, .stat-card h4, .stat-card h5, .stat-card h6,
.stat-card .h1, .stat-card .h2, .stat-card .h3, .stat-card .h4, .stat-card .h5, .stat-card .h6,
.stat-card p, .stat-card span, .stat-card div {
    color: var(--text-primary);
}

.stat-card .text-muted {
    color: var(--text-secondary) !important;
}

/* League card specific text fixes */
.league-card h1, .league-card h2, .league-card h3, .league-card h4, .league-card h5, .league-card h6,
.league-card .h1, .league-card .h2, .league-card .h3, .league-card .h4, .league-card .h5, .league-card .h6,
.league-card p, .league-card span, .league-card div {
    color: var(--text-primary);
}

/* Navigation link fixes */
.nav-link {
    color: var(--text-navbar) !important;
}

/* Button text color fixes */
.btn {
    color: white;
}

.btn-outline-secondary {
    color: var(--text-primary);
}

.btn-outline-secondary:hover {
    color: white;
}

/* Alert text fixes for different themes */
.alert p, .alert span, .alert div, .alert h1, .alert h2, .alert h3, .alert h4, .alert h5, .alert h6 {
    color: inherit;
}

/* Breadcrumb fixes */
.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* List group fixes */
.list-group-item {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Modal fixes */
.modal-content {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

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

/* Progress bar fixes */
.progress {
    background-color: var(--border-color);
}

/* Badge text fixes */
.badge {
    color: white;
}

/* Input group fixes */
.input-group-text {
    background: var(--form-bg);
    border-color: var(--form-border);
    color: var(--text-primary);
}

/* Close button fixes */
.btn-close {
    filter: none;
}

/* Link color fixes */
a {
    color: #667eea;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a6fd8;
}



/* Performance indicators card fixes */
.performance-card {
    background: var(--bg-card);
    color: var(--text-primary) !important;
}

.performance-card * {
    color: var(--text-primary) !important;
}

.performance-card .text-muted {
    color: var(--text-secondary) !important;
}

/* Season history table specific fixes */
.season-history-table {
    background: var(--table-bg);
    color: var(--text-primary) !important;
}

.season-history-table * {
    color: var(--text-primary) !important;
}

.season-history-table .text-muted {
    color: var(--text-secondary) !important;
}

/* Override any Bootstrap table striping that might cause issues */
.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary) !important;
}



/* Ensure dropdown menu text is visible */
.dropdown-menu {
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    color: var(--text-primary) !important;
}

.dropdown-item:hover {
    background-color: var(--table-hover);
    color: var(--text-primary) !important;
}

/* FINAL FIX: Force all text elements to be visible */
body, body * {
    color: var(--text-primary);
}

/* Only override specific elements that need different colors */
.text-white, .text-white * {
    color: white !important;
}

.text-success, .text-success * {
    color: #28a745 !important;
}

.text-danger, .text-danger * {
    color: #dc3545 !important;
}

.text-warning, .text-warning * {
    color: #ffc107 !important;
}

.text-info, .text-info * {
    color: #17a2b8 !important;
}

.text-muted, .text-muted * {
    color: var(--text-secondary) !important;
}



/* Fix any remaining Bootstrap overrides */
.table, .table * {
    color: var(--text-primary) !important;
}

.card, .card * {
    color: var(--text-primary) !important;
}

.card .text-muted, .table .text-muted {
    color: var(--text-secondary) !important;
}

/* Override any remaining opacity issues */
.table tbody tr td,
.table thead tr th,
.card-body,
.card-text,
.card-title {
    opacity: 1 !important;
}