/* ===================================
   BitDash - Bitcoin Dashboard CSS
   Custom styles for Bitcoin dashboard
   =================================== */

/* ===================================
   ROOT VARIABLES - Color Palette
   =================================== */
:root {
    --primary-dark: #1a1a1a;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --table-alt-row: #f2f2f2;
    --bitcoin-orange: #f7931a;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.25);
}

/* ===================================
   GLOBAL STYLES
   =================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Smooth scrolling for all anchor links */
html {
    scroll-behavior: smooth;
}

/* ===================================
   HEADER STYLES
   =================================== */
.page-header {
    background-color: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===================================
   NAVIGATION BAR STYLES
   =================================== */
.navbar {
    box-shadow: 0 2px 4px var(--shadow-light);
    border-bottom: 1px solid #dee2e6;
}

/* Custom navigation background - override Bootstrap */
.navbar.bg-light-custom {
    background-color: var(--light-gray) !important;
}

/* Navigation brand styling */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand .text-warning {
    font-size: 1.8rem;
    margin-right: 0.25rem;
}

/* Navigation link hover effects */
.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--bitcoin-orange) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* Active navigation link */
.navbar-nav .nav-link.active {
    color: var(--bitcoin-orange) !important;
    font-weight: 600;
}

/* ===================================
   BITCOIN PRICE TRACKER STYLES (index.html)
   =================================== */
.price-tracker {
    background-color: var(--medium-gray);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px var(--shadow-medium);
    border: 1px solid #dee2e6;
}

.price-tracker h2 {
    color: var(--bitcoin-orange);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Bitcoin price display */
#bitcoin-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--success-green);
    text-shadow: 1px 1px 2px var(--shadow-light);
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

/* Loading spinner customization */
#loading-spinner {
    display: none;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Last updated text */
#last-updated {
    font-weight: 600;
    color: #6c757d;
}

/* ===================================
   TABLE STYLES (index.html)
   =================================== */
.bitcoin-models-table {
    margin-top: 2rem;
    box-shadow: 0 4px 12px var(--shadow-medium);
    border-radius: 10px;
    overflow: hidden;
}

/* Table header styling */
.bitcoin-models-table .table thead th {
    background-color: var(--primary-dark);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 0.75rem;
    text-align: center;
    vertical-align: middle;
}

/* Table body styling */
.bitcoin-models-table .table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    text-align: center;
    border-color: #dee2e6;
}

/* Alternating row colors */
.bitcoin-models-table .table tbody tr:nth-child(odd) {
    background-color: white;
}

.bitcoin-models-table .table tbody tr:nth-child(even) {
    background-color: var(--table-alt-row);
}

/* Table row hover effect */
.bitcoin-models-table .table tbody tr:hover {
    background-color: #fff3cd !important;
    transition: background-color 0.3s ease;
}

/* Table borders */
.bitcoin-models-table .table {
    border: 1px solid #dee2e6;
    margin-bottom: 0;
}

/* Distance percentage badge styling */
#distance-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

/* ===================================
   TRADINGVIEW CHART STYLES (charts.html)
   =================================== */
.tradingview-widget-container {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow-medium);
    border: 1px solid #dee2e6;
}

/* Chart container styling */
.tradingview-chart {
    min-height: 400px;
    background-color: #ffffff;
}

/* Chart card styling */
.chart-card {
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px var(--shadow-medium);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px var(--shadow-dark);
}

/* Chart card headers */
.chart-card .card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.25rem;
}

.chart-card .card-header h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Model badges in chart headers */
.chart-card .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
}

/* ===================================
   CARD COMPONENT ENHANCEMENTS
   =================================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: all 0.3s ease;
}

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

/* Card headers */
.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Card footers */
.card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* ===================================
   BUTTON ENHANCEMENTS
   =================================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Bitcoin-themed button */
.btn-bitcoin {
    background-color: var(--bitcoin-orange);
    border-color: var(--bitcoin-orange);
    color: white;
}

.btn-bitcoin:hover {
    background-color: #e8851f;
    border-color: #e8851f;
    color: white;
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

/* Mobile-first responsive adjustments */
@media (max-width: 576px) {
    /* Smaller price text on mobile */
    #bitcoin-price {
        font-size: 28px;
    }
    
    /* Adjust header text size */
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Reduce padding on mobile */
    .price-tracker {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    /* Stack table content better on mobile */
    .bitcoin-models-table .table th,
    .bitcoin-models-table .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }
    
    /* Chart adjustments for mobile */
    .tradingview-chart {
        min-height: 300px;
    }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 768px) {
    #bitcoin-price {
        font-size: 32px;
    }
    
    .tradingview-chart {
        min-height: 350px;
    }
}

