/* CSS Reset & Variables */
:root {
    /* Brand Colors */
    --color-primary: #1e3a5f;
    --color-primary-dark: #162c49;
    --color-primary-light: #2d4a6f;
    --color-accent: #e53e3e;
    --color-accent-hover: #c53030;
    
    /* Status Colors */
    --color-positive: #10b981;
    --color-negative: #ef4444;
    
    /* Neutral Colors */
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    --color-border: #e5e7eb;
    --color-text-primary: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Typography */
    --font-family: Arial, Helvetica, sans-serif;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    
    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-base: 150ms ease-in-out;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-dropdown-level3: 1001;
    --z-sticky: 1020;
    --z-modal: 1050;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
    .container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Market Ticker Bar - Very Subtle */
.market-ticker {
    background: #ffffff;  /* White background */
    border-bottom: 1px solid #f0f0f0;
    height: 26px;
    display: flex;
    align-items: center;
    font-size: 11px;
}

.ticker-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}


.ticker-wrapper::-webkit-scrollbar {
    display: none;
}

.market-ticker .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    margin-right: 20px;
}

.market-ticker .ticker-item:first-child {
    margin-left: -1px; /* Kleine Korrektur nach links für perfekte Ausrichtung */
}

.market-ticker .ticker-name {
    display: inline-block;
    color: #666;  /* Gray text */
    font-weight: 500;
}

.market-ticker .ticker-value {
    display: inline-block;
    color: #333;  /* Dark gray */
    font-weight: 600;
}

.market-ticker .ticker-change {
    font-weight: 500;
    font-size: 10px;
}

.market-ticker .ticker-change.positive {
    color: var(--color-positive);
}

.market-ticker .ticker-change.negative {
    color: var(--color-negative);
}

/* Mini Ticker in Header - Not used anymore */
.mini-ticker {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
    border-left: 1px solid var(--color-border);
    font-size: 12px;
}

.mini-ticker-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.ticker-value {
    font-weight: 600;
    font-size: 12px;
}

.ticker-value.positive {
    color: var(--color-positive);
}

.ticker-value.negative {
    color: var(--color-negative);
}

/* Main Header with Glassmorphism */
.main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 26px; /* Account for ticker bar */
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Level 1: Primary Header */
.header-primary {
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;  /* Reduced for more compact header */
}

.header-content {
    display: flex;
    align-items: center;
    gap: 40px;  /* Increased from 32px for more breathing room */
}

/* Logo */
.logo-section {
    flex-shrink: 0;
}

