/* ==========================================
   PCFM Modern Dark Theme
   Inspired by modern fintech/crypto platforms
   ========================================== */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0e27;
    --bg-secondary: #131729;
    --bg-tertiary: #1a1f3a;
    --bg-card: rgba(26, 31, 58, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.05);

    /* Accent Colors - Gradients */
    --accent-purple: #667eea;
    --accent-blue: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    /* Glow Effects */
    --glow-purple: 0 0 20px rgba(102, 126, 234, 0.3);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(10px);
}

/* ==========================================
   Global Styles & Reset
   ========================================== */

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

/* ==========================================
   Glassmorphism Cards
   ========================================== */

.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 48px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.card-header h5, .card-header h6 {
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
    background: rgba(19, 23, 41, 0.5);
    color: var(--text-primary);
}

.card-footer {
    background: rgba(10, 14, 39, 0.6);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* Override Bootstrap bg-light on card footers */
.card-footer.bg-light {
    background: rgba(10, 14, 39, 0.6) !important;
    color: var(--text-secondary) !important;
}

/* ==========================================
   Stats Cards with Gradient Backgrounds
   ========================================== */

.stats-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stats-card:hover::before {
    opacity: 1;
}

/* Primary - Credits Card */
.card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glow-purple);
}

/* Success - Predictions Card */
.card.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glow-green);
}

/* Info - Completed Card */
.card.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glow-cyan);
}

/* Warning - Credits Used Card */
.card.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Win Rate - Purple Gradient */
.card.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--glow-purple);
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Dark - Accuracy Card */
.card.bg-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* pulse-glow moved to design-tokens.css */

/* ==========================================
   Buttons & Form Controls
   ========================================== */

.btn {
    border-radius: 10px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

.form-control, .form-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

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

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-check-label {
    color: var(--text-primary);
    font-weight: 400;
}

.form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--glass-border);
}

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

/* ==========================================
   Tables with Dark Backgrounds
   ========================================== */

.table {
    color: var(--text-primary);
    margin-bottom: 0;
    background: transparent;
}

.table thead {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(10px);
}

.table thead th {
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    background: rgba(26, 31, 58, 0.6);
}

.table tbody {
    background: rgba(10, 14, 39, 0.5);
}

.table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-primary);
    background: rgba(19, 23, 41, 0.4);
}

.table tbody td strong {
    color: var(--text-primary);
}

.table tbody td small {
    color: var(--text-secondary);
}

.table-hover tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background: rgba(102, 126, 234, 0.15) !important;
    transform: scale(1.005);
}

.table-hover tbody tr:hover td {
    background: rgba(102, 126, 234, 0.15) !important;
}

/* Table responsive wrapper with dark background */
.table-responsive {
    background: rgba(10, 14, 39, 0.5);
    border-radius: 10px;
    padding: 0;
    backdrop-filter: blur(10px);
}

/* ==========================================
   Badges
   ========================================== */

.badge {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.75rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* ==========================================
   Alerts & Status
   ========================================== */

.alert {
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1rem 1.25rem;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: #67e8f9;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* ==========================================
   Progress Bars
   ========================================== */

.progress {
    background: var(--bg-tertiary);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.progress-bar-animated {
    animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

/* ==========================================
   Spinners & Loading
   ========================================== */

.spinner-border {
    border-color: var(--accent-purple);
    border-right-color: transparent;
}

/* ==========================================
   Quick Symbol Buttons
   ========================================== */

.quick-symbol {
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.quick-symbol:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.1);
}

.quick-symbol.active {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-blue) 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* ==========================================
   Typography
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.text-success {
    color: #6ee7b7 !important;
}

.text-danger {
    color: #fca5a5 !important;
}

.text-warning {
    color: #fcd34d !important;
}

.text-info {
    color: #67e8f9 !important;
}

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

/* ==========================================
   Shadows & Depth
   ========================================== */

.shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}

/* ==========================================
   Navbar (if exists)
   ========================================== */

.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    /* Removed sticky positioning - navbar stays at top */
    z-index: 1050;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--accent-purple) !important;
}

.navbar-toggler {
    border-color: var(--glass-border);
}

.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(248, 250, 252, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================
   Prediction Results Section
   ========================================== */

#prediction-results .card-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
}

#prediction-results h3 {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

#prediction-results .card-body {
    background: rgba(19, 23, 41, 0.7) !important;
}

/* Ensure prediction metric cards have dark bg */
#prediction-results .col-md-3 {
    background: transparent;
}

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

#prediction-results strong {
    color: var(--text-primary);
}

#prediction-results h6 {
    color: var(--text-secondary) !important;
}

#prediction-results h3 {
    color: var(--text-primary) !important;
}

/* ==========================================
   Live Prices Widget
   ========================================== */

#live-prices-container {
    max-height: 400px;
    overflow-y: auto;
}

#live-prices-container::-webkit-scrollbar {
    width: 6px;
}

#live-prices-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

#live-prices-container::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 10px;
}

#live-prices-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Ensure live prices card has dark background */
#live-prices-container {
    background: rgba(19, 23, 41, 0.5);
}

/* Live prices items styling */
.live-price-item {
    background: rgba(26, 31, 58, 0.6);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
}

.live-price-item:last-child {
    border-bottom: none;
}

.live-price-item:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* ==========================================
   Animations - Keyframes moved to design-tokens.css
   ========================================== */

/* Legacy utility classes - mapped to design-tokens.css animations */
.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