/* Desktop enhancements */
@media (min-width: 769px) {
    /* Larger price display on desktop */
    #bitcoin-price {
        font-size: 42px;
    }
    
    /* Better spacing for charts */
    .chart-card {
        margin-bottom: 2.5rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Text shadows for better readability */
.text-shadow {
    text-shadow: 1px 1px 2px var(--shadow-light);
}

/* Custom spacing utilities */
.mt-custom {
    margin-top: 3rem;
}

.mb-custom {
    margin-bottom: 3rem;
}

/* Background utilities */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.bg-gradient-bitcoin {
    background: linear-gradient(135deg, var(--bitcoin-orange) 0%, #e8851f 100%);
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Pulse animation for loading states */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus indicators */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--bitcoin-orange);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .table {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   COMPACT SIDE-BY-SIDE TABLES (MACD & RSI)
   =================================== */

/* Compact table styling for 2x2 tables */
.compact-table {
    font-size: 0.95rem;
}

.compact-table td,
.compact-table th {
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle !important;
}

.compact-table thead th {
    font-weight: 600 !important;
    font-size: 0.9rem;
    border-bottom: 2px solid #dee2e6;
}

.compact-table tbody td {
    border-top: 1px solid #dee2e6;
}

.compact-value {
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    min-width: 45px;
    text-align: center;
}

/* Side-by-side card styling */
.compact-table .card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Ensure equal height cards */
.row .col-lg-6 .card {
    height: 100%;
}

/* Mobile responsiveness for compact tables */
@media (max-width: 768px) {
    .compact-table {
        font-size: 0.85rem;
    }
    
    .compact-table td,
    .compact-table th {
        padding: 0.5rem 0.25rem !important;
    }
    
    .compact-value {
        font-size: 0.9rem;
        min-width: 40px;
    }
    
    .compact-table .card-header h4 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    /* Stack tables vertically on very small screens */
    .row .col-lg-6 {
        margin-bottom: 1rem;
    }
    
    .compact-table {
        font-size: 0.8rem;
    }
    
    .compact-value {
        font-size: 0.85rem;
        min-width: 35px;
    }
}

/* ===================================
   BITCOIN MOMENTUM INDICATORS TABLE STYLES
   =================================== */

/* Momentum Table specific styling */
.momentum-table .indicator-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #007bff;
}

.momentum-table td {
    padding: 1.25rem 1rem !important;
    vertical-align: middle !important;
}

.momentum-table thead th {
    text-align: center !important;
    padding: 1rem !important;
    font-weight: 600 !important;
}

.momentum-table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.momentum-table tbody tr:nth-child(even) {
    background-color: white;
}

.momentum-table tbody tr:hover {
    background-color: #e3f2fd !important;
    transition: background-color 0.3s ease;
}

/* RSI Value Styling based on ranges */
.rsi-oversold {
    color: #28a745 !important; /* Green for oversold (< 30) */
    font-weight: 700 !important;
}

.rsi-neutral {
    color: #ffc107 !important; /* Yellow for neutral (30-70) */
    font-weight: 600 !important;
}

.rsi-overbought {
    color: #dc3545 !important; /* Red for overbought (> 70) */
    font-weight: 700 !important;
}

/* MACD Value Styling */
.macd-positive {
    color: #28a745 !important; /* Green for positive MACD */
}

.macd-negative {
    color: #dc3545 !important; /* Red for negative MACD */
}

/* Mobile responsiveness for Momentum table */
@media (max-width: 768px) {
    .momentum-table .indicator-value {
        font-size: 1rem;
    }
    
    .momentum-table td {
        padding: 1rem 0.5rem !important;
    }
    
    .momentum-table small {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .momentum-table thead th {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem !important;
    }
    
    .momentum-table .indicator-value {
        font-size: 0.95rem;
    }
}

/* ===================================
   BITCOIN CYCLE RISK SCORE (BCRS) TABLE STYLES
   =================================== */

/* BCRS Table specific styling */
.bcrs-table .risk-score {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 60px;
    text-align: center;
}

/* Risk Score Color Scheme */
.risk-1 {
    background-color: #28a745; /* Green - Capitulation/Extreme Bottom */
    border: 2px solid #1e7e34;
}

.risk-2 {
    background-color: #17a2b8; /* Light Blue - Low Risk */
    border: 2px solid #138496;
}

.risk-3 {
    background-color: #ffc107; /* Yellow - Neutral */
    border: 2px solid #e0a800;
    color: #212529; /* Dark text for better contrast on yellow */
    text-shadow: none;
}

.risk-4 {
    background-color: #fd7e14; /* Orange - High Risk */
    border: 2px solid #e8640c;
}

.risk-5 {
    background-color: #dc3545; /* Red - Euphoria/Extreme Top */
    border: 2px solid #c82333;
}

/* Composite Score Emphasis */
.composite-score {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    border-width: 3px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.composite-header {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    background-color: #495057 !important;
    color: #fff !important;
    text-align: center !important;
}

/* BCRS Table cell styling */
.bcrs-table td {
    padding: 1.5rem 1rem !important;
    vertical-align: middle !important;
    background-color: #f8f9fa;
}

.bcrs-table thead th {
    text-align: center !important;
    padding: 1rem !important;
    font-weight: 600 !important;
}

/* Risk Legend Styling */
.risk-legend {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.legend-header-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-block;
    flex-shrink: 0;
}

/* Legend box colors matching risk scores */
.legend-box.risk-1 {
    background-color: #28a745;
}

.legend-box.risk-2 {
    background-color: #17a2b8;
}

.legend-box.risk-3 {
    background-color: #ffc107;
}

.legend-box.risk-4 {
    background-color: #fd7e14;
}

.legend-box.risk-5 {
    background-color: #dc3545;
}

/* Mobile responsiveness for BCRS table */
@media (max-width: 768px) {
    .legend-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .legend-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .legend-item {
        justify-content: flex-start;
    }
    
    .bcrs-table .risk-score {
        font-size: 0.9rem;
        padding: 6px 12px;
        min-width: 50px;
    }
    
    .composite-score {
        font-size: 1rem !important;
        padding: 8px 16px !important;
    }
    
    .bcrs-table td {
        padding: 1rem 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .bcrs-table thead th {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem !important;
    }
    
    .risk-legend {
        padding: 0.75rem !important;
    }
}

/* ===================================
   BITCOIN PRICE PREDICTIONS TABLE STYLES
   =================================== */

/* Price cell styling */
.price-cell {
    vertical-align: middle !important;
    padding: 1rem 0.75rem !important;
}

.price-value {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

/* Percentage difference styling - light blue box */
.percentage-diff {
    background-color: #cce7ff;
    border: 1px solid #99d3ff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0066cc;
    display: inline-block;
    min-width: 50px;
    text-align: center;
    margin-top: 2px;
}

.percentage-diff-empty {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    margin-top: 2px;
}

/* Days remaining styling */
.days-remaining {
    font-weight: 600;
    font-size: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/* Days remaining color coding based on time ranges */
.days-remaining-red {
    color: #dc3545 !important; /* Red for 0-60 days */
}

.days-remaining-orange {
    color: #fd7e14 !important; /* Orange for 61-100 days */
}

.days-remaining-yellow {
    color: #ffc107 !important; /* Yellow for 101-150 days */
}

.days-remaining-default {
    color: #007bff !important; /* Default blue for 151+ days */
}

/* Cycle end date styling */
.cycle-end-date {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.cycle-end-subtext {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 2px;
    font-weight: 700;
}

/* Est. Cycle End column - make all dates bold */
.bitcoin-predictions-table td:nth-child(5) {
    font-weight: 700 !important;
    vertical-align: middle !important;
}

/* Creator column - vertical align center */
.bitcoin-predictions-table td:nth-child(1) {
    vertical-align: middle !important;
}

/* Time Remaining column - vertical align center */
.bitcoin-predictions-table td:nth-child(6) {
    vertical-align: middle !important;
}

/* Mobile responsiveness for price predictions table */
@media (max-width: 768px) {
    .price-cell {
        padding: 0.75rem 0.5rem !important;
    }
    
    .price-value {
        font-size: 0.9rem;
    }
    
    .percentage-diff {
        font-size: 0.75rem;
        padding: 1px 4px;
        min-width: 40px;
    }
    
    .days-remaining {
        font-size: 0.9rem;
        padding: 3px 6px;
        min-width: 35px;
    }
    
    .cycle-end-date {
        font-size: 0.9rem;
    }
    
    .cycle-end-subtext {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .price-cell {
        padding: 0.5rem 0.25rem !important;
    }
    
    .price-value {
        font-size: 0.8rem;
    }
    
    .percentage-diff {
        font-size: 0.7rem;
        padding: 1px 3px;
        min-width: 35px;
    }
    
    .days-remaining {
        font-size: 0.8rem;
        padding: 2px 4px;
        min-width: 30px;
    }
    
    .cycle-end-date {
        font-size: 0.8rem;
    }
    
    .cycle-end-subtext {
        font-size: 0.65rem;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .navbar,
    .btn,
    #loading-spinner {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    /* Print styles for all tables */
    .compact-value,
    .momentum-table .indicator-value,
    .bcrs-table .risk-score {
        border: 1px solid #000 !important;
        background-color: #fff !important;
        color: #000 !important;
    }
    
    /* Print layout for side-by-side tables */
    .row .col-lg-6 {
        width: 48% !important;
        float: left !important;
        margin-right: 2% !important;
    }
    
    .legend-box {
        border: 1px solid #000 !important;
        background-color: #fff !important;
    }
}

/* ===================================
   MARKET DOMINANCE STYLES
   =================================== */

/* Market dominance container */
#market-dominance {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0;
}

/* Individual dominance metric styling */
.dominance-btc {
    color: #f7931a; /* Bitcoin orange */
}

.dominance-eth {
    color: #627eea; /* Ethereum blue */
}

.dominance-others {
    color: #28a745; /* Green for others */
}

/* Responsive adjustments for dominance display */
@media (max-width: 576px) {
    #market-dominance {
        font-size: 0.9rem;
        padding: 0.25rem 0;
    }
}

@media (max-width: 768px) {
    #market-dominance {
        font-size: 0.95rem;
    }
}

/* ===================================
   CRYPTO RATIO STYLES (ETH/BTC & SOL/HYPE)
   =================================== */

/* ETH/BTC ratio container */
#eth-btc-ratio {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0;
}

/* SOL/HYPE ratio container */
#sol-hype-ratio {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0;
}

/* Ratio value styling */
.ratio-value {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Responsive adjustments for ratio displays */
@media (max-width: 576px) {
    #eth-btc-ratio,
    #sol-hype-ratio {
        font-size: 0.9rem;
        padding: 0.25rem 0;
    }
    
    .ratio-value {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    #eth-btc-ratio,
    #sol-hype-ratio {
        font-size: 0.95rem;
    }
}

/* ===================================
   MODEL WEIGHTINGS TABLE STYLES
   =================================== */

/* Model weightings table specific styling */
.model-weightings-table {
    font-size: 0.95rem;
}

.model-weightings-table .weighting-score {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 50px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.model-weightings-table .weighting-total {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    min-width: 60px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Score level color coding - Weight-adjusted performance thresholds */
/* Colors reflect performance expectations adjusted for column importance */
.score-1 {
    background-color: #dc3545; /* Red for poor performance relative to weighting */
    border-color: #c82333;
}

.score-2 {
    background-color: #fd7e14; /* Orange for below average performance relative to weighting */
    border-color: #e8640c;
}

.score-3 {
    background-color: #ffc107; /* Yellow for good performance relative to weighting */
    border-color: #e0a800;
    color: #212529; /* Dark text for better contrast on yellow */
    text-shadow: none;
}

.score-4 {
    background-color: #28a745; /* Green for excellent performance relative to weighting */
    border-color: #1e7e34;
}

/* Total score level color coding */
.total-4 {
    background-color: #dc3545; /* Red for totals 4.0-4.9 */
    border-color: #c82333;
}

.total-5 {
    background-color: #fd7e14; /* Orange for totals 5.0-5.9 */
    border-color: #e8640c;
}

.total-6 {
    background-color: #ffc107; /* Yellow for totals 6.0-6.9 */
    border-color: #e0a800;
    color: #212529;
    text-shadow: none;
}

.total-7 {
    background-color: #17a2b8; /* Light blue for totals 7.0-7.9 */
    border-color: #138496;
}

.total-8 {
    background-color: #28a745; /* Green for totals 8.0+ */
    border-color: #1e7e34;
}

/* Highlight the highest scoring model */
.model-weightings-table .table-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7;
}

.model-weightings-table .table-warning td {
    background-color: inherit !important;
}

/* Table header styling for model weightings */
.model-weightings-table .total-header {
    background-color: #495057 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
}

/* Table cell styling */
.model-weightings-table td {
    padding: 1rem 0.75rem !important;
    vertical-align: middle !important;
    border-color: #dee2e6;
}

.model-weightings-table thead th {
    text-align: center !important;
    padding: 1rem !important;
    font-weight: 600 !important;
}

/* Row hover effect */
.model-weightings-table tbody tr:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.3s ease;
}

/* Mobile responsiveness for model weightings table */
@media (max-width: 768px) {
    .model-weightings-table {
        font-size: 0.85rem;
    }
    
    .model-weightings-table .weighting-score {
        font-size: 0.8rem;
        padding: 4px 8px;
        min-width: 40px;
    }
    
    .model-weightings-table .weighting-total {
        font-size: 0.9rem;
        padding: 6px 12px;
        min-width: 50px;
    }
    
    .model-weightings-table td {
        padding: 0.75rem 0.5rem !important;
    }
    
    .model-weightings-table thead th {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .model-weightings-table {
        font-size: 0.8rem;
    }
    
    .model-weightings-table .weighting-score {
        font-size: 0.75rem;
        padding: 3px 6px;
        min-width: 35px;
    }
    
    .model-weightings-table .weighting-total {
        font-size: 0.85rem;
        padding: 4px 8px;
        min-width: 40px;
    }
    
    .model-weightings-table td {
        padding: 0.5rem 0.25rem !important;
    }
    
    .model-weightings-table thead th {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem !important;
    }
    
    /* Model names might be long, allow text wrap on very small screens */
    .model-weightings-table td:first-child {
        word-break: break-word;
        hyphens: auto;
    }
}

/* ===================================
   INTERACTIVE EDITING STYLES
   =================================== */

/* Editable cell enhancements */
.editable-cell {
    transition: all 0.3s ease;
    position: relative;
}

.editable-cell:hover {
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    transform: scale(1.05);
}

.editable-cell:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.7) !important;
    transform: scale(1.05) !important;
    z-index: 10;
    position: relative;
}

.editable-cell.editing {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    border-radius: 4px;
    animation: pulse-edit 2s infinite;
}

.editable-cell.changed {
    background-color: #d1ecf1 !important;
    border: 1px solid #17a2b8 !important;
    border-radius: 4px;
    position: relative;
}

.editable-cell.changed::after {
    content: "●";
    position: absolute;
    top: -5px;
    right: -5px;
    color: #17a2b8;
    font-size: 12px;
    font-weight: bold;
}

/* Save button enhancements */
#save-weightings {
    transition: all 0.3s ease;
    position: relative;
}

#save-weightings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#save-weightings:active {
    transform: translateY(0);
}

/* Reset button enhancements */
#reset-weightings {
    transition: all 0.3s ease;
}

#reset-weightings:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Status message styling */
#save-status {
    transition: opacity 0.3s ease;
}

