/* Dashboard styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

/* Trade-specific styles */

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --chart-bg: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #a9a9b3;
    --accent-blue: #0047AB;
    --accent-cyan: #00c2ff;
    --profit-green: #00ffa3;
    --loss-red: #ff3366;
    --border-color: #2d2d3a;
    --high-price: #3370ff;
}

/* Layout */
html, body {
    height: 100%;
    margin: 0;
    /* Add safe area support for iPhone notches and home indicator */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Prevent iOS elastic scrolling (bounce effect) */
    overscroll-behavior: none;
    /* Prevent any scrolling on the body */
    overflow: hidden;
}

/* Three-section layout using CSS Grid */
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
    display: grid;
    grid-template-rows: 64px 1fr auto; /* Header, body (flexible), footer (auto) */
    /* Use small viewport height for PWA compatibility */
    min-height: 100vh; /* Fallback for browsers without svh support */
    min-height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
    min-height: 100svh; /* Small viewport height - better for PWA mode */
    height: 100vh; /* Fallback for browsers without svh support */
    height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
    height: 100svh;
}

/* Mobile header height */
@media (max-width: 768px) {
    body {
        grid-template-rows: 56px 1fr auto;
        /* Ensure mobile uses small viewport height */
        min-height: 100vh; /* Fallback */
        min-height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        min-height: 100svh;
        height: 100vh; /* Fallback */
        height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        height: 100svh;
        /* Add bottom safe area for iPhone home indicator (not in PWA mode) */
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* In PWA standalone mode, remove bottom padding to use full screen height */
    @media (display-mode: standalone) {
        body {
            padding-bottom: 0;
        }
    }
}

/* iPad and tablet specific handling */
@media (min-width: 769px) and (max-width: 1024px),
       (min-width: 769px) and (max-height: 1024px) {
    body {
        /* iPad also needs small viewport height handling */
        min-height: 100vh; /* Fallback */
        min-height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        min-height: 100svh;
        height: 100vh; /* Fallback */
        height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        height: 100svh;
        /* iPad safe area support (not in PWA mode) */
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* In PWA standalone mode, remove bottom padding to use full screen height */
    @media (display-mode: standalone) {
        body {
            padding-bottom: 0;
        }
    }
}

/* iOS devices detection - more specific targeting */
@supports (-webkit-touch-callout: none) {
    body {
        /* iOS-specific viewport handling */
        min-height: 100vh; /* Fallback */
        min-height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        min-height: 100svh;
        height: 100vh; /* Fallback */
        height: calc(var(--vh, 1vh) * 100); /* JS fallback for older browsers */
        height: 100svh;
        /* Prevent elastic scrolling on all iOS devices */
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }
}

/* Header takes full width, fixed height */
.fixed.top-0 {
    grid-row: 1;
    z-index: 60;
}

/* Dashboard container fills middle section */
.dashboard-container {
    grid-row: 2;
    overflow: hidden; /* Prevent overflow */
    /* Ensure proper height calculation on mobile */
    min-height: 0; /* Allow grid item to shrink below content size */
}

/* Status bar takes bottom section */
.bottom-panel-wrapper {
    grid-row: 3;
    position: relative;
}

.content-wrapper {
    flex: 1 0 auto;
}

/* Status Bar Styling */
.bg-secondary { background-color: var(--bg-secondary); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.border-color { border-color: var(--border-color); }
.font-grotesk { font-family: 'Space Grotesk', sans-serif; }
.tracking-wide { letter-spacing: 0.025em; }

/* Explicit grid layout styles - Base definitions only */
.grid {
    display: grid;
    width: 100%;
}

/* Chart grid specific layout - BRUTALIST */
.grid-charts {
    display: grid;
    width: 100%;
    gap: 8px; /* Reduce spacing between charts */
    margin-top: 16px; /* Add top margin */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Single chart style - when only one chart is visible */
.grid-charts.single-chart {
    display: block;
    width: 100%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* Two charts style - force two columns with brutalist styling */
.grid-charts.two-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 8px;
}

/* Responsive adjustments for grid-charts */
@media (max-width: 768px) {
    .grid-charts, .grid-charts.two-charts {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .grid-charts {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Keep two-charts with 2 columns even at medium size */
    .grid-charts.two-charts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1201px) {
    .grid-charts {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Keep two-charts with 2 columns even at large size */
    .grid-charts.two-charts {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Let JavaScript control these specifically */
/* 
.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
*/

.gap-0 {
    gap: 0;
}

/* Chart tab styles - MINIMALIST DESIGN */
.tab-container-minimal {
    margin-bottom: 20px;
    margin-top: 8px;
    width: 100%;
}

.tab-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
}

.tab-column {
    flex: 1;
    max-width: 48%;
}

.tab-column:first-child {
    margin-right: 16px;
}

/* Align timeframes to the right */
.tab-column:last-child .tab-buttons {
    display: flex;
    justify-content: flex-end;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Tab buttons - BRUTALIST DESIGN */
.symbol-tab-button,
.timeframe-tab-button {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0; /* Remove border radius for brutalist design */
    transition: all 0.1s ease; /* Faster transition for snappier feel */
    padding: 3px 6px; /* Even smaller padding */
    font-size: 10px; /* Smaller font */
    font-weight: 700; /* Bolder */
    min-width: 32px; /* Smaller minimum width */
    text-align: center;
    text-transform: uppercase; /* All caps for brutalist feel */
    letter-spacing: 0.7px; /* More spacing between letters */
    margin: 0;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3); /* Softer shadow */
    font-family: 'Space Mono', monospace; /* More brutalist font */
    cursor: pointer;
    margin-right: 2px;
    margin-bottom: 2px;
}

.symbol-tab-button:hover,
.timeframe-tab-button:hover {
    background-color: var(--border-color);
    transform: translateY(0); /* No movement - brutalist */
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5); /* Darker shadow on hover */
}

.symbol-tab-button.active,
.timeframe-tab-button.active {
    background-color: var(--accent-cyan);
    color: #ffffff; /* Pure white text for better contrast */
    border-color: var(--accent-blue); /* Deeper blue border */
    box-shadow: none;
    transform: translateY(2px); /* More pronounced pressed effect */
}

/* Special styling for the ALL button */
#all-timeframes-button,
.symbol-tab-button[data-symbol="ALL"] {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 700;
}

#all-timeframes-button.active,
.symbol-tab-button[data-symbol="ALL"].active {
    background-color: var(--accent-cyan);
    color: var(--text-primary);
}

/* Tab container adjustments for brutalist style */
.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 3px; /* Even tighter spacing between buttons */
}

/* Chart panel styling - minimalist style */
.chart-panel {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    width: 100%;
    overflow: hidden;
    margin: 0;
    position: relative; /* Ensure positioning context for legend */
    box-shadow: none; /* Remove shadow for cleaner look */
}

/* Remove the ::before pseudo-element */
.chart-panel::before {
    display: none;
}

/* Chart panel header - minimalist style */
.chart-panel .px-2.py-1.border-b {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    background-color: var(--bg-tertiary);
}

.chart-panel h3 {
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Price line styles for positions */
.price-line-long {
    stroke: var(--profit-green);
    stroke-width: 1px;
    stroke-dasharray: none;
}

.price-line-short {
    stroke: var(--loss-red);
    stroke-width: 1px;
    stroke-dasharray: none;
}

/* Price line labels */
.price-line-label {
    font-size: 10px;
    font-weight: 400;
    padding: 2px 4px;
    border-radius: 2px;
}

.price-line-label-long {
    background-color: var(--profit-green);
    color: var(--chart-bg);
}

.price-line-label-short {
    background-color: var(--loss-red);
    color: var(--chart-bg);
}

/* Brutalist scrollbar styling - consolidated base styles */
::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar,
.chart-container::-webkit-scrollbar,
.grid-charts::-webkit-scrollbar,
.mobile-menu-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: var(--bg-primary);
}

::-webkit-scrollbar-track,
.overflow-y-auto::-webkit-scrollbar-track,
.chart-container::-webkit-scrollbar-track,
.grid-charts::-webkit-scrollbar-track,
.mobile-menu-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 0;
}

::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb,
.chart-container::-webkit-scrollbar-thumb,
.grid-charts::-webkit-scrollbar-thumb,
.mobile-menu-content::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 0;
    border: 1px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover,
.overflow-y-auto::-webkit-scrollbar-thumb:hover,
.chart-container::-webkit-scrollbar-thumb:hover,
.grid-charts::-webkit-scrollbar-thumb:hover,
.mobile-menu-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) var(--bg-primary);
}

/* Modern style additions - with brutalist updates */
.modern-card {
    border: 1px solid #000; /* Thinner border */
    border-radius: 0 !important;
    background-color: var(--bg-secondary);
    transition: none;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5); /* Softer shadow */
    padding: 16px;
    margin-bottom: 16px;
}

.modern-shadow {
    box-shadow: 4px 4px 0 #000;
}

.modern-hover:hover {
    background-color: var(--border-color);
    transition: none;
}

/* Profit/Loss Colors */
.profit-text {
    color: var(--profit-green);
    font-weight: 700;
    text-shadow: none; /* Remove text shadow for cleaner look */
}

.loss-text {
    color: var(--loss-red);
    font-weight: 700;
    text-shadow: none; /* Remove text shadow for cleaner look */
}

/* Table styling - brutalist */
.modern-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #000; /* Thinner border */
    margin-bottom: 24px;
}

.modern-table th {
    border-bottom: 1px solid #000; /* Thinner border */
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    padding: 10px 12px;
    background-color: var(--bg-tertiary);
}

.modern-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
}

