/* Design System & Variable Tokens */
:root {
    --bg-main: #0b0f19;
    --bg-card: #161d30;
    --bg-card-hover: #1e2942;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(59, 130, 246, 0.2);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Harmonious colors */
    --color-green: #10b981;
    --color-green-bg: rgba(16, 185, 129, 0.1);
    --color-green-border: rgba(16, 185, 129, 0.25);
    
    --color-red: #ef4444;
    --color-red-bg: rgba(239, 68, 68, 0.1);
    --color-red-border: rgba(239, 68, 68, 0.25);
    
    --color-amber: #f59e0b;
    --color-amber-bg: rgba(245, 158, 11, 0.1);
    --color-amber-border: rgba(245, 158, 11, 0.25);
    
    --color-blue: #3b82f6;
    --color-blue-bg: rgba(59, 130, 246, 0.15);
    --color-blue-border: rgba(59, 130, 246, 0.3);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow-green: 0 0 15px rgba(16, 185, 129, 0.2);
    --shadow-glow-red: 0 0 15px rgba(239, 68, 68, 0.2);
    --shadow-glow-amber: 0 0 15px rgba(245, 158, 11, 0.2);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
    border: 1px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Container */
.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

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

.tagline {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Connection Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-indicator.connected .status-dot {
    background-color: var(--color-green);
    box-shadow: 0 0 8px var(--color-green);
}

.status-label {
    color: var(--text-secondary);
}

/* Search Bar */
.search-container {
    position: relative;
    width: 300px;
}

@media (max-width: 600px) {
    .search-container {
        width: 100%;
    }
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0 16px;
    height: 40px;
    width: 100%;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    margin-left: 8px;
}

.clear-btn:hover {
    color: var(--text-primary);
}

/* Search Dropdown suggestions */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.search-item:hover {
    background-color: var(--bg-card-hover);
}

.search-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-item-symbol {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.search-item-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.search-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-item-category {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.search-item-price {
    font-size: 13px;
    font-weight: 600;
}

.search-dropdown-message {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Main Area */
.app-main {
    flex: 1;
}

/* Stats Overview Cards */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.stat-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.stat-icon-bg.total { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); }
.stat-icon-bg.above { background: var(--color-green-bg); color: var(--color-green); }
.stat-icon-bg.below { background: var(--color-red-bg); color: var(--color-red); }
.stat-icon-bg.alerts { background: var(--color-amber-bg); color: var(--color-amber); }

/* Glowing highlight for the alert stats card if alerts > 0 */
.stat-card.alert-highlight.has-alerts {
    border-color: var(--color-amber-border);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.05) 100%);
    box-shadow: var(--shadow-glow-amber);
    animation: alertPulse 3s infinite ease-in-out;
}

@keyframes alertPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08); }
    50% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.25); border-color: rgba(245, 158, 11, 0.5); }
}

.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.text-amber { color: var(--color-amber); }

/* Controls Bar */
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 16px;
}

.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.filter-tab:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-tab.active {
    background: var(--color-blue);
    color: #ffffff;
    border-color: var(--color-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.view-selectors {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: var(--text-secondary);
}

.view-btn.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Loading & Empty States */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-icon {
    font-size: 48px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 320px;
}

/* Dashboard Assets Grid */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* Asset Cards */
.asset-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.asset-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.asset-card.card-above:hover {
    box-shadow: var(--shadow-glow-green);
    border-color: rgba(16, 185, 129, 0.3);
}

.asset-card.card-below:hover {
    box-shadow: var(--shadow-glow-red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Blinking warning pulse for recent crossovers */
.asset-card.has-alert {
    border-color: var(--color-amber-border);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.asset-card.has-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-amber);
    box-shadow: 0 0 10px var(--color-amber);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.asset-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asset-symbol {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.asset-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.category-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Pricing Grid */
.price-display {
    margin-bottom: 20px;
}

.current-price {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.ma-label-value {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ma-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Badges */
.status-badge-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: var(--transition);
}

.badge svg {
    flex-shrink: 0;
}

.badge.bg-green-glow {
    background-color: rgba(16, 185, 129, 0.06);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.18);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

.badge.bg-red-glow {
    background-color: rgba(239, 68, 68, 0.06);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.18);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.05);
}

/* Custom Crossover Badges */
.crossover-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.crossover-badge svg {
    flex-shrink: 0;
}

.crossover-badge.crossover-above {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    --crossover-pulse-color-low: rgba(16, 185, 129, 0.2);
    --crossover-pulse-color-high: rgba(16, 185, 129, 0.8);
    animation: crossoverPulse 2s infinite ease-in-out;
}

.crossover-badge.crossover-below {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    --crossover-pulse-color-low: rgba(239, 68, 68, 0.2);
    --crossover-pulse-color-high: rgba(239, 68, 68, 0.8);
    animation: crossoverPulse 2s infinite ease-in-out;
}

.crossover-badge.compact {
    animation: none;
    box-shadow: none;
}

@keyframes crossoverPulse {
    0%, 100% {
        border-color: var(--crossover-pulse-color-low);
        box-shadow: 0 0 4px var(--crossover-pulse-color-low);
    }
    50% {
        border-color: var(--crossover-pulse-color-high);
        box-shadow: 0 0 10px var(--crossover-pulse-color-high);
    }
}

.pct-distance-badge {
    font-size: 12px;
    font-weight: 700;
}

.watchlist-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watchlist-btn:hover {
    color: var(--text-primary);
}

.watchlist-btn.in-watchlist {
    color: var(--color-amber);
}

/* List / Table View Styling */
.assets-list-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.assets-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.assets-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.assets-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: var(--transition);
}

.assets-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.assets-table th.sortable::after {
    content: ' ▾';
    opacity: 0;
    display: inline-block;
    margin-left: 6px;
    transition: opacity var(--transition), transform var(--transition);
}

.assets-table th.sortable.sort-asc::after {
    content: ' ▴';
    opacity: 1;
    color: var(--color-blue);
}

.assets-table th.sortable.sort-desc::after {
    content: ' ▾';
    opacity: 1;
    color: var(--color-blue);
}

.assets-table th.sortable:hover::after {
    opacity: 0.5;
}

.assets-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 14px;
    vertical-align: middle;
}

.assets-table tr {
    cursor: pointer;
    transition: var(--transition);
}

.assets-table tr:hover {
    background-color: var(--bg-card-hover);
}

.table-asset-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-symbol {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
}

.table-name {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modal details overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 13, 26, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-title-area h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
}

.modal-badge-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 0.5;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    min-height: 0;
}

/* Modal Stats Panel */
.modal-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.modal-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.m-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
}