.logo {
    display: block;
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

/* Search Section */
.search-section {
    flex: 1;
    max-width: 600px;
    position: relative;
}

/* Mobile search button - hidden by default */
.search-icon-mobile {
    display: none;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    padding: 6px var(--spacing-md);  /* Reduced vertical padding */
    height: 38px;  /* Fixed height to match login button */
    transition: all var(--transition-base);
}

.search-container:focus-within {
    background: var(--color-background);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.search-icon {
    color: var(--color-text-secondary);
    margin-right: var(--spacing-sm);
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    outline: none;
}

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

.chart-toggle {
    background: none;
    border: none;
    padding: var(--spacing-xs);
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.chart-toggle:hover {
    background: var(--color-border);
    color: var(--color-primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 28px;  /* Increased spacing between action items */
}

/* Services Navigation */
.services-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.service-link {
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 500;
    white-space: nowrap;
}

.service-link:hover {
    background: var(--color-surface);
}

.service-link.portfolio {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 500;  /* Same as login button */
    transition: all var(--transition-base);
    position: relative;
}

.service-link.portfolio:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}


/* User Controls */
.user-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.icon-button {
    position: relative;
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.icon-button:hover {
    background: var(--color-surface);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    color: var(--color-text-primary);
}

/* Level 2: Main Navigation */
.header-secondary {
    background: white;
    padding: 0;
    overflow: visible;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.header-secondary .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Main navigation (Märkte, News & Analysen, etc.) */
.main-nav {
    display: flex;
    list-style: none;
    gap: 0;
    flex: 1;
    overflow: visible;
    position: relative;
    margin: 0;
    padding: 0;
}

.main-nav li:first-child .main-nav-link {
    padding-left: 0;
}

.main-nav-link {
    display: block;
    text-decoration: none;
    color: #4a5568;
    font-size: var(--font-size-base);
    font-weight: 500;
    padding: 10px 16px;
    white-space: nowrap;
    transition: all 200ms ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.main-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all 250ms ease;
    transform: translateX(-50%);
}

.main-nav-link:hover {
    color: var(--color-primary);
}

.main-nav-link:hover::after {
    width: 60%;
}

.main-nav-link.active {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.main-nav-link.active::after {
    width: 100%;
}

/* Dropdown arrow */
.dropdown-arrow {
    font-size: 8px;
    margin-left: 4px;
    transition: transform var(--transition-base);
    display: inline-block;
}

.has-asset-menu:hover .dropdown-arrow,
.has-asset-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Active state when asset bar is visible */
.has-asset-menu.active .main-nav-link {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Has asset menu - for Märkte link */
.has-asset-menu {
    position: relative;
}

/* Modern Mega Menu - Onvista Style */
.mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 100%;
    max-width: 1400px;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-dropdown);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

@media (max-width: 1440px) {
    .mega-menu {
        max-width: calc(100% - 40px);
    }
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    padding: 20px;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 32px;
}

/* Left Column - Navigation */
.mega-menu-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .mega-menu-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .mega-menu-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menu-section {
    margin-bottom: 12px;
}

.menu-section-title {
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 200ms ease;
    position: relative;
    display: block;
    white-space: nowrap;
}

.menu-link:hover {
    background: #f0f4f8;
    color: var(--color-primary);
}

/* Menu Items with Submenu */
.menu-item-with-submenu {
    position: relative;
}

.menu-link.has-submenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
}

.submenu-arrow {
    opacity: 0.5;
    transition: all 200ms ease;
}

.menu-link.has-submenu:hover .submenu-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Submenu */
.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 8px;
    min-width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 200ms ease;
    z-index: 10;
}

.menu-item-with-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.submenu-link {
    display: block;
    padding: 8px 16px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    transition: all 150ms ease;
    border-bottom: 1px solid #f5f5f5;
}

.submenu-link:last-child {
    border-bottom: none;
}

.submenu-link:hover {
    background: #f0f4f8;
    color: var(--color-primary);
}

.submenu-link:first-child {
    border-radius: 8px 8px 0 0;
}

.submenu-link:last-child {
    border-radius: 0 0 8px 8px;
}

/* Right Column - Market Cards */
.mega-menu-markets {
    padding-left: 24px;
    border-left: 1px solid #f0f0f0;
}

/* News Feed in Mega Menu */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-feed-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 200ms ease;
}

.news-feed-item:hover {
    background: #e8ecf0;
}

.news-feed-time {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.news-feed-title {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

/* Forum Topics */
.forum-topics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-topic {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 200ms ease;
}

.forum-topic:hover {
    background: #e8ecf0;
}

.topic-title {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
}

.topic-meta {
    font-size: 11px;
    color: #6b7280;
}

/* Portfolio Promo */
.portfolio-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px;
}

.promo-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.promo-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.promo-text {
    font-size: 15px;
    color: #6b7280;
}

.promo-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-features li {
    font-size: 14px;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-primary {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 200ms ease;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 200ms ease;
}

.btn-secondary:hover {
    background: #f0f4f8;
}

.promo-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-preview {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    opacity: 0.1;
}

/* Portfolio Performance */
.portfolio-performance {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    align-items: center;
}

.portfolio-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.portfolio-value {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

.portfolio-change {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.portfolio-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.portfolio-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.market-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

@media (min-width: 1400px) {
    .market-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.market-card {
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 110px;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.market-name {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.market-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.market-change {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 3px;
}

.market-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.market-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Asset navigation (Aktien, ETFs, etc.) */
.asset-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.asset-nav li:first-child .asset-link {
    padding-left: 0;
}

.asset-link {
    display: block;
    text-decoration: none;
    color: #4a5568;  /* Dunkelgrau */
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: 10px 16px;
    white-space: nowrap;
    transition: all var(--transition-base);
    position: relative;
    border-bottom: 2px solid transparent;
}

.asset-link:hover {
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.5);
    border-bottom-color: var(--color-primary);
}

.asset-nav .has-dropdown {
    position: relative;
}


.more-assets {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.more-assets:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

/* Level 3 - Horizontal Sub Navigation */
.sub-nav-bar {
    background: #f3f5f7;
    border-bottom: 1px solid var(--color-border);
    min-height: 0;
    overflow: hidden;
    transition: min-height 200ms ease;
}

.sub-nav-bar.active {
    min-height: 40px;
}

.sub-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
    height: 40px;
}

.sub-nav li:first-child .sub-nav-link {
    padding-left: 0;
}

.sub-nav-link {
    display: block;
    padding: 8px 16px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    transition: all var(--transition-base);
    border-bottom: 2px solid transparent;
}

.sub-nav-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Search divider and button */
.search-divider {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 8px;
}

.search-button {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.search-button:hover {
    color: var(--color-primary);
}

/* Chart Button */
.chart-button {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.chart-button:hover {
    color: var(--color-primary);
}

/* Search Results Dropdown - Base Styles */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 85vw);
    max-width: calc(100vw - 60px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    display: none;
    overflow: hidden;
    max-height: 700px;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-results.active {
    display: block;
}

@media (max-width: 768px) {
    .search-results {
        min-width: unset;
        left: -20px;
        right: -20px;
        border-radius: 0;
        max-height: calc(100vh - 120px);
    }
    
    .search-empty .search-empty-content {
        grid-template-columns: 1fr;
    }
    
    .search-active .search-active-content {
        grid-template-columns: 1fr;
    }
    
    .search-right-column {
        border-top: 1px solid #f0f0f0;
        border-left: none;
    }
}

/* Finder Bar */
.finder-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #fafbfc;
    border-radius: 16px 16px 0 0;
    overflow-x: auto;
}

.finder-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.3px;
    margin-right: 12px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.finder-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.finder-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.finder-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

/* Version A: Empty State */
.search-empty .search-empty-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 0 0 16px 16px;
}

.search-empty .search-column {
    padding: 32px;
    border-right: 1px solid #f0f4f8;
}

.search-empty .search-column:last-child {
    border-right: none;
}

.column-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
    margin-top: 0;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #f1f5f9;
}

/* Favorite Items */
.favorite-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.favorite-item {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.favorite-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.favorite-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-right: 12px;
}

.favorite-change {
    font-size: 13px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.favorite-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.favorite-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Pages List */
.pages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2937;
    font-size: 14px;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.page-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.page-icon {
    color: #6b7280;
}

/* Version B: Active Search */
.search-active .search-active-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    background: white;
    border-radius: 0 0 16px 16px;
}

.search-left-column {
    padding: 20px 24px;
}

.search-right-column {
    padding: 20px 24px;
    background: #fafbfc;
    border-radius: 0 0 16px 16px;
    border-left: 1px solid #f5f7fa;
    border-top-left-radius: 8px;
}

/* Securities List */
.securities-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.security-info {
    display: flex;
    align-items: center;
}

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

.security-item:hover {
    background: #f8fafc;
    border-color: #d1d9e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

/* Security main removed - using row structure instead */

.security-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.security-wkn {
    color: #94a3b8;
    font-weight: 400;
    font-size: 13px;
    margin-left: 2px;
}

/* security-meta removed - no longer needed */

/* Security price removed - integrated into row structure */

.price-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.price-change {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

.price-change.positive {
    color: #059669;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.price-change.negative {
    color: #dc2626;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.08) 100%);
}

.price-time {
    font-size: 10px;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

.security-actions {
    display: none;
    gap: 8px;
    align-items: center;
}

.security-item:hover .security-actions {
    display: flex;
}

.security-item:hover .price-value,
.security-item:hover .price-change {
    display: none;
}

.action-btn-small {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px !important;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: inline-block;
}

.action-btn-small:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.action-btn-small.primary {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

.action-btn-small.primary:hover {
    background: #162c49;
    border-color: #162c49;
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.15);
}

.show-all-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.show-all-link:hover {
    text-decoration: underline;
}

/* Pages Results Section */
.pages-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.page-result-item {
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.page-result-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(2px);
}

.page-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.page-result-path {
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 500;
}

/* Derivatives Section */
.derivatives-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.derivative-item {
    padding: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    transition: all 200ms ease;
}

.derivative-item:hover {
    border-color: #d1d9e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.derivative-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.derivative-type {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.derivative-issuer {
    font-size: 11px;
    color: #94a3b8;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 6px;
}

.derivative-details {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}

.derivative-info {
    display: flex;
    gap: 4px;
    font-size: 12px;
}

.derivative-info .label {
    color: #6b7280;
}

.derivative-info .value {
    font-weight: 500;
    color: #1f2937;
}

.derivative-btn {
    width: 100%;
    padding: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 150ms ease;
}

.derivative-btn:hover {
    background: #e5e7eb;
}

.derivative-ad {
    padding: 12px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
}

.ad-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ad-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* News Section */
.search-news-section {
    padding: 24px;
    background: #f8fafc;
    border-top: 1px solid #e8ecf0;
    border-radius: 0 0 16px 16px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.news-time {
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7280;
    min-width: 60px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.news-source {
    font-size: 11px;
    color: #9ca3af;
}

/* Search Sections */
.search-section {
    border-bottom: 1px solid #f0f0f0;
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafafa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    cursor: pointer;
}

.section-toggle {
    font-size: 10px;
    transition: transform 200ms ease;
}

.search-section.collapsed .section-toggle {
    transform: rotate(180deg);
}

.search-section.collapsed .search-section-content {
    display: none;
}

/* Search Result Items */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background var(--transition-base);
    gap: 12px;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Modern Search Dropdown - Onvista Inspired */
.search-dropdown-modern {
    padding: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}

.search-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Recent Searches */
.search-recent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-recent-item-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 200ms ease;
    color: #1e293b;
    font-size: 14px;
}

.search-recent-item-modern:hover {
    background: #f1f5f9;
    color: var(--color-primary);
}

.search-recent-item-modern svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Popular Pages Grid */
.popular-pages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.popular-page-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: all 200ms ease;
    border: 1px solid transparent;
}

.popular-page-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.15);
}

.popular-page-item:hover svg {
    color: white;
}

.popular-page-item svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    transition: color 200ms ease;
}

/* Search Results List */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-modern {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms ease;
    border: 1px solid transparent;
}

.search-result-modern:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.result-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.result-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.result-type {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.result-dot {
    color: #cbd5e1;
}

.result-wkn, .result-exchange {
    color: #94a3b8;
}

.result-price-section {
    text-align: right;
}

.result-price {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.result-change {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.result-change.positive {
    color: #10b981;
}

.result-change.negative {
    color: #ef4444;
}

/* News List */
.search-news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-news-item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 200ms ease;
    border: 1px solid #f1f5f9;
}

.search-news-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.news-time {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.news-title {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
}

/* Search Footer */
.search-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #f0f0f0;
}

.advanced-search-link, .see-all-results {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 200ms ease;
}

.advanced-search-link:hover, .see-all-results:hover {
    text-decoration: underline;
    transform: translateX(2px);
}

.see-all-results {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.see-all-results:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Enhanced Search Results - Onvista Style Cards */
.search-results-container {
    padding: 8px 0;
}

.search-result-card {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 8px 8px 8px;
    transition: all 200ms ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.search-result-card:hover {
    background: #f8f9fa;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.result-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-card-info {
    flex: 1;
}

.result-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.2;
}

.result-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #757575;
}

.result-symbol {
    font-weight: 500;
    color: #64748b;
}

.result-exchange {
    color: #9e9e9e;
}

.result-card-price {
    text-align: right;
}

.result-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.result-change {
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.result-change.positive {
    color: #10b981;
}

.result-change.negative {
    color: #ef4444;
}

.result-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.result-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 200ms ease;
}

.result-action-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(13, 71, 161, 0.2);
}

.result-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Login Modal - Removed in favor of full-page login */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 440px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.login-modal-content {
    padding: 40px;
    position: relative;
}

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #999;
    border-radius: 50%;
    transition: all 200ms ease;
}

.login-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 40px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 14px;
    color: #757575;
    margin: 0;
}

.login-form {
    margin-bottom: 24px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 200ms ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

.checkbox-input {
    margin-right: 8px;
}

.forgot-link {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 200ms ease;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms ease;
}

.login-submit:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}

.login-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.login-divider span {
    background: white;
    padding: 0 16px;
    color: #9e9e9e;
    font-size: 14px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.login-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 200ms ease;
}

.social-login:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
}

.social-login.apple {
    color: #000;
}

.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 14px;
    color: #757575;
    margin: 0;
}

.register-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.register-link:hover {
    text-decoration: underline;
}

/* Result Icon */
.result-icon {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
}

/* Result Info */
.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Result Data (Price & Actions) */
.result-data {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Result Price */
.result-price {
    text-align: right;
}

.price-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.price-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Action Buttons */
.result-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
}

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

.chart-btn {
    color: #666;
}

.discussion-btn {
    color: #666;
}

/* Show All Results Link */
.show-all-results {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    transition: background 150ms ease;
}

.show-all-results:hover {
    background: #f8f9fa;
}

/* News Items in Search */
.news-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 150ms ease;
}

.news-result-item:hover {
    background: #f8f9fa;
}

.news-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.news-meta {
    font-size: 11px;
    color: #999;
}

.stock-info {
    flex: 1;
}

.stock-name {
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
}

.stock-symbol {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-top: 2px;
}

.stock-data {
    margin-right: var(--spacing-lg);
    text-align: right;
}

.stock-price {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
}

.stock-change {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-top: 2px;
}

.stock-change.positive {
    color: #10b981;
}

.stock-change.negative {
    color: #ef4444;
}

.stock-chart {
    margin-left: var(--spacing-md);
}

.mini-chart {
    display: block;
}

/* Chart button in search results */
.chart-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    margin-left: auto;
}

.chart-button:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Recent Searches */
.search-recent {
    padding: var(--spacing-sm) 0;
}

.search-recent-header {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-recent-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-base);
    color: var(--color-text-primary);
}

.search-recent-item:hover {
    background: var(--color-surface);
}

.search-recent-item svg {
    color: var(--color-text-secondary);
}

/* Mobile Menu - Hidden by default, shown on mobile */
.mobile-menu {
    display: none;
    box-sizing: border-box;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-close {
    display: none; /* Hide close button - menu is always open */
}

/* Login icon for mobile menu header */
.mobile-menu-login {
    margin-left: auto;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms ease;
}

.mobile-menu-login:hover {
    background: #f5f5f5;
    border-color: var(--color-primary);
}

/* Search bar in mobile menu */
.mobile-menu-search {
    background: #f5f5f5;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    border: none;
    border-radius: 24px;
    background: white;
    font-size: 15px;
    outline: none;
}

/* Tab navigation */
.mobile-menu-tabs {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 2px solid #f0f0f0;
}

.mobile-tab {
    padding: 8px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
    color: #333;
    display: inline-block;
}

.mobile-tab:hover {
    background: var(--color-primary);
    color: white;
}

/* Quick links section */
.mobile-quick-links {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-quick-link {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.mobile-menu-content {
    padding: 0;
}

/* Expandable sections */
.mobile-menu-section {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 200ms ease;
}

.mobile-section-header:hover {
    background: #fafafa;
}

.mobile-section-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-section-chevron {
    color: #999;
    transition: transform 200ms ease;
    font-size: 12px;
}

.mobile-menu-section.expanded .mobile-section-chevron {
    transform: rotate(180deg);
}

.mobile-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.mobile-menu-section.expanded .mobile-section-content {
    max-height: 800px; /* Increased to accommodate more items */
}

.mobile-menu-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 200ms ease;
}

.mobile-menu-link:hover {
    background: #fafafa;
    color: var(--color-primary);
}

/* Remove mobile-menu-open class styles - not needed anymore */

/* Demo Content */
.main-content {
    padding: var(--spacing-2xl) 0;
    min-height: calc(100vh - 140px);
    background: linear-gradient(to bottom, var(--color-surface) 0%, var(--color-background) 300px);
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 !important;
        width: 100% !important;
    }
}

.demo-banner {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.demo-banner h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.demo-banner p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    background: var(--color-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .services-nav {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Ensure body and html use full width */
    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Full width ticker bar */
    .market-ticker {
        padding: 0 !important;
        width: 100% !important;
    }
    
    .ticker-wrapper {
        padding: 0 8px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Hide entire desktop header on mobile */
    .header-primary {
        display: none !important;
    }
    
    /* Hide secondary navigation on mobile */
    .header-secondary {
        display: none !important;
    }
    
    /* Hide mini ticker on mobile */
    .mini-ticker {
        display: none;
    }
    
    /* Hide mobile menu overlay - not needed */
    .mobile-menu-overlay {
        display: none !important;
    }
    
    /* Make mobile menu always visible and static */
    .mobile-menu {
        display: block !important;
        position: static !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        transition: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Global box-sizing for all mobile menu elements */
    .mobile-menu * {
        box-sizing: border-box !important;
    }
    
    /* Ensure all mobile menu child elements use full width */
    .mobile-menu-header,
    .mobile-menu-search,
    .mobile-menu-tabs,
    .mobile-quick-links,
    .mobile-menu-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Remove horizontal padding to use full width */
    .mobile-menu-header {
        padding: 16px 8px !important;
    }
    
    .mobile-menu-search {
        padding: 12px 8px !important;
    }
    
    .mobile-menu-tabs {
        padding: 12px 8px !important;
    }
    
    .mobile-quick-links {
        padding: 16px 8px !important;
    }
    
    .mobile-section-header {
        padding: 16px 12px !important;
    }
    
    .mobile-menu-link {
        padding: 12px 12px 12px 24px !important;
    }
    
    /* Hide mobile menu button - not needed */
    .mobile-menu-button {
        display: none !important;
    }
    
    /* Hide full search on mobile, show icon only */
    .search-section {
        flex: 0 0 auto;
        min-width: auto;
    }
    
    .search-container {
        display: none !important; /* Force hide full search bar */
    }
    
    /* Mobile search button - force display */
    .search-icon-mobile {
        display: block !important;
        background: none;
        border: none;
        padding: var(--spacing-sm);
        cursor: pointer;
        color: var(--color-text-primary);
    }
    
    /* Search overlay for mobile */
    .search-container.mobile-active {
        display: flex !important;
        position: fixed;
        top: 60px;
        left: var(--spacing-md);
        right: var(--spacing-md);
        z-index: 1500;
        background: white;
        box-shadow: var(--shadow-lg);
        border-radius: var(--radius-md);
        padding: 6px var(--spacing-md);
    }
    
    .search-input {
        font-size: var(--font-size-sm);
    }
    
    /* Hide search results by default on mobile */
    .search-results {
        display: none;
    }
    
    /* Show search results when search is active */
    .search-container.mobile-active ~ .search-results {
        display: block;
        position: fixed;
        top: 110px;
        left: var(--spacing-md);
        right: var(--spacing-md);
        z-index: 1499;
    }
    
    .user-controls {
        gap: var(--spacing-sm);
    }
    
    .btn-login span {
        display: none;
    }
    
    .btn-login {
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }
    
    .notification-badge {
        top: -2px;
        right: -2px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
    
    .header-actions {
        order: 3;
        gap: var(--spacing-sm);
    }
    
    /* Secondary nav is hidden on mobile - see above */
    
    /* Search results on mobile */
    .search-results {
        position: fixed;
        top: 120px;
        left: var(--spacing-md);
        right: var(--spacing-md);
        max-height: 60vh;
    }
    
    .search-result-item {
        padding: var(--spacing-sm);
    }
    
    /* Modern search dropdown on mobile */
    .search-dropdown-modern {
        border-radius: 0;
        max-height: calc(100vh - 120px);
    }
    
    .popular-pages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-section {
        padding: 12px 16px;
    }
    
    /* Enhanced mobile search result cards */
    .search-results-container {
        padding: 0;
    }
    
    .search-result-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        margin: 0;
        padding: 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .search-result-card:last-child {
        border-bottom: none;
    }
    
    .result-name {
        font-size: 14px;
    }
    
    .result-value {
        font-size: 15px;
    }
    
    .result-card-actions {
        padding-top: 12px;
    }
    
    .result-action-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    /* Login modal on mobile */
    .login-modal-content {
        padding: 24px;
    }
    
    .login-modal {
        width: 95%;
        max-width: 400px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .stock-chart {
        display: none; /* Hide charts on very small screens */
    }
}

@media (max-width: 520px) {
    /* Smaller logo on narrow screens */
    .logo-img {
        height: 20px !important;
    }
    
    /* Even smaller padding for mobile menu on narrow screens */
    .mobile-menu-header,
    .mobile-menu-search,
    .mobile-menu-tabs,
    .mobile-quick-links {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    
    .mobile-section-header {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .ticker-wrapper {
        padding: 0 4px !important;
    }
}

@media (max-width: 320px) {
    /* Ultra-minimal padding for very narrow screens */
    .mobile-menu-header,
    .mobile-menu-search,
    .mobile-menu-tabs,
    .mobile-quick-links,
    .mobile-section-header {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    
    .mobile-menu-link {
        padding-left: 12px !important;
        padding-right: 4px !important;
    }
    
    .ticker-wrapper {
        padding: 0 2px !important;
    }
    
    /* Hide more elements if needed */
    .more-assets {
        display: none;
    }
}

/* Utility Classes */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }

.bg-primary { background-color: var(--color-primary); }
.bg-surface { background-color: var(--color-surface); }
.bg-accent { background-color: var(--color-accent); }

.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.card {
    background: var(--color-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.surface {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}