#save-status small {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulse-edit {
    0% {
        box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
    }
}

/* Accessibility improvements for interactive elements */
@media (prefers-reduced-motion: reduce) {
    .editable-cell,
    #save-weightings,
    #reset-weightings {
        transition: none !important;
        animation: none !important;
    }
    
    .editable-cell:hover,
    .editable-cell:focus {
        transform: none !important;
    }
}

/* High contrast mode for interactive elements */
@media (prefers-contrast: high) {
    .editable-cell:focus {
        border: 3px solid #000 !important;
        background-color: #fff !important;
    }
    
    .editable-cell.changed {
        border: 2px solid #000 !important;
        background-color: #f0f0f0 !important;
    }
}

/* ===================================
   WEIGHTED SCORING TABLE STYLES
   =================================== */

/* Weighted scoring table specific styling */
.weighted-scoring-table {
    font-size: 0.9rem;
}

/* Weightings header row styling */
.weighted-scoring-table .weightings-row th {
    background-color: #495057 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border-bottom: 2px solid #343a40 !important;
}

.weighted-scoring-table .criteria-row th {
    background-color: #343a40 !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

/* Weighted score styling */
.weighted-scoring-table .weighted-score {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    min-width: 45px;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.weighted-scoring-table .weighted-total {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    min-width: 55px;
    text-align: center;
    background-color: #e9ecef;
    border: 2px solid #adb5bd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Removed color-based total classes for simplicity */

/* Editable weighted cell enhancements */
.editable-weighted {
    transition: all 0.3s ease;
    position: relative;
}

.editable-weighted:hover {
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    transform: scale(1.05);
}

.editable-weighted:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.7) !important;
    transform: scale(1.05) !important;
    z-index: 10;
    position: relative;
}

.editable-weighted.editing {
    background-color: #d4edda !important;
    border: 2px solid #28a745 !important;
    border-radius: 4px;
    animation: pulse-edit-green 2s infinite;
}

.editable-weighted.changed {
    background-color: #d1ecf1 !important;
    border: 1px solid #17a2b8 !important;
    border-radius: 4px;
    position: relative;
}

.editable-weighted.changed::after {
    content: "●";
    position: absolute;
    top: -5px;
    right: -5px;
    color: #17a2b8;
    font-size: 12px;
    font-weight: bold;
}

/* Table cell styling for weighted table */
.weighted-scoring-table td {
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle !important;
    border-color: #dee2e6;
}

.weighted-scoring-table thead th {
    text-align: center !important;
    padding: 0.75rem 0.5rem !important;
    font-weight: 600 !important;
}

/* Row hover effect for weighted table */
.weighted-scoring-table tbody tr:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.3s ease;
}