/* Stagger animation delays for cards */
.row > [class*='col-']:nth-child(1) .card { animation-delay: 0s; }
.row > [class*='col-']:nth-child(2) .card { animation-delay: 0.1s; }
.row > [class*='col-']:nth-child(3) .card { animation-delay: 0.2s; }
.row > [class*='col-']:nth-child(4) .card { animation-delay: 0.3s; }
.row > [class*='col-']:nth-child(5) .card { animation-delay: 0.4s; }
.row > [class*='col-']:nth-child(6) .card { animation-delay: 0.5s; }

/* ==========================================
   Modals with Dark Background
   ========================================== */

.modal-content {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

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

.modal-body {
    background: rgba(19, 23, 41, 0.5);
    color: var(--text-primary);
}

.modal-footer {
    background: rgba(19, 23, 41, 0.5);
    border-top: 1px solid var(--glass-border);
}

.modal-backdrop {
    backdrop-filter: blur(5px);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Ensure cards within modals have dark backgrounds */
.modal-body .card {
    background: rgba(26, 31, 58, 0.6);
}

.modal-body .card-body {
    background: rgba(19, 23, 41, 0.5);
}

.modal-body .card-header {
    background: rgba(26, 31, 58, 0.8);
}

/* Prediction detail cards in modal */
.modal-body .row > [class*='col-'] {
    margin-bottom: 1rem;
}

.modal-body h6 {
    color: var(--text-secondary);
}

.modal-body h3, .modal-body h4 {
    color: var(--text-primary);
}

/* ==========================================
   Mobile Optimizations
   ========================================== */

/* Tablets and below */
@media (max-width: 991px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    h2 {
        font-size: 2rem;
    }

    /* Stack stat cards vertically on tablets */
    .row.mb-4 > [class*='col-'] {
        margin-bottom: 1rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }

    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Smaller card padding on mobile */
    .card {
        margin-bottom: 0.75rem;
        border-radius: 12px;
    }

    .card-header {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Stat cards - make numbers smaller on mobile */
    .card h2 {
        font-size: 1.75rem;
    }

    .card h6 {
        font-size: 0.75rem;
    }

    .card small {
        font-size: 0.7rem;
    }

    /* Buttons - full width and slightly smaller */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

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

    .d-grid .btn {
        width: 100%;
    }

    /* Quick symbol buttons - smaller on mobile */
    .quick-symbol {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    /* Form controls - better touch targets */
    .form-control, .form-select {
        padding: 0.875rem 1rem;
        font-size: 1rem; /* 16px to prevent zoom on iOS */
    }

    /* Table - horizontal scroll with dark background */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Prediction results - stack vertically on mobile */
    #prediction-results .row.text-center {
        text-align: left !important;
    }

    #prediction-results .col-md-3 {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--glass-border);
    }

    #prediction-results .col-md-3:last-child {
        border-bottom: none;
    }

    #prediction-results h3 {
        font-size: 1.5rem;
    }

    /* Navbar - better mobile menu */
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-nav {
        padding: 1rem 0;
    }

    .nav-item {
        padding: 0.5rem 0;
    }

    /* Modal - full screen on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Progress bars - slightly larger on mobile */
    .progress {
        height: 10px;
    }

    /* Badges - slightly smaller on mobile */
    .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.65rem;
    }

    /* Alerts - compact on mobile */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }

    /* Live prices container - better mobile scrolling */
    #live-prices-container {
        max-height: 300px;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    /* Ultra compact stat cards */
    .card h2 {
        font-size: 1.5rem;
    }

    .card h6 {
        font-size: 0.7rem;
    }

    /* Single column layout for prediction form and results */
    .col-md-4, .col-md-8 {
        margin-bottom: 1rem;
    }

    /* Footer - smaller text */
    footer {
        font-size: 0.85rem;
        padding: 1rem 0;
    }

    footer p {
        font-size: 0.8rem;
    }

    footer small {
        font-size: 0.7rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .row.mb-4 > [class*='col-'] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
    }

    .form-check-label {
        padding-left: 0.5rem;
    }

    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }

    .btn:hover::before {
        display: none;
    }
}

/* ==========================================
   Dropdown Menus
   ========================================== */

.dropdown-menu {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999 !important;
    position: absolute;
}

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

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

.dropdown-header {
    color: var(--text-secondary);
}

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

/* ==========================================
   Utility Classes
   ========================================== */

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

.glow-purple {
    box-shadow: var(--glow-purple);
}

.glow-cyan {
    box-shadow: var(--glow-cyan);
}

.glow-green {
    box-shadow: var(--glow-green);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   Bootstrap Text Color Overrides
   ========================================== */

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

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

p, span, div {
    color: inherit;
}

/* Ensure readability in all cards */
.card strong {
    color: var(--text-primary);
}

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

.card small {
    color: var(--text-secondary);
}

/* ==========================================
   List Group Styling (for Live Prices)
   ========================================== */

.list-group {
    background-color: transparent;
}

.list-group-item {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
}

.list-group-item:hover {
    background-color: var(--bg-tertiary) !important;
}

.list-group-item strong {
    color: var(--text-primary) !important;
}

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

.list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}

/* ==========================================
   Accessibility - Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   Bootstrap Overrides (from main.css)
   ========================================== */

/* Body Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* Cards - Animation on load */
.card {
    animation: fadeIn 0.3s ease-out;
}

#prediction-status .alert {
    animation: fadeIn 0.3s ease-out;
}

#prediction-results .card {
    animation: fadeIn 0.5s ease-out;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.hover-scale:hover {
    transform: scale(1.02);
    transition: transform var(--duration-base) var(--ease-out);
}
