/* RSI-inspired color palette */
:root {
    --rsi-blue-dark: #0e1a2b;
    --rsi-blue: #183153;
    --rsi-blue-light: #2e4a7d;
    --rsi-accent: #00b4ff;
    --rsi-gold: #ffd700;
    --rsi-white: #f5f7fa;
    --rsi-gray: #bfc9d1;
    --rsi-gray-dark: #232b38;
    --rsi-card-bg: #162033;
    --rsi-card-border: #22304a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--rsi-blue-dark);
    color: var(--rsi-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
    padding-top: 70px; /* Adjust based on your navbar height */
}

/* Navbar Styling */
.navbar {
    background-color: var(--rsi-blue);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    width: 100% !important;
}

.navbar-brand {
    color: var(--rsi-accent);
    font-weight: bold;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--rsi-gray);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--rsi-accent);
}

.navbar-dark .navbar-nav .active > .nav-link {
    color: var(--rsi-gold);
}

/* Dropdown Menu Styling */
.dropdown-menu {
    background-color: var(--rsi-blue);
    border: 1px solid var(--rsi-card-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1050;
}

.dropdown-item {
    color: var(--rsi-gray);
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--rsi-blue-light);
    color: var(--rsi-accent);
}

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

/* Footer Styling */
.footer {
    background-color: var(--rsi-blue);
    color: var(--rsi-gray);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.footer a {
    color: var(--rsi-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--rsi-accent);
    text-decoration: none;
}

.footer h5 {
    color: var(--rsi-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Card Styling */
.card {
    background-color: var(--rsi-card-bg);
    border: 1px solid var(--rsi-card-border);
    border-radius: 0.5rem;
    color: var(--rsi-white);
}

.card-header {
    background-color: var(--rsi-blue-light);
    color: var (--rsi-white);
    border-bottom: 1px solid var(--rsi-accent);
}

/* Button Styling */
.btn-primary {
    background-color: var(--rsi-accent);
    border-color: var(--rsi-accent);
    color: #0e1a2b;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--rsi-gold);
    border-color: var(--rsi-gold);
    color: #0e1a2b;
}

.btn-outline-primary {
    color: var(--rsi-accent);
    border-color: var(--rsi-accent);
}

.btn-outline-primary:hover {
    background-color: var(--rsi-accent);
    border-color: var(--rsi-accent);
    color: #0e1a2b;
}

/* Form Styling */
.form-control {
    background-color: var(--rsi-card-bg);
    border: 1px solid var(--rsi-card-border);
    color: var(--rsi-white);
}

.form-control:focus {
    background-color: var(--rsi-card-bg);
    border-color: var(--rsi-accent);
    color: var(--rsi-white);
    box-shadow: 0 0 0 0.25rem rgba(0,180,255,0.15);
}

/* Custom Classes */
.text-accent {
    color: var(--rsi-accent);
}

.text-gold {
    color: var (--rsi-gold);
}

/* Auth pages styling */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
}

/* Ship Card Styling - REMOVE THIS SECTION */
/* .ship-card {
    border: 1.5px solid var(--rsi-card-border);
    background: linear-gradient(135deg, var(--rsi-blue-dark) 60%, var(--rsi-blue-light) 100%);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.2s;
}

.ship-card:hover, .ship-select-card.selected {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 24px rgba(0, 180, 255, 0.15);
    border-color: var(--rsi-accent);
    background: linear-gradient(135deg, var(--rsi-blue-light) 60%, var(--rsi-accent) 100%);
}

.ship-card img {
    object-fit: cover;
    height: 180px;
    border-bottom: 1px solid var(--rsi-card-border);
} */

/* Dual Range Slider */
.dual-range-container {
    position: relative;
    height: 40px;
    margin: 10px 0;
}

.dual-range-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
    outline: none;
}

.dual-range-container input[type="range"]::-webkit-slider-track {
    height: 6px;
    background: var(--rsi-gray-dark);
    border-radius: 3px;
    border: none;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--rsi-accent);
    pointer-events: all;
    cursor: pointer;
    border: 2px solid var(--rsi-blue-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    margin-top: -7px;
}

.dual-range-container input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--rsi-gray-dark);
    border-radius: 3px;
    border: none;
}