/* Highlight top scoring models */
.weighted-scoring-table .table-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7;
}

.weighted-scoring-table .table-success {
    background-color: #d1e7dd !important;
    border-color: #badbcc;
}

.weighted-scoring-table .table-warning td,
.weighted-scoring-table .table-success td {
    background-color: inherit !important;
}

/* Green pulse animation for weighted editing */
@keyframes pulse-edit-green {
    0% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
}

/* Save button specific styling for weighted table */
#save-weighted-scores {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.3s ease;
}

#save-weighted-scores:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Mobile responsiveness for weighted scoring table */
@media (max-width: 768px) {
    .weighted-scoring-table {
        font-size: 0.8rem;
    }
    
    .weighted-scoring-table .weighted-score {
        font-size: 0.75rem;
        padding: 3px 6px;
        min-width: 35px;
    }
    
    .weighted-scoring-table .weighted-total {
        font-size: 0.85rem;
        padding: 4px 10px;
        min-width: 45px;
    }
    
    .weighted-scoring-table td {
        padding: 0.5rem 0.25rem !important;
    }
    
    .weighted-scoring-table thead th {
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem !important;
    }
    
    .weighted-scoring-table .weightings-row th {
        font-size: 0.75rem !important;
    }
    
    .weighted-scoring-table .criteria-row th {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 576px) {
    .weighted-scoring-table {
        font-size: 0.75rem;
    }
    
    .weighted-scoring-table .weighted-score {
        font-size: 0.7rem;
        padding: 2px 4px;
        min-width: 30px;
    }
    
    .weighted-scoring-table .weighted-total {
        font-size: 0.8rem;
        padding: 3px 8px;
        min-width: 40px;
    }
    
    .weighted-scoring-table td {
        padding: 0.25rem 0.15rem !important;
    }
    
    .weighted-scoring-table thead th {
        font-size: 0.75rem;
        padding: 0.25rem 0.15rem !important;
    }
    
    /* Model names might be long, allow text wrap on very small screens */
    .weighted-scoring-table td:first-child {
        word-break: break-word;
        hyphens: auto;
    }
}

/* Accessibility improvements for weighted interactive elements */
@media (prefers-reduced-motion: reduce) {
    .editable-weighted,
    #save-weighted-scores {
        transition: none !important;
        animation: none !important;
    }
    
    .editable-weighted:hover,
    .editable-weighted:focus {
        transform: none !important;
    }
}

/* High contrast mode for weighted interactive elements */
@media (prefers-contrast: high) {
    .editable-weighted:focus {
        border: 3px solid #000 !important;
        background-color: #fff !important;
    }
    
    .editable-weighted.changed {
        border: 2px solid #000 !important;
        background-color: #f0f0f0 !important;
    }
}