/* Custom CSS for Fantasy Survivor League - Enhanced Tropical Theme with Dark Mode Support */

/* Dark mode CSS is working! */

/* Light mode color variables */
:root {
    --survivor-green: #1A4B3B;  /* Deep tropical forest green */
    --survivor-light-green: #2E6A55;  /* Richer, deeper teal */
    --survivor-sand: #F5D6A3;  /* Warm sandy beach tone */
    --survivor-coral: #E46D49;  /* Warm sunset orange-red */
    --survivor-dark: #2C3E3A;  /* Deep charcoal with green undertones */
    --survivor-light: #F9F4E6;  /* Soft, warm off-white */
    --survivor-water: #6BA6A9;  /* Muted ocean blue */
    --survivor-sunset: #F97D4E;  /* Bright sunset orange */
    
    /* Additional colors inspired by the image */
    --survivor-sky-orange: #F5A367;  /* Soft sunset orange */
    --survivor-sky-pink: #E98B6F;  /* Sunset pink */
    --survivor-deep-green: #1E3A32;  /* Deep forest green */
    
    /* Dynamic theme colors */
    --bg-primary: #F9F4E6;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fcfaf7;
    --text-primary: #2C3E3A;
    --text-secondary: #1A4B3B;
    --text-muted: #6c757d;
    --border-color: rgba(44, 53, 50, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: rgba(0, 0, 0, 0.1);
}

/* Dark mode color variables */
@media (prefers-color-scheme: dark) {
    :root {
        --survivor-green: #2D6E54;  /* Lighter forest green for dark mode */
        --survivor-light-green: #3E7A65;  /* Adjusted teal */
        --survivor-sand: #D4B483;  /* Muted sandy tone */
        --survivor-coral: #E46D49;  /* Keep coral vibrant */
        --survivor-dark: #E8E8E8;  /* Light text for dark backgrounds */
        --survivor-light: #1a1f1c;  /* Dark background */
        --survivor-water: #7BB6B9;  /* Brighter ocean blue */
        --survivor-sunset: #F97D4E;  /* Keep sunset vibrant */
        
        --survivor-sky-orange: #F5A367;  /* Keep vibrant */
        --survivor-sky-pink: #E98B6F;  /* Keep vibrant */
        --survivor-deep-green: #1E3A32;  /* Darker forest green */
        
        /* Dark theme dynamic colors */
        --bg-primary: #1a1f1c;  /* Dark olive background */
        --bg-secondary: #242b27;  /* Darker card background */
        --bg-tertiary: #2a312d;  /* Even darker sections */
        --text-primary: #E8E8E8;  /* Light text */
        --text-secondary: #2D6E54;  /* Green headers */
        --text-muted: #9ca3af;  /* Muted text */
        --border-color: rgba(255, 255, 255, 0.15);
        --shadow-color: rgba(0, 0, 0, 0.4);
        --card-bg: #242b27;
        --input-bg: #2a312d;
        --input-border: rgba(255, 255, 255, 0.2);
    }
}

/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-secondary);
    font-weight: 700;
}

.text-primary {
    color: var(--survivor-coral) !important;
}

/* Custom Container */
.container {
    position: relative;
}

/* Button Styling */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.winner-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

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

.btn-primary {
    background-color: var(--survivor-coral);
    border-color: var(--survivor-coral);
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #d45e41;
    border-color: #d45e41;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(231, 111, 81, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--survivor-coral);
    border-color: var(--survivor-coral);
}

.btn-outline-primary:hover {
    background-color: var(--survivor-coral);
    border-color: var(--survivor-coral);
    transform: translateY(-3px);
}