.table-row-hover:hover {
    background-color: rgba(255,255,255,0.03);
}



/* Button styling - brutalist */
.modern-button {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0 !important;
    color: var(--text-primary);
    transition: all 0.1s ease;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.7px;
    padding: 6px 10px;
    box-shadow: none;
}

.modern-button:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-cyan);
    color: #ffffff;
    transform: translateY(0);
}

/* Global border-radius override for brutalist design */
* {
    border-radius: 0;
}

/* Specific rounded classes (override the global override when needed) */
.rounded-md {
    border-radius: 6px !important;
}

.rounded-sm {
    border-radius: 3px !important;
}

/* Full-width and layout utilities */
.max-w-full {
    max-width: 100%;
}

.w-full {
    width: 100%;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.mb-8 {
    margin-bottom: 2.5rem;
}

.mb-4 {
    margin-bottom: 1.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mr-8 {
    margin-right: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.p-0 {
    padding: 0;
}

.hidden {
    display: none;
}

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

.text-gray-400 {
    color: var(--text-secondary);
}

.text-2xl {
    font-size: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.bg-blue-400 {
    background-color: var(--accent-cyan);
}

.text-dark-900 {
    color: var(--bg-primary);
}

.border-dark-700 {
    border-color: var(--border-color);
}

.border-dark-800 {
    border-color: var(--border-color);
}

.border-transparent {
    border-color: transparent;
}

.border-b {
    border-bottom: 1px solid var(--border-color) !important;
}

.border {
    border: 1px solid var(--border-color) !important;
}

.bg-dark-900 {
    background-color: var(--bg-secondary);
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Tab buttons inline container */
.tab-buttons-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* Responsive adjustments for tab layout */
@media (max-width: 768px) {
    .tab-row {
        flex-direction: column;
    }
    
    .tab-column {
        max-width: 100%;
        margin-bottom: 16px;
    }
    
    .tab-column:first-child {
        margin-right: 0;
    }
}

/* Chart container brutalist styling */
.chart-container {
    position: relative;
    overflow: hidden;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    background-color: transparent;
    box-shadow: none;
}

.chart-container>div {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    background-color: transparent !important;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
}

/* Section headers with brutalist style */
h2.text-2xl {
    font-family: 'Space Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 2px solid var(--accent-cyan); /* Thicker border */
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 16px;
    margin-top: 24px;
    font-size: 18px;
    padding-bottom: 6px;
    margin-left: 12px; /* Align with grid padding */
}

/* Add brutalist input styling */
input, select, textarea {
    background-color: var(--bg-tertiary);
    border: 1px solid #000;
    border-radius: 0;
    padding: 6px 8px;
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
    box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

/* Button active state */
.modern-button:active {
    box-shadow: none;
    transform: translateY(2px);
}

/* Brutalist helpers */
.brutalist-border {
    border: 2px solid #000 !important;
    box-shadow: 4px 4px 0 #000;
}

.brutalist-text {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Additional util styles with brutalist approach */
.text-cyan {
    color: var(--text-secondary); /* Changed from cyan to secondary text color */
    text-shadow: none; /* Remove shadow for cleaner look */
}

/* Additional brutalist elements */

/* Order and position styles */
.position-item, .order-item {
    border: 1px solid var(--border-color); /* Use border-color instead of black */
    box-shadow: none; /* Remove shadow for cleaner look */
    padding: 12px;
    margin-bottom: 8px;
    transition: none;
}

.position-item:hover, .order-item:hover {
    background-color: var(--bg-tertiary);
    box-shadow: none; /* Remove shadow for cleaner look */
}

/* Stats boxes - enhanced brutalist style */
.stats-box {
    border: 1px solid var(--border-color); /* Use border-color instead of black */
    background-color: var(--bg-secondary);
    padding: 12px 16px;
    font-family: 'Space Mono', monospace;
    box-shadow: none; /* Remove shadow for cleaner look */
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.stats-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px; /* Slightly thicker accent line */
    height: 100%;
    background-color: var(--accent-cyan); /* Bold accent color */
}

.stats-box h3 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.stats-box .stats-value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

/* Alert messages */
.alert {
    border: 1px solid var(--border-color);
    padding: 10px;
    margin: 8px 0;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    box-shadow: none; /* Remove shadow for cleaner look */
}

.alert-info {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.alert-warning {
    background-color: rgba(255, 128, 128, 0.2); /* Lighter red */
    color: var(--loss-red);
}

.alert-success {
    background-color: rgba(168, 255, 128, 0.2); /* Lighter green */
    color: var(--profit-green);
}

/* Make lists more brutalist */
ul, ol {
    list-style-type: square;
    padding-left: 20px;
}

li {
    padding: 4px 0;
}

/* Text sizing with brutalist approach */
.text-xs {
    font-size: 10px;
    font-family: 'Space Mono', monospace;
}

.text-sm {
    font-size: 12px;
    font-family: 'Space Mono', monospace;
}

/* Chart container and grid specific scrollbar overrides can be added here if needed */

/* Consolidated scrollbar styles applied above - no need for redundant overrides */

/* Cleaner section breaks */
.section-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 32px 0;
    max-width: 120px;
}

/* Main container spacing */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cleaner charts container */

/* More compact asset links */
.asset-link {
    margin: 0 4px 4px 0;
    display: inline-block;
}

/* Extra spacing around main sections */
.market-charts-section,
.positions-section,
.trades-section,
.orders-section {
    margin-bottom: 32px;
}

/* Portfolio stats row with better spacing */
.portfolio-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 0 0 32px 0;
}

/* Clean up table borders */
.modern-table {
    border: 1px solid #000; /* Thinner border */
}

.modern-table th {
    border-bottom: 1px solid #000; /* Thinner border */
}

/* Clean up profit/loss display */
.profit-text, .loss-text {
    text-shadow: none; /* Remove text shadow for cleaner look */
}

/* Fixed header styling */
header.header-gradient {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none; /* Remove shadow for cleaner look */
    height: 64px; /* Desktop header height */
    margin-bottom: 16px; /* Add space below header */
}

/* Responsive header height */
@media (max-width: 768px) {
    header.header-gradient {
        height: 56px; /* Mobile header height */
    }
}

/* Header title styling */
header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary); /* White instead of cyan */
    text-shadow: none; /* Remove shadow for cleaner look */
}

/* Fixed header buttons */
header .modern-button {
    font-size: 9px;
    padding: 3px 6px;
    box-shadow: none; /* Remove shadow for cleaner look */
    min-width: auto;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Portfolio name styling in header */
header .brutalist-text {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding-left: 6px;
    border-left: 1px solid var(--border-color);
}

/* Asset links footer styling */
.asset-links-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 6px 0;
    margin-top: 20px;
    font-family: 'Space Mono', monospace;
}

.asset-links-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.asset-links-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    padding-top: 6px;
}

.asset-links-groups {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.asset-links-group {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.asset-links-group-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary); /* Changed from cyan to gray */
    white-space: nowrap;
    padding-top: 4px;
}

.asset-links-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.asset-link-button {
    font-size: 8px;
    padding: 1px 4px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s ease;
}

.asset-link-button:hover {
    background-color: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-cyan);
}

/* Chart Price Display */
.chart-price-display {
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
    min-width: 60px;
    text-align: right;
    transition: color 0.2s ease;
    transform-origin: center;
    will-change: transform, color, background-color, text-shadow;
}

/* Enhanced price change animations - matching chart colors */
@keyframes price-flash-up {
    0% {
        color: var(--text-secondary);
        background-color: transparent;
        transform: scale(1);
        text-shadow: none;
    }
    25% {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    }
    50% {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.15);
        transform: scale(1.02);
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
    75% {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.05);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    }
    100% {
        color: var(--text-secondary);
        background-color: transparent;
        transform: scale(1);
        text-shadow: none;
    }
}

@keyframes price-flash-down {
    0% {
        color: var(--text-secondary);
        background-color: transparent;
        transform: scale(1);
        text-shadow: none;
    }
    25% {
        color: #0047AB;
        background-color: rgba(0, 71, 171, 0.2);
        transform: scale(1.05);
        text-shadow: 0 0 8px rgba(0, 71, 171, 0.6);
    }
    50% {
        color: #0047AB;
        background-color: rgba(0, 71, 171, 0.15);
        transform: scale(1.02);
        text-shadow: 0 0 12px rgba(0, 71, 171, 0.8);
    }
    75% {
        color: #0047AB;
        background-color: rgba(0, 71, 171, 0.1);
        transform: scale(1.05);
        text-shadow: 0 0 8px rgba(0, 71, 171, 0.4);
    }
    100% {
        color: var(--text-secondary);
        background-color: transparent;
        transform: scale(1);
        text-shadow: none;
    }
}

.price-flash-up {
    animation: price-flash-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.price-flash-down {
    animation: price-flash-down 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Header Asset Links Styling */
.header-asset-links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Mono', monospace;
}

.header-asset-links-groups {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-asset-links-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.header-asset-links-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.header-asset-links-buttons {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.header-asset-link {
    font-size: 8px;
    padding: 1px 3px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s ease;
    text-decoration: none;
    border-radius: 2px;
}

.header-asset-link:hover {
    background-color: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-cyan);
    text-decoration: none;
}

/* Responsive adjustments for asset links */
@media (max-width: 768px) {
    .asset-links-wrapper {
        flex-direction: column;
        gap: 4px;
    }

    .asset-links-group {
        flex-direction: row;
        gap: 4px;
        flex-wrap: wrap;
    }

    .asset-links-groups {
        flex-direction: column;
        gap: 4px;
    }

    /* Header asset links responsive */
    .header-asset-links {
        display: none; /* Hide on mobile to save space */
    }
}

/* ===========================
   TRADE PAGE STYLES
   =========================== */

/* Trade Container */
.trade-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Trade Header */
.trade-header {
    margin-bottom: 2rem;
}

.trade-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.trade-header .trade-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Trade Chart Container */
.trade-chart-container {
    margin-bottom: 2rem;
}

.trade-chart-wrapper {
    background: var(--chart-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-height: 400px;
}

#tradeChart {
    width: 100%;
    height: 384px;
    background: var(--chart-bg);
}

/* Trade Metrics Grid */
.trade-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    transition: border-color 0.2s ease;
}

.metric-card:hover {
    border-color: var(--accent-blue);
}

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

.metric-card .metric-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
}

.metric-card .metric-value.profit {
    color: var(--profit-green);
}

.metric-card .metric-value.loss {
    color: var(--loss-red);
}

/* Trade Details Table */
.trade-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.trade-details-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.trade-details-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.trade-details-table tr:hover {
    background: var(--bg-tertiary);
}

.trade-details-table tr:last-child td {
    border-bottom: none;
}

/* Roundturn Clickable Rows */
.roundturn-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.roundturn-clickable:hover {
    background-color: #2d2d3a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.roundturn-clickable:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Trade Status Badges */
.trade-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trade-status-badge.long {
    background-color: rgba(0, 255, 163, 0.1);
    color: var(--profit-green);
    border: 1px solid rgba(0, 255, 163, 0.2);
}

.trade-status-badge.short {
    background-color: rgba(255, 51, 102, 0.1);
    color: var(--loss-red);
    border: 1px solid rgba(255, 51, 102, 0.2);
}

.trade-status-badge.open {
    background-color: rgba(0, 194, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 194, 255, 0.2);
}

.trade-status-badge.closed {
    background-color: rgba(169, 169, 179, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(169, 169, 179, 0.2);
}

/* Chart Legend */
.chart-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Action Buttons */
.trade-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.trade-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.trade-action-btn:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.trade-action-btn.primary {
    background: var(--accent-blue);
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.trade-action-btn.primary:hover {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* Responsive Design for Trade Page */
@media (max-width: 768px) {
    .trade-container {
        padding: 0 0.5rem;
    }
    
    .trade-header h1 {
        font-size: 1.5rem;
    }
    
    .trade-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .trade-chart-wrapper {
        padding: 0.5rem;
    }
    
    #tradeChart {
        height: 300px;
    }
    
    .trade-details-table {
        font-size: 0.75rem;
    }
    
    .trade-details-table th,
    .trade-details-table td {
        padding: 0.5rem;
    }
    
    .trade-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trade-action-btn {
        justify-content: center;
    }
}

/* Print Styles for Trade Page */
@media print {
    .trade-header nav,
    .trade-actions,
    .chart-legend {
        display: none !important;
    }
    
    .trade-chart-wrapper {
        border: 1px solid #ccc;
    }
    
    .trade-details-table {
        border: 1px solid #ccc;
    }
    
    .trade-details-table th {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
    
    .trade-details-table td {
        color: #333 !important;
    }
}

/* === MODERN STATUS BAR STYLING === */

/* Modern status bar with glass morphism effect */
.fixed.bottom-0 {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: linear-gradient(135deg,
        rgba(15, 15, 15, 0.95) 0%,
        rgba(26, 26, 26, 0.95) 50%,
        rgba(15, 15, 15, 0.95) 100%);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern picker buttons with gradient backgrounds */
#asset-picker-toggle,
#timeframe-picker-toggle {
    background: linear-gradient(135deg, #2a2a35 0%, #1a1a23 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#asset-picker-toggle::before,
#timeframe-picker-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

#asset-picker-toggle:hover::before,
#timeframe-picker-toggle:hover::before {
    left: 100%;
}

#asset-picker-toggle:hover,
#timeframe-picker-toggle:hover {
    background: linear-gradient(135deg, #3a3a45 0%, #2a2a33 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 194, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#asset-picker-toggle:active,
#timeframe-picker-toggle:active {
    transform: translateY(0);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Modern dropdown styling with improved shadows */
.asset-picker-dropdown,
.timeframe-picker-dropdown {
    z-index: 2000; /* Increased to appear above bottom panel wrapper */
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: linear-gradient(135deg,
        rgba(26, 26, 30, 0.98) 0%,
        rgba(20, 20, 25, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: dropdownSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced custom checkbox styling */
.form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.8) 0%, rgba(20, 20, 25, 0.8) 100%);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-checkbox:hover {
    border-color: rgba(0, 194, 255, 0.4);
    box-shadow:
        0 0 8px rgba(0, 194, 255, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-checkbox:checked {
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    border-color: rgba(0, 194, 255, 0.6);
    box-shadow:
        0 0 12px rgba(0, 71, 171, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: checkmarkPulse 0.3s ease-out;
}

@keyframes checkmarkPulse {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.form-checkbox:focus {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(0, 194, 255, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Enhanced dropdown item hover effects */
.asset-picker-dropdown label,
.timeframe-picker-dropdown label {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    margin: 2px 0;
}

.asset-picker-dropdown label:hover,
.timeframe-picker-dropdown label:hover {
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.1) 0%, rgba(0, 71, 171, 0.1) 100%);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Modern typography and spacing */
.fixed.bottom-0 .text-secondary {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.fixed.bottom-0 .font-semibold {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.025em;
}

.fixed.bottom-0 .font-bold {
    font-weight: 700;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced profit/loss colors with glow effects */
.profit-text {
    color: #00ffa3;
    text-shadow: 0 0 8px rgba(0, 255, 163, 0.3);
}

.loss-text {
    color: #ff3366;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

/* Subtle separator lines */
.border-t {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.asset-picker-dropdown .border-t,
.timeframe-picker-dropdown .border-t {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin: 8px 0;
}

/* Modern focus states */
#asset-picker-toggle:focus,
#timeframe-picker-toggle:focus {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(0, 194, 255, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Modern status bar enhancements */
.modern-status-bar {
    grid-row: 2; /* Second row in bottom-panel-wrapper grid */
    position: relative;
}

.modern-status-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 194, 255, 0.3) 20%,
        rgba(0, 194, 255, 0.6) 50%,
        rgba(0, 194, 255, 0.3) 80%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-status-bar:hover::before {
    opacity: 1;
}

.status-bar-content {
    position: relative;
    z-index: 1;
}

/* Subtle breathing animation for the status bar */
@keyframes statusBarBreath {
    0%, 100% {
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    }
}

.modern-status-bar {
    animation: statusBarBreath 4s ease-in-out infinite;
}

/* Enhanced separator styling */
.modern-status-bar .border-t {
    position: relative;
}

.modern-status-bar .border-t::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
}

/* Improved mobile typography */
@media (max-width: 768px) {
    .fixed.bottom-0 {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    #asset-picker-toggle,
    #timeframe-picker-toggle {
        font-size: 11px;
        padding: 4px 8px;
    }

    .modern-status-bar .text-secondary {
        font-size: 11px;
    }

    .modern-status-bar .font-semibold,
    .modern-status-bar .font-bold {
        font-size: 11px;
    }
}

/* WebSocket Connection Indicator */
#websocket-indicator {
    transition: all 0.3s ease;
    position: relative;
}

#websocket-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: none;
    z-index: -1;
}

/* WebSocket states */
#websocket-indicator.ws-connected {
    background-color: #10b981; /* green-500 */
}

#websocket-indicator.ws-connected::before {
    animation: websocketPulse 2s ease-in-out infinite;
}

#websocket-indicator.ws-disconnected {
    background-color: #ef4444; /* red-500 */
}

#websocket-indicator.ws-error {
    background-color: #f59e0b; /* amber-500 */
}

#websocket-indicator.ws-connecting {
    background-color: #3b82f6; /* blue-500 */
}

#websocket-indicator.ws-connecting::before {
    animation: websocketPulse 1s ease-in-out infinite;
}

/* Pulsing animation */
@keyframes websocketPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.4);
    }
}

/* Performance optimizations */
.modern-status-bar *,
.asset-picker-dropdown *,
.timeframe-picker-dropdown * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Mobile Picker Styles - Show/Hide Variants */
@media (max-width: 767px) {
    .desktop-asset-picker,
    .desktop-timeframe-picker {
        display: none !important;
    }

    .mobile-asset-picker,
    .mobile-timeframe-picker {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .mobile-asset-picker,
    .mobile-timeframe-picker,
    .mobile-picker-panel {
        display: none !important;
    }

    .desktop-asset-picker,
    .desktop-timeframe-picker {
        display: block !important;
    }
}

/* Mobile Picker Styles */
@media (max-width: 767px) {
    /* Force fixed positioning for mobile dropdowns */
    #asset-picker-dropdown,
    #timeframe-picker-dropdown {
        position: fixed !important;
        left: 0.25rem !important; /* More to the left */
        bottom: 0 !important; /* Stacked on the statusbar */
        top: auto !important;
        right: auto !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 1000 !important; /* Ensure they appear above everything */
    }
}

    /* Mobile Asset Picker (simplified - no carousel) */

    .asset-list {
        margin-top: 8px;
    }

    .asset-option {
        display: block;
        width: 100%;
        padding: 8px 12px;
        border: none;
        background: none;
        color: var(--text-secondary);
        text-align: left;
        cursor: pointer;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

    .asset-option:hover {
        background-color: var(--dark-700);
    }

    .asset-option.selected {
        background-color: var(--blue-600);
        color: white;
    }

    /* Mobile Timeframe Buttons */
    .mobile-timeframe-button-row {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mobile-timeframe-button-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-timeframe-btn {
        flex-shrink: 0;
        background: var(--dark-700);
        border: 1px solid var(--dark-600);
        color: var(--text-secondary);
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .mobile-timeframe-btn:hover {
        background: var(--dark-600);
        border-color: var(--dark-500);
    }

    .mobile-timeframe-btn.active {
        background: var(--blue-600);
        border-color: var(--blue-500);
        color: white;
    }

    .mobile-timeframe-btn.active:hover {
        background: var(--blue-500);
    }

    /* Mobile Timeframe Buttons Dropdown */
    .mobile-timeframe-buttons .p-2 {
        padding: 12px;
    }

/* Price flash animations */
@keyframes price-flash-up {
    0%, 100% { color: var(--text-primary); }
    50% { color: var(--profit-green); }
}

@keyframes price-flash-down {
    0%, 100% { color: var(--text-primary); }
    50% { color: var(--loss-red); }
}

.price-flash-up {
    animation: price-flash-up 0.8s ease-in-out;
}

.price-flash-down {
    animation: price-flash-down 0.8s ease-in-out;
}

/* ===========================
   TWO-PAGE DASHBOARD STYLES
   =========================== */

/* Two-Page Dashboard Layout */
.dashboard-container {
    position: relative;
    background: linear-gradient(135deg, #0f0f13 0%, #16161e 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent overflow and scrolling at container level */
}

/* Page Content */
.page-content {
    display: none;
    height: 100%; /* Fill the available space in dashboard-container */
    overflow: hidden; /* Prevent overflow */
}

.page-content.active {
    display: block;
}

/* Dashboard Page Styles */
.dashboard-page {
    padding: 0;
    height: 100%; /* Fill the available space */
    overflow: hidden; /* Prevent scrollbar */
}

.dashboard-content {
    height: 100%;
    position: relative;
}

/* Override container padding for dashboard only */
body.dashboard-active .content-wrapper .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Responsive Charts Grid Container */
.charts-grid-container {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.charts-grid {
    position: relative;
    height: 100%;
    width: 100%;
    display: grid;
    gap: 8px;
    padding: 8px;
    /* Grid dimensions will be set dynamically by JavaScript */
    box-sizing: border-box;
}

.symbol-piece {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.symbol-charts-grid {
    position: relative;
    height: 100%;
    width: 100%;
    display: grid;
    gap: 4px;
    /* Grid layout will be set dynamically by JavaScript for fibonacci sizing */
    box-sizing: border-box;
}

.grid-chart-panel {
    background: #0f0f13;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Chart maximize button */
.chart-maximize-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 15;
}

.chart-maximize-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    opacity: 1 !important;
}

.grid-chart-panel:hover .chart-maximize-btn {
    opacity: 0.8;
}

.chart-maximize-btn svg {
    width: 14px;
    height: 14px;
}

/* Full Screen Chart Page */
.fullscreen-page {
    position: relative;
    width: 100%;
    height: 100%; /* Fill available space */
    background: #0f0f13;
}

.fullscreen-chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fullscreen-chart-content {
    width: 100%;
    height: 100%; /* Fill the parent fullscreen-page container */
    position: relative;
}

/* Back Button Overlay */
.fullscreen-back-btn-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Space Grotesk', sans-serif;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fullscreen-back-btn-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.fullscreen-back-btn-overlay svg {
    width: 16px;
    height: 16px;
}

/* Hide bottom panel when in fullscreen */
.fullscreen-page.active ~ .bottom-panel-wrapper {
    display: none;
}

/* Chart selection styles - identical to hover effect */
.grid-chart-panel.selected {
    border-color: rgba(0, 194, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.2);
    transition: all 0.2s ease;
}

/* Hover effects for chart panels */
.grid-chart-panel:hover {
    border-color: rgba(0, 194, 255, 0.4);
    transition: all 0.2s ease;
}

.grid-chart-panel:hover:not(.selected) {
    box-shadow: 0 0 10px rgba(0, 194, 255, 0.2);
}

/* Chart Container */
.grid-chart-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Details Page Styles */
.details-page {
    padding: 10px;
    max-width: 100%;
    height: 100%; /* Fill available space */
    overflow-y: auto; /* Allow scrolling within the container */
    box-sizing: border-box;
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Settings Page Styles */
.settings-page {
    padding: 10px;
    max-width: 100%;
    height: 100%; /* Fill available space */
    overflow-y: auto; /* Allow scrolling within the container */
    box-sizing: border-box;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Hotkey Input Styles */
.hotkey-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hotkey-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.hotkey-input::placeholder {
    color: #6b7280;
}

/* Save Button Styles */
#save-hotkeys-btn {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#save-hotkeys-btn:hover {
    transform: translateY(-1px);
}

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

/* Responsive Grid Layout */
@media (max-width: 1200px) {
    .charts-grid {
        gap: 6px;
        padding: 6px;
    }
}

@media (max-width: 900px) {
    .charts-grid {
        gap: 6px;
        padding: 6px;
    }
}

/* Chart Legend Styles - Modern Minimalist */
.chart-legend {
    user-select: none;
    transition: opacity 0.2s ease;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.025em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .charts-grid-container {
        padding: 4px;
    }

    .charts-grid {
        gap: 4px;
        padding: 4px;
    }

    .symbol-charts-grid {
        gap: 2px;
    }

    .chart-legend {
        font-size: 9px !important;
        padding: 3px 5px !important;
        top: -2px !important;
        left: 4px !important;
        backdrop-filter: blur(6px) !important;
        border-radius: 2px !important;
    }

    .details-page {
        padding: 12px;
        height: 100%; /* Fill available space */
        gap: 12px;
    }

    .settings-page {
        padding: 12px;
        height: 100%; /* Fill available space */
        gap: 12px;
    }
}

/* Animations */
.page-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Bottom Panel Wrapper */
.bottom-panel-wrapper {
    position: relative;
    z-index: 50;
}

/* Disable overflow when dropdowns are open to prevent clipping */
.bottom-panel-wrapper.dropdown-open {
    overflow-y: visible;
    max-height: none;
}

/* Positions Table - Overlay mode for instant show/hide */
.positions-table {
    position: fixed;
    bottom: 0; /* Will be positioned by JavaScript */
    left: 0;
    right: 0;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 65;
}

.positions-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 194, 255, 0.6) 20%,
        rgba(0, 194, 255, 0.9) 50%,
        rgba(0, 194, 255, 0.6) 80%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.positions-table:hover::before {
    opacity: 1;
}

/* Positions panel is now an overlay - dashboard height remains constant */

.positions-data-table {
    border-collapse: collapse;
    font-size: 0.875rem;
    width: 100%;
}

.positions-data-table th,
.positions-data-table td {
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
}

.positions-header-row th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
    z-index: 1;
}

.positions-header-row th:first-child {
    border-top-left-radius: 4px;
}

.positions-header-row th:last-child {
    border-top-right-radius: 4px;
}

.position-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.position-row:last-child {
    border-bottom: none;
}

.position-row td {
    vertical-align: middle;
}

/* Header Navigation Button Styles */
.page-nav-btn {
    position: relative;
    transition: all 0.3s ease;
}

.page-nav-btn.active {
    background: rgba(0, 194, 255, 0.2) !important;
    color: #00c2ff !important;
    border-color: rgba(0, 194, 255, 0.4) !important;
}

.page-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #00c2ff, #00ffa3);
    border-radius: 1px;
}

/* Positions Toggle Button */
.positions-toggle-btn {
    background: rgba(0, 194, 255, 0.1);
    border: 1px solid rgba(0, 194, 255, 0.3);
    color: rgba(0, 194, 255, 0.8);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.positions-toggle-btn:hover {
    background: rgba(0, 194, 255, 0.2);
    border-color: rgba(0, 194, 255, 0.5);
    color: #00c2ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 194, 255, 0.15);
}

.positions-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 194, 255, 0.1);
}

.positions-toggle-icon {
    transition: transform 0.25s ease-out;
}

.positions-toggle-btn.active .positions-toggle-icon {
    transform: rotate(180deg);
}

/* Positions Panel Visibility */
.positions-table.hidden {
    display: none; /* Hide when not active */
}

/* Add a subtle glow effect when positions are visible */
.positions-table:not(.hidden) {
    box-shadow: 0 -4px 20px rgba(0, 194, 255, 0.1);
}

/* Pulse animation for the button when positions are hidden */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 194, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(0, 194, 255, 0);
    }
}

.positions-toggle-btn.positions-hidden {
    animation: pulse-glow 2s infinite;
}


/* Responsive adjustments for positions table */
@media (max-width: 768px) {
    .positions-data-table {
        font-size: 0.75rem;
    }

    .positions-data-table th,
    .positions-data-table td {
        padding: 0.125rem 0.25rem;
    }

    .positions-header-row th {
        font-size: 0.625rem;
    }

    .positions-toggle-btn {
        padding: 4px;
    }

    .positions-toggle-icon {
        width: 3.5;
        height: 3.5;
    }
}

/* Mobile Picker Panels - Position Panel Style */
.mobile-picker-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 120px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 65;
    box-shadow: 0 -4px 20px rgba(0, 194, 255, 0.1);
}

.mobile-picker-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 194, 255, 0.6) 20%,
        rgba(0, 194, 255, 0.9) 50%,
        rgba(0, 194, 255, 0.6) 80%,
        transparent 100%);
    opacity: 1;
}