.modal-alert-box {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: var(--transition);
}

.modal-alert-box.alert-above {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.modal-alert-box.alert-below {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

.modal-alert-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Chart Canvas Area */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    background: rgba(8, 13, 26, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

.chart-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-card);
    z-index: 5;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Modal Footer buttons */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* App Footer */
.app-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

.app-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Authentication Styles */
.auth-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.user-email-text {
    color: var(--text-secondary);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    padding: 0 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.auth-card {
    max-width: 420px;
    align-self: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    background: rgba(8, 13, 26, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.auth-error-box {
    background: var(--color-red-bg);
    border: 1px solid var(--color-red-border);
    color: var(--color-red);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 4px;
}

.badge.bg-amber-glow {
    background-color: var(--color-amber-bg);
    color: var(--color-amber);
    border-color: var(--color-amber-border);
    box-shadow: var(--shadow-glow-amber);
}

.badge.bg-blue-glow {
    background-color: var(--color-blue-bg);
    color: var(--color-blue);
    border-color: var(--color-blue-border);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Google Sign-In & Auth Divider */
.btn-google {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-google:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider:not(:empty)::before {
    margin-right: 12px;
}

.auth-divider:not(:empty)::after {
    margin-left: 12px;
}

/* Signed-Out Landing Card Styling */
.landing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(22, 29, 48, 0.7), rgba(15, 20, 35, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 650px;
    margin: 40px auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.landing-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.landing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    z-index: 1;
}

.landing-card h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    z-index: 1;
}

.landing-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 32px;
    z-index: 1;
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 36px;
    width: 100%;
    z-index: 1;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-icon {
    font-size: 16px;
}

.landing-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    z-index: 1;
}

/* Quick Add Styling inside empty state */
.quick-add-container {
    width: 100%;
    max-width: 440px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
}

.quick-add-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.quick-add-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.quick-add-btn {
    font-size: 12px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    transition: var(--transition);
}

.quick-add-btn:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: var(--color-blue) !important;
    transform: translateY(-1px);
}

/* Chart Timeline Selector styling */
.chart-timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 16px;
}

.chart-timeline-selector {
    display: flex;
    gap: 4px;
    background: rgba(8, 13, 26, 0.4);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.timeline-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.timeline-tab:hover {
    color: var(--text-primary);
}

.timeline-tab.active {
    background: var(--color-blue);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

@media (max-width: 600px) {
    .chart-timeline-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .chart-timeline-selector {
        width: 100%;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }
    .chart-timeline-selector::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
    }
    .timeline-tab {
        flex-shrink: 0;
    }
}

/* Watchlist Comparison View Styling */
.assets-chart-container {
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.comparison-title-area h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.comparison-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.comparison-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.comparison-type-selector {
    display: flex;
    gap: 4px;
    background: rgba(8, 13, 26, 0.4);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.comp-type-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comp-type-tab:hover {
    color: var(--text-primary);
}

.comp-type-tab.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comp-timeline-selector {
    display: flex;
    gap: 4px;
    background: rgba(8, 13, 26, 0.4);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 8px;
}

.comparison-chart-wrapper {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .comparison-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .comparison-controls {
        width: 100%;
        justify-content: space-between;
    }
    .comp-timeline-selector {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}