.btn-light {
    background-color: var(--survivor-light);
    border-color: var(--survivor-light);
    color: var(--survivor-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
    background-color: white;
    color: var(--survivor-coral);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Navbar Styling */
.navbar {
    background-color: var(--survivor-green) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.navbar-dark .navbar-brand {
    color: var(--survivor-sand);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-dark .navbar-brand i {
    color: var(--survivor-coral);
}

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

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--survivor-sand);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: var(--survivor-sand);
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: var(--survivor-coral);
    border-radius: 3px 3px 0 0;
}

.navbar .nav-link.disabled {
    color: rgba(255, 255, 255, 0.3) !important;
    opacity: 0.75;
    text-decoration: none;
}

.navbar .nav-link.disabled:hover {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Card Styling */
.card {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px var(--shadow-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.card:hover {
    box-shadow: 0 12px 25px var(--shadow-color);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 0;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card.shadow {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

.card-header.bg-primary {
    background-color: var(--survivor-green) !important;
}

/* Dashboard cards */
.card.border-left-primary {
    border-left: 0.25rem solid var(--survivor-coral) !important;
}

.card.border-left-success {
    border-left: 0.25rem solid var(--survivor-green) !important;
}

.card.border-left-info {
    border-left: 0.25rem solid var(--survivor-water) !important;
}

.card.border-left-warning {
    border-left: 0.25rem solid var(--survivor-sunset) !important;
}

/* Alert Styling */
.alert {
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: none;
}

.alert-primary {
    background-color: rgba(231, 111, 81, 0.15);
    border-left: 4px solid var(--survivor-coral);
    color: #c25036;
}

.alert-success {
    background-color: rgba(26, 83, 54, 0.15);
    border-left: 4px solid var(--survivor-green);
    color: #0e3d25;
}

.alert-info {
    background-color: rgba(78, 205, 196, 0.15);
    border-left: 4px solid var(--survivor-water);
    color: #2a7b75;
}

.alert-warning {
    background-color: rgba(248, 211, 134, 0.2);
    border-left: 4px solid var(--survivor-sand);
    color: #ba9132;
}

/* Badge Styling */
.badge {
    padding: 0.5em 0.85em;
    font-weight: 600;
    border-radius: 0.5rem;
}

.badge.bg-primary, .badge.text-bg-primary {
    background-color: var(--survivor-coral) !important;
}

.badge.bg-success, .badge.text-bg-success {
    background-color: var(--survivor-light-green) !important;
}

.badge.bg-info, .badge.text-bg-info {
    background-color: var(--survivor-water) !important;
}

.badge.bg-warning, .badge.text-bg-warning {
    background-color: var(--survivor-sand) !important;
    color: var(--survivor-dark) !important;
}

/* Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 600;
    color: var(--text-primary);
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(248, 211, 134, 0.1);
    transform: scale(1.01);
}

.table-primary, .table-primary > th, .table-primary > td {
    background-color: rgba(231, 111, 81, 0.1);
}

/* List Group Styling */
.list-group-item {
    border-color: var(--border-color);
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.list-group-item:hover {
    background-color: rgba(248, 211, 134, 0.08);
}

.list-group-item-primary {
    background-color: rgba(231, 111, 81, 0.1);
    color: var(--survivor-coral);
}

/* Footer Styling */
footer {
    margin-top: auto;
    background-color: var(--survivor-dark) !important;
    color: var(--survivor-light);
    padding-top: 3rem;
    padding-bottom: 2rem;
}

footer h5 {
    color: var(--survivor-sand);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

footer h5::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--survivor-coral);
    border-radius: 3px;
}

footer a.text-white {
    color: var(--survivor-sand) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

footer a.text-white:hover {
    color: var(--survivor-coral) !important;
    transform: translateX(5px);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border-color: var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--survivor-coral);
    box-shadow: 0 0 0 0.25rem rgba(231, 111, 81, 0.25);
}

.form-check-input:checked {
    background-color: var(--survivor-coral);
    border-color: var(--survivor-coral);
}

/* Player cards styling */
.player-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.player-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.player-card.selected {
    border: 3px solid var(--survivor-coral) !important;
}

.player-img-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.player-img-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    z-index: 1;
}

.player-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: all 0.5s ease;
}

.player-card:hover .player-img-container img {
    transform: scale(1.05);
}

/* Winner card styling */
.winner-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.winner-card.selected {
    border-color: var(--survivor-coral);
    background-color: rgba(231, 111, 81, 0.1);
}

/* Custom page titles */
.page-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--survivor-coral);
    border-radius: 3px;
}

/* Dashboard stats and icons */
.icon-square {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(231, 111, 81, 0.1);
    color: var(--survivor-coral);
}

/* Fun tropical elements */
.tropical-pattern {
    position: relative;
}

.tropical-pattern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/static/img/palm-pattern.faf9342451bb.png");
    background-size: 200px;
    opacity: 0.03;
    z-index: -1;
}


.tribe-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--survivor-sand);
    color: var(--survivor-dark);
    background-color: rgba(248, 211, 134, 0.15);
}

/* Castaway card styles */
.castaway-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    border-top: 4px solid var(--survivor-coral);
    border: 1px solid var(--border-color);
    height: 100%;
}