.dual-range-container input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--rsi-accent);
    pointer-events: all;
    cursor: pointer;
    border: 2px solid var(--rsi-blue-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    -moz-appearance: none;
}

/* Ensure proper stacking order for dual range sliders */
.dual-range-container input[type="range"]:first-child {
    z-index: 1;
}

.dual-range-container input[type="range"]:last-child {
    z-index: 2;
}

.dual-range-container input[type="range"]:focus {
    z-index: 20;
    outline: none;
}

.dual-range-container input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0,180,255,0.3);
    z-index: 20;
}

.dual-range-container input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0,180,255,0.3);
    z-index: 20;
}

/* Firefox specific fixes */
.dual-range-container input[type="range"]::-moz-focus-outer {
    border: 0;
}

/* Webkit specific improvements */
.dual-range-container input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--rsi-gray-dark);
    border-radius: 3px;
}

/* Remove any background overlays from ship cards */
.ship-card .card::before,
.ship-card .card::after {
    display: none !important;
}

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

::-webkit-scrollbar-track {
    background: var(--rsi-blue-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--rsi-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--rsi-accent);
}

/* Alerts */
.alert {
    color: var(--rsi-blue-dark);
    font-weight: 500;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: var(--rsi-accent);
    color: var(--rsi-blue-dark);
}

.alert-success {
    background-color: #d1f7e6;
    border-color: #1bc47d;
    color: #0e1a2b;
}

.alert-danger, .alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #7c5700;
}

/* Manufacturer scroll menu for ship selection modal */
.manufacturer-scroll-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.5rem;
    background: #162033 !important;
    padding: 1rem;
    margin-bottom: 0;
    border-bottom: 1px solid #22304a;
    position: sticky;
    top: 0;
    z-index: 1055;
}

.manufacturer-scroll-menu.sticky-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 1055 !important;
    background: #162033 !important;
}

.manufacturer-scroll-menu .btn {
    font-size: 0.95rem;
    background: #22304a;
    color: var(--rsi-gold);
    border: 1px solid #22304a;
    border-radius: 20px;
    padding: 0.25rem 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.manufacturer-scroll-menu .btn.active,
.manufacturer-scroll-menu .btn:hover {
    background: var(--rsi-gold);
    color: var(--rsi-card-bg);
    border-color: var(--rsi-gold);
}

/* Modal fullscreen background fix */
.modal-fullscreen .modal-content {
    background: #162033 !important;
    height: 100vh !important;
}

.modal-fullscreen .modal-body {
    background: #162033 !important;
}

/* Ensure modal backdrop stays consistent */
.modal.show {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.modal-backdrop.show {
    opacity: 0.8 !important;
}

/* Manufacturer title styling - simplified to show only logo */
.manufacturer-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0 20px 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.manufacturer-title::before {
    display: none;
}

/* Manufacturer title fallback text styling for no-logo cases */
.manufacturer-title.no-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--rsi-gold);
    text-align: center;
}

.manufacturer-title.no-logo span {
    margin: 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--rsi-blue-dark) 0%, var(--rsi-blue-light) 100%);
    border: 2px solid var(--rsi-gold);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
}

/* Manufacturer logo in section titles - very large logo */
.manufacturer-title .manufacturer-logo-title {
    width: 400px;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    max-height: 120px;
}