.mobile-picker-panel.hidden {
    display: none;
}

.mobile-picker-panel-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(20, 20, 25, 0.8);
}

.mobile-picker-content {
    padding: 16px 20px 20px;
}

.mobile-picker-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(30, 30, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-picker-option:hover {
    background: rgba(40, 40, 45, 0.8);
    border-color: rgba(0, 194, 255, 0.3);
    transform: translateX(2px);
}

.mobile-picker-radio {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    accent-color: #00c2ff;
    background-color: rgba(30, 30, 35, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mobile-picker-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.mobile-timeframe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mobile-timeframe-btn {
    padding: 12px 16px;
    background: rgba(30, 30, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-timeframe-btn:hover {
    background: rgba(40, 40, 45, 0.8);
    border-color: rgba(0, 194, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.mobile-timeframe-btn.active {
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.2) 0%, rgba(0, 71, 171, 0.2) 100%);
    border-color: rgba(0, 194, 255, 0.5);
    color: #00c2ff;
    box-shadow: 0 2px 8px rgba(0, 194, 255, 0.2);
}

/* ===========================
   HEADER STYLES
   =========================== */


.footer {
    flex-shrink: 0;
}

/* Enhanced Header Design */
.modern-header {
    background: linear-gradient(135deg,
        rgba(15, 15, 15, 0.98) 0%,
        rgba(26, 26, 26, 0.98) 50%,
        rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.modern-header:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Expanding Mobile Menu (Grows from header) */
.mobile-menu {
    position: absolute;
    top: 0; /* Start from header position */
    left: 0;
    right: 0;
    width: 100vw; /* Full viewport width */
    margin-left: calc(-50vw + 50%); /* Center it */
    background: linear-gradient(135deg,
        rgba(15, 15, 15, 0.98) 0%,
        rgba(26, 26, 26, 0.98) 50%,
        rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scaleY(0) translateY(56px); /* Start collapsed at header bottom */
    transform-origin: top center; /* Expand from top */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth easing */
    z-index: 50;
    min-height: 56px; /* At least header height */
}

.mobile-menu.active {
    transform: scaleY(1) translateY(0); /* Expand to full size */
    opacity: 1;
    visibility: visible;
}

/* Enhanced Navigation Buttons */
.nav-button-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-button-enhanced:hover::before {
    left: 100%;
}

.nav-button-enhanced.active {
    background: linear-gradient(135deg, rgba(0, 71, 171, 0.3) 0%, rgba(0, 194, 255, 0.2) 100%);
    border-color: rgba(0, 194, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 194, 255, 0.3);
}

/* Asset Links Dropdown */
.asset-links-dropdown {
    position: relative;
}

.asset-links-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg,
        rgba(26, 26, 30, 0.98) 0%,
        rgba(20, 20, 25, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
}

.asset-links-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Hamburger Menu Animation */
.hamburger-line {
    width: 20px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-line:nth-child(1) { transform: translateY(-6px); }
.hamburger-line:nth-child(3) { transform: translateY(6px); }

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
}

/* Brutalist Mobile Menu Styling */
.mobile-menu-content {
    padding: 4rem 1.5rem 1.5rem 1.5rem; /* Extra top padding to clear header */
    max-height: 100%; /* Fill available space in mobile menu */
    overflow-y: auto;
    font-family: 'Space Grotesk', sans-serif;
}

/* Mobile menu scrollbar styles consolidated above */

/* Brutalist Mobile Navigation Grid */
.mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Brutalist Mobile Navigation Links */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0.25rem;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #000;
    border-radius: 0;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    transition: all 0.1s ease;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    position: relative;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(0);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

.mobile-nav-link:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.6);
}

/* Brutalist Mobile Links Section */
.mobile-links-section {
    padding-top: 1.5rem;
    position: relative;
}

.mobile-links-title {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.mobile-links-group {
    margin-bottom: 1.5rem;
}

.mobile-links-group-title {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid #fff;
}

.mobile-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 0.5rem;
}

.mobile-asset-link {
    display: inline-block;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.1s ease;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-asset-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(0);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
}

.mobile-asset-link:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.4);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .portfolio-title {
        font-size: 0.875rem;
        letter-spacing: 0.025em;
    }
}

@media (max-width: 480px) {
    .portfolio-title {
        font-size: 0.75rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Header Asset Links Styling */
.header-asset-links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Mono', monospace;
}

.header-asset-links-groups {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-asset-links-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.header-asset-links-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.header-asset-links-buttons {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.header-asset-link {
    font-size: 8px;
    padding: 1px 3px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.1s ease;
    text-decoration: none;
    border-radius: 2px;
}

.header-asset-link:hover {
    background-color: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-cyan);
    text-decoration: none;
}

/* Responsive adjustments for asset links */
@media (max-width: 768px) {
    .asset-links-wrapper {
        flex-direction: column;
        gap: 4px;
    }

    .asset-links-group {
        flex-direction: row;
        gap: 4px;
        flex-wrap: wrap;
    }

    .asset-links-groups {
        flex-direction: column;
        gap: 4px;
    }

    /* Header asset links responsive */
    .header-asset-links {
        display: none; /* Hide on mobile to save space */
    }
}