.castaway-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.castaway-img {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.castaway-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: all 0.5s ease;
}

.castaway-card:hover .castaway-img img {
    transform: scale(1.05);
}

.castaway-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.tribe-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.status-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    color: white;
}

.winner-pick-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 11;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--survivor-sunset);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 2px solid white;
}

/* Points display */
.points-display {
    text-align: center;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.points-display::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 150px;
    opacity: 0.1;
    z-index: 0;
}

.points-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--survivor-coral);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.points-label {
    font-size: 1.2rem;
    color: var(--survivor-green);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* CTA Section Styling */
.cta-section {
    background: linear-gradient(135deg, var(--survivor-green), #0e3d25);
    color: #ffffff;
    border-radius: 1.25rem;
    padding: 4rem 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("/static/img/palm-pattern.faf9342451bb.png");
    background-size: 300px;
    opacity: 0.07;
    z-index: 0;
}

.cta-section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cta-section p {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cta-section .btn {
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
  .navbar-expand-md .navbar-collapse {
    display: none !important;
  }
  .navbar-expand-md .navbar-toggler {
    display: block;
  }
  .navbar-expand-md .navbar-collapse.show {
    display: block !important;
  }
}


/* Hero Section Styling */
.hero-section {
    position: relative;
    background: #1a1a1a url("../img/survivor-banner.0cc5c9897025.jpg") center center / cover no-repeat;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    padding: 8rem 0;
    margin-bottom: 4rem;
    margin-top: -2rem;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.65));
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-section p {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Feature cards styling for home page */
.feature-card {
    background-color: var(--card-bg);
    border-radius: 1.25rem;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: all 0.3s ease;
    border-top: 4px solid var(--survivor-coral);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(36, 91, 55, 0.2);
}

.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: rgba(231, 111, 81, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 2px dashed var(--survivor-coral);
}

.feature-card:hover .icon-circle {
    transform: rotate(10deg);
    background-color: rgba(231, 111, 81, 0.15);
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--survivor-coral);
    border-radius: 3px;
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    /* Force all white backgrounds to use dark theme */
    .bg-white {
        background-color: var(--card-bg) !important;
    }
    
    .bg-light {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
    }
    
    /* Fix Bootstrap card components */
    .card,
    .card-body,
    .card-header,
    .card-footer {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    /* Fix any remaining white divs */
    div[style*="background-color: white"],
    div[style*="background-color: #fff"],
    div[style*="background-color: #ffffff"] {
        background-color: var(--card-bg) !important;
    }
    
    /* Enhanced shadows for dark mode */
    .card:hover {
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
    }
    
    .castaway-card:hover {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }
    
    .feature-card:hover {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    }
    
    .player-card:hover {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }
    
    /* Adjust table hover for dark mode */
    .table-hover tbody tr:hover {
        background-color: rgba(45, 110, 84, 0.15);
    }
    
    /* List group item hover for dark mode */
    .list-group-item:hover {
        background-color: rgba(45, 110, 84, 0.15);
    }
    
    /* Button adjustments for dark mode */
    .btn-light {
        background-color: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .btn-light:hover {
        background-color: var(--bg-tertiary);
        color: var(--survivor-coral);
    }
    
    /* Alert adjustments for dark mode */
    .alert,
    .alert-primary {
        background-color: rgba(228, 109, 73, 0.2) !important;
        color: #f5a367 !important;
        border-color: rgba(228, 109, 73, 0.3) !important;
    }
    
    .alert-success {
        background-color: rgba(45, 110, 84, 0.2) !important;
        color: #7bb6b9 !important;
        border-color: rgba(45, 110, 84, 0.3) !important;
    }
    
    .alert-info {
        background-color: rgba(123, 182, 185, 0.2) !important;
        color: #7bb6b9 !important;
        border-color: rgba(123, 182, 185, 0.3) !important;
    }
    
    .alert-warning {
        background-color: rgba(212, 180, 131, 0.2) !important;
        color: #d4b483 !important;
        border-color: rgba(212, 180, 131, 0.3) !important;
    }
    
    .alert-danger {
        background-color: rgba(220, 53, 69, 0.2) !important;
        color: #f56565 !important;
        border-color: rgba(220, 53, 69, 0.3) !important;
    }
    
    /* Navbar adjustments for dark mode */
    .navbar {
        background-color: var(--survivor-deep-green) !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Hero section overlay adjustment for dark mode */
    .hero-section::before {
        background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
    }
    
    /* Form placeholder text for dark mode */
    .form-control::placeholder,
    .form-select::placeholder {
        color: var(--text-muted);
        opacity: 0.7;
    }
    
    /* Tribe badge adjustments */
    .tribe-badge {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    }
    
    .status-badge {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    }
    
    /* Fix specific problematic white areas */
    
    /* Dashboard recent scoring events */
    .event-item,
    .events-list .event-item {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Castaway cards on castaways page */
    .castaway-card {
        background-color: var(--card-bg) !important;
    }
    
    .castaway-info {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Player cards */
    .player-card {
        background-color: var(--card-bg) !important;
    }
    
    /* Feature cards on home page */
    .feature-card {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* League page cards */
    .league-card,
    .manage-card {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Points breakdown and leaderboard components */
    .points-breakdown,
    .leaderboard-card,
    .score-card {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Table components */
    .table {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    .table td,
    .table th {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    /* Generic white background fixes */
    [style*="background-color: white"],
    [style*="background-color: #fff"],
    [style*="background-color: #ffffff"],
    [style*="background: white"],
    [style*="background: #fff"],
    [style*="background: #ffffff"] {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Modal and dropdown fixes */
    .modal-content,
    .dropdown-menu {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    /* Dropdown item specific fixes */
    .dropdown-item {
        color: var(--text-primary) !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
    }
    
    .dropdown-item.active,
    .dropdown-item:active {
        background-color: var(--survivor-coral) !important;
        color: white !important;
    }
    
    .dropdown-divider {
        border-color: var(--border-color) !important;
    }
    
    /* Dropdown toggle button fixes */
    .dropdown-toggle {
        color: var(--text-primary) !important;
    }
    
    .btn-light.dropdown-toggle {
        background-color: var(--bg-secondary) !important;
        border-color: var(--border-color) !important;
        color: var(--text-primary) !important;
    }
    
    .btn-light.dropdown-toggle:hover,
    .btn-light.dropdown-toggle:focus {
        background-color: var(--bg-tertiary) !important;
        color: var(--survivor-coral) !important;
    }
    
    /* Navbar dropdown specific fixes */
    .navbar-nav .dropdown-menu {
        background-color: var(--card-bg) !important;
    }
    
    .navbar-nav .dropdown-item {
        color: var(--text-primary) !important;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: var(--bg-tertiary) !important;
        color: var(--survivor-coral) !important;
    }
    
    /* Input group fixes */
    .input-group-text {
        background-color: var(--input-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--input-border) !important;
    }
    
    /* Comprehensive Bootstrap overrides for remaining white backgrounds */
    .bg-white,
    .bg-light,
    .table-light,
    .list-group-item,
    .card-img-overlay,
    .toast,
    .tooltip-inner,
    .popover,
    .popover-body,
    .popover-header,
    .accordion-body,
    .offcanvas,
    .dropdown-menu,
    .modal-content,
    .modal-header,
    .modal-body,
    .modal-footer {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Table overrides */
    .table-striped > tbody > tr:nth-of-type(odd) > td,
    .table-striped > tbody > tr:nth-of-type(odd) > th {
        background-color: var(--bg-tertiary) !important;
    }
    
    .table-bordered,
    .table-bordered > thead > tr > th,
    .table-bordered > tbody > tr > th,
    .table-bordered > tfoot > tr > th,
    .table-bordered > thead > tr > td,
    .table-bordered > tbody > tr > td,
    .table-bordered > tfoot > tr > td {
        border-color: var(--border-color) !important;
    }
    
    /* Navbar and navigation fixes */
    .navbar-light,
    .navbar-expand,
    .nav-tabs,
    .nav-pills {
        background-color: var(--card-bg) !important;
    }
    
    /* Pagination */
    .page-link {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .page-item.active .page-link {
        background-color: var(--survivor-coral) !important;
        border-color: var(--survivor-coral) !important;
    }
    
    /* Progress bars */
    .progress {
        background-color: var(--bg-tertiary) !important;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        background-color: var(--bg-tertiary) !important;
    }
    
    /* Fix any inline styles with important declarations */
    [style*="background: white"],
    [style*="background: #fff"],
    [style*="background: #ffffff"],
    [style*="background-color: white"],
    [style*="background-color: #fff"], 
    [style*="background-color: #ffffff"],
    [style*="background-color: #f8f9fa"],
    [style*="background-color: rgb(255, 255, 255)"] {
        background-color: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
}