/* Responsive adjustments for manufacturer logos */
@media (max-width: 991px) {
    .manufacturer-title .manufacturer-logo-title {
        width: 300px;
        max-width: 300px;
        max-height: 90px;
    }
    
    .manufacturer-title.no-logo {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .manufacturer-title .manufacturer-logo-title {
        width: 250px;
        max-width: 250px;
        max-height: 75px;
    }
    
    .manufacturer-title.no-logo {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .manufacturer-title .manufacturer-logo-title {
        width: 200px;
        max-width: 200px;
        max-height: 60px;
    }
    
    .manufacturer-title.no-logo {
        font-size: 1rem;
    }
}

/* Responsive adjustments for thumbnails */
@media (max-width: 1500px) {
    /* Large screens - 2 columns */
    .row-cols-lg-3, .row-cols-xl-3 {
        --bs-columns: 2;
    }
    
    .row-cols-lg-3 > *, .row-cols-xl-3 > * {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 1000px) {
    /* Medium screens and below - 1 column */
    .row-cols-md-2, .row-cols-lg-3, .row-cols-xl-3 {
        --bs-columns: 1;
    }
    
    .row-cols-md-2 > *, .row-cols-lg-3 > *, .row-cols-xl-3 > * {
        flex: 0 0 auto;
        width: 100%;
    }
    
    /* Move filters to own row on tablets */
    .container-fluid .row {
        flex-direction: column;
    }
    
    .sidebar-filters {
        position: static;
        order: 1;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
        border-right: none;
        border: 1px solid var(--rsi-card-border);
        border-radius: 0.5rem;
    }
    
    .ships-container {
        order: 2;
        width: 100%;
        padding-left: 0;
    }
    
    /* Enhanced mobile filter styling */
    .filter-content {
        max-height: 0;
        overflow: hidden;
        padding: 0 1rem 0 1.5rem;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .filter-content.show {
        max-height: 300px;
        overflow-y: auto;
        padding: 1rem 1rem 1rem 1.5rem;
        border-top: 1px solid var(--rsi-card-border);
    }
    
    .filter-header {
        background: var(--rsi-blue);
        color: var(--rsi-white);
    }
}

@media (max-width: 991px) {
    /* Tablet/medium screens adjustments */
    .ship-thumbnail-container {
        width: 110px;
        height: 66px;
        bottom: 0;
        left: 0;
    }

    .manufacturer-logo-container {
        width: 110px;
        height: 66px;
    }

    .manufacturer-logo-card {
        padding: 10px;
    }

    .ship-card .card-header {
        padding-left: 120px;
    }

    .ship-card .card-body {
        padding-left: 120px;
        padding-top: 16px;
    }
    
    /* Ensure badges remain properly positioned on tablets */
    .ship-card .card-body .mb-3,
    .ship-card .card-body .d-flex {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .ship-thumbnail-container {
        width: 100px;
        height: 60px;
        bottom: 0;
        left: 0;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .manufacturer-title {
        font-size: 1.1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .card, .ship-card .card {
        border-width: 1px;
    }

    .modal-ship-card {
        min-height: 100px;
    }

    .manufacturer-logo-container {
        width: 100px;
        height: 60px;
    }

    .manufacturer-logo-card {
        padding: 8px;
    }

    .ship-card .card-header {
        padding-left: 110px;
    }

    .ship-card .card-body {
        padding-left: 110px;
        padding-top: 16px;
    }
    
    /* Adjust card minimum height for mobile */
    .ship-card .card {
        min-height: 200px;
    }
    
    /* Stack badges vertically on small screens for better readability */
    .ship-card .card-body .d-flex.flex-wrap {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    
    .ship-card .card-body .d-flex.flex-wrap .badge {
        margin-bottom: 0.25rem;
        margin-right: 0.5rem;
    }
    
    /* Mobile filter improvements */
    .sidebar-filters {
        background: var(--rsi-card-bg);
        border: 1px solid var(--rsi-card-border);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-bottom: 1rem;
        position: static;
    }
    
    .filter-header {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--rsi-card-border);
        margin-bottom: 0;
    }
    
    .filter-section {
        border-bottom: 1px solid var(--rsi-card-border);
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ship-thumbnail-container {
        width: 80px;
        height: 48px;
        bottom: 0;
        left: 0;
    }

    .manufacturer-logo-container {
        width: 80px;
        height: 48px;
    }

    .manufacturer-logo-card {
        padding: 6px;
    }

    .ship-card .card-header {
        padding-left: 90px;
        font-size: 0.8rem;
    }
    
    .ship-card .card-header h5 {
        font-size: 0.85rem;
        color: var(--rsi-white);
    }
    
    .ship-card .card-body {
        padding-left: 90px;
        padding-top: 16px;
        padding: 12px;
        padding-left: 90px;
    }
    
    /* Ensure badges don't overlap on very small screens */
    .ship-card .card-body .mb-3,
    .ship-card .card-body .d-flex {
        margin-left: 0;
    }
    
    /* Very small screens - ensure single column with larger cards */
    .ship-card .card {
        min-height: 180px;
    }
    
    /* Reduce badge font size on very small screens */
    .ship-card .card-body .badge {
        font-size: 0.7rem;
        padding: 0.2em 0.4em;
    }
    
    /* Adjust icon sizes in badges */
    .ship-card .card-body .badge i {
        font-size: 0.8em;
    }
    
    /* Make dropdown button smaller on mobile */
    .ship-card .dropdown .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Additional responsive utilities for fleet and ships pages */
@media (max-width: 1200px) {
    /* Large screens - still 3 columns but with better spacing */
    .ships-container {
        padding-left: 0.5rem;
    }
}

@media (max-width: 992px) {
    /* Medium screens - 2 columns */
    .container-fluid .row {
        margin: 0;
    }
    
    .sidebar-filters {
        margin-bottom: 1rem;
    }
    
    .ships-container {
        padding-left: 0;
    }
}

@media (max-width: 576px) {
    /* Extra small screens - mobile optimizations */
    .container-fluid {
        padding: 0.5rem;
    }
    
    .ship-card .card-header h5 {
        font-size: 0.9rem;
        line-height: 1.2;
        color: var(--rsi-white);
    }
    
    /* Reduce gap between cards on mobile */
    .g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* Make manufacturer logos smaller on mobile for better layout */
    .manufacturer-title .manufacturer-logo-title {
        width: 150px;
    }
    
    /* Adjust modal for mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-dialog.modal-xl {
        max-width: none;
        width: auto;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .navbar, .footer {
        background-color: #1e1e1e;
        color: #b0b0b0;
    }

    .card, .ship-card .card {
        background-color: #2c2c2c;
        border-color: #444;
    }

    .btn-primary {
        background-color: #0078d4;
        border-color: #0078d4;
    }

    .btn-primary:hover {
        background-color: #106ebe;
        border-color: #106ebe;
    }

    .manufacturer-title {
        color: #ffd700;
    }

    .alert {
        color: #ffffff;
    }

    .alert-info {
        background-color: #2b2b2b;
        border-color: #0078d4;
        color: #ffffff;
    }

    .alert-success {
        background-color: #2b2b2b;
        border-color: #1bc47d;
        color: #ffffff;
    }

    .alert-danger, .alert-warning {
        background-color: #2b2b2b;
        border-color: #ffecb5;
        color: #ffffff;
    }
}

/* Ship thumbnail container - positioned bottom left of card */
.ship-thumbnail-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 90px;
    background: rgba(14, 26, 43, 0.95);
    border: 2px solid var(--rsi-accent);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 180, 255, 0.3);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ship-thumbnail-container:hover {
    box-shadow: 0 4px 12px rgba(0, 180, 255, 0.5);
    border-color: var(--rsi-gold);
}

.ship-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    filter: brightness(1.1) contrast(1.1);
}

.ship-thumbnail:hover {
    transform: scale(1.05);
    filter: brightness(1.3) contrast(1.2);
}

/* Manufacturer logo container for cards - 150px width with auto height */
.manufacturer-logo-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 90px;
    background: rgba(24, 49, 83, 0.95);
    border: 2px solid var(--rsi-accent);
    border-radius: 0.5rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 180, 255, 0.3);
    padding: 15px;
    overflow: hidden;
}

.manufacturer-logo-card {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
    transition: all 0.2s ease;
}

.manufacturer-logo-card:hover {
    filter: brightness(1.4) contrast(1.2);
    transform: scale(1.05);
}

/* Ensure ship cards have relative positioning for logo container */
.ship-card .card {
    position: relative;
    overflow: visible;
}

/* Adjust card header to account for logo container and align title right */
.ship-card .card-header {
    padding-left: 170px;
    text-align: right;
}

.ship-card .card-header h5 {
    padding-left: 0;
    margin-bottom: 0;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--rsi-white);
}

/* Adjust card body padding to prevent badge overlap with logo */
.ship-card .card-body {
    padding: 16px;
    padding-left: 170px;
    padding-top: 16px;
    background: transparent !important;
}

/* Ensure badge containers have proper left margin */
.ship-card .card-body .mb-3,
.ship-card .card-body .d-flex {
    margin-left: 0;
    padding-left: 0;
}

/* Add specific margin for badge containers to clear logos/thumbnails */
.ship-card .card-body .d-flex.flex-wrap.gap-1 {
    margin-left: 0;
}

/* Fleet page specific badge positioning */
#shipsGrid .card-body .mb-3,
#shipsGrid .card-body .d-flex,
.fleet-page .card-body .mb-3,
.fleet-page .card-body .d-flex,
.row .col .card-body .mb-3,
.row .col .card-body .d-flex {
    margin-left: 0;
    padding-left: 0;
}

/* Fleet page specific - ensure all cards have ship-card class styling */
#shipsGrid .card,
.fleet-page .card,
.row .col .card {
    background: linear-gradient(135deg, var(--rsi-blue-dark) 60%, var(--rsi-blue-light) 100%) !important;
    color: var(--rsi-white) !important;
    border: 1.5px solid var(--rsi-card-border) !important;
    box-shadow: 0 2px 12px rgba(0,180,255,0.08);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
    position: relative;
}

#shipsGrid .card:hover,
.fleet-page .card:hover,
.row .col .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,180,255,0.15);
    border-color: var(--rsi-accent) !important;
    background: linear-gradient(135deg, var(--rsi-blue-light) 60%, var(--rsi-accent) 100%) !important;
}

#shipsGrid .card-header,
.fleet-page .card-header,
.row .col .card-header {
    background: var(--rsi-blue) !important;
    color: var(--rsi-gold) !important;
    border-bottom: 1px solid var(--rsi-accent) !important;
    padding: 12px 16px;
}

#shipsGrid .card-header h5,
.fleet-page .card-header h5,
.row .col .card-header h5 {
    font-size: 0.9rem;
    color: var(--rsi-white) !important;
    font-weight: 600;
}

/* Modal card selection states */
.modal-ship-card:hover {
    transform: translateY(-3px);
    border-color: var(--rsi-accent);
    box-shadow: 0 5px 15px rgba(0,180,255,0.15);
}

.modal-ship-card.selected {
    border-color: var(--rsi-accent);
    background: linear-gradient(135deg, var(--rsi-blue-light) 60%, var(--rsi-accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,180,255,0.3);
}

.modal-ship-card.in-fleet {
    border-color: #28a745;
    border-width: 3px;
    background: linear-gradient(135deg, #1a4d2e 0%, #2d5a2d 50%, #1e3a20 100%);
    opacity: 1;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.modal-ship-card.in-fleet .card-header h5 {
    color: #7fff7f !important;
}

.modal-ship-card.scheduled-removal {
    border-color: #dc3545;
    border-width: 3px;
    background: linear-gradient(135deg, #4d1a1a 0%, #5d2a2a 50%, #3a1e1e 100%);
    opacity: 1;
    animation: pulse-red 2s infinite;
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.5);
}

.modal-ship-card.scheduled-removal .card-header h5 {
    color: #ff7f7f !important;
}

.modal-ship-card.selected.in-fleet {
    border-color: var(--rsi-gold);
    background: linear-gradient(135deg, var(--rsi-blue-light) 60%, var(--rsi-gold) 100%);
    opacity: 1;
}

/* Will add badge styling */
.will-add-badge .badge {
    font-size: 0.85rem;
    padding: 0.5em 0.75em;
    box-shadow: 0 2px 4px rgba(0,180,255,0.3);
}

/* In fleet badge styling */
.modal-ship-card.in-fleet .mt-2 .badge {
    font-size: 0.85rem;
    padding: 0.5em 0.75em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-ship-card.in-fleet .mt-2 .badge:hover {
    transform: scale(1.05);
}

/* Pulse animation for scheduled removal */
@keyframes pulse-red {
    0% {
        box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 8px 20px rgba(220, 53, 69, 0.6);
    }
    100% {
        box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
    }
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--rsi-accent);
}

/* Filter section styling */
.filter-section {
    margin-bottom: 1rem;
    border: 1px solid var(--rsi-card-border);
    border-radius: 0.375rem;
    background: var(--rsi-card-bg);
    overflow: hidden;
}

.filter-header {
    padding: 0.75rem 1rem;
    background: var(--rsi-blue-light);
    border-bottom: 1px solid var(--rsi-card-border);
    margin-bottom: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.filter-header:hover {
    background: var(--rsi-blue);
}

.filter-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--rsi-white);
    font-size: 0.9rem;
}

.filter-header i {
    transition: transform 0.2s ease;
}

.filter-content {
    padding: 1rem 1rem 1rem 1.5rem;
    background: var(--rsi-card-bg);
    border-top: 1px solid var(--rsi-card-border);
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.filter-content.collapsed {
    max-height: 0;
    padding: 0 1rem 0 1.5rem;
    overflow: hidden;
    border-top: none;
}

/* Sidebar filters container */
.sidebar-filters {
    background: var(--rsi-blue-dark);
    border-right: 1px solid var(--rsi-card-border);
    padding: 1rem;
    height: calc(100vh - 70px); /* Account for navbar height */
    overflow-y: auto;
    position: sticky;
    top: 70px; /* Position below the fixed navbar */
}

.sidebar-filters h4 {
    color: var(--rsi-accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rsi-accent);
}

/* Form controls within filters */
.filter-content .form-check {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
}

.filter-content .form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.filter-content .form-check-label {
    color: var(--rsi-gray);
    font-size: 0.875rem;
    cursor: pointer;
    padding-left: 0;
    margin-bottom: 0;
    line-height: 1.2;
    flex: 1;
}

.filter-content .form-check-input:checked {
    background-color: var(--rsi-accent);
    border-color: var(--rsi-accent);
}

.filter-content .form-check-input:focus {
    border-color: var(--rsi-accent);
    box-shadow: 0 0 0 0.25rem rgba(0, 180, 255, 0.25);
}

/* Range sliders in filters */
.filter-content .form-range {
    margin: 0.5rem 0;
}

.filter-content .form-label {
    color: var(--rsi-white);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Search box styling */
.sidebar-filters .input-group {
    margin-bottom: 1rem;
    position: relative;
}

.sidebar-filters .input-group-text {
    background: var(--rsi-card-bg);
    border-color: var(--rsi-card-border);
    color: var(--rsi-gray);
}

.sidebar-filters .form-control {
    background: var(--rsi-card-bg);
    border-color: var(--rsi-card-border);
    color: var(--rsi-white);
    padding-right: 2.5rem;
}

.sidebar-filters .form-control:focus {
    background: var(--rsi-card-bg);
    border-color: var(--rsi-accent);
    color: var(--rsi-white);
    box-shadow: 0 0 0 0.25rem rgba(0, 180, 255, 0.15);
}

/* Fix clear button positioning in input groups */
.sidebar-filters .input-group .btn-outline-secondary {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.sidebar-filters .input-group .btn-outline-secondary:hover {
    background: var(--rsi-accent);
    border-color: var(--rsi-accent);
    color: var(--rsi-blue-dark);
    border-left: none;
}

/* Ensure input doesn't overlap with clear button */
.sidebar-filters .input-group .form-control {
    padding-right: 3rem;
}
