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

/* Header Bar */
.header-bar {
    background: white;
    border-bottom: 1px solid #e5e5e7;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
}

/* Watchlist Toggle Button */
.watchlist-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.watchlist-toggle-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

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

.watchlist-text {
    font-weight: 600;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    cursor: pointer;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
    border-left: 1px solid #e5e5e7;
}

.stock-ticker-large {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.stock-name-large {
    font-size: 13px;
    color: #6e6e73;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f5f5f7;
}

.nav-link.active {
    background: #667eea;
    color: white;
}

/* NEW: Search and Filter Section */
.search-filter-section {
    background: white;
    border-bottom: 1px solid #e5e5e7;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input::placeholder {
    color: #86868b;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-buttons .filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e5e7;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-buttons .filter-btn:hover {
    border-color: #667eea;
    background: #f5f5f7;
}

.filter-buttons .filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Original Filter Section (Market, Watchlist, etc.) */
.filter-section {
    background: white;
    border-bottom: 2px solid #e5e5e7;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.filter-section::-webkit-scrollbar {
    height: 6px;
}

.filter-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filter-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.filter-section .filter-btn {
    padding: 8px 12px;
    border: 1px solid #e5e5e7;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.filter-section .filter-btn:hover {
    background: #f5f5f7;
}

.filter-section .filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.dropdown-icon {
    font-size: 11px;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-center {
        display: none;
    }
    
    .header-left {
        flex: 2;
    }
    
    .header-right {
        flex: 0;
    }
    
    .watchlist-toggle-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .search-filter-section {
        padding: 12px 16px;
    }
    
    .filter-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    
    .filter-buttons::-webkit-scrollbar {
        height: 4px;
    }
    
    .filter-buttons::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .filter-buttons::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }
}

@media (max-width: 768px) {
    .header-bar {
        padding: 10px 16px;
    }
    
    .header-left {
        gap: 16px;
    }
    
    .watchlist-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .watchlist-text {
        display: none; /* Hide text on very small screens, show only icon */
    }
    
    .logo {
        font-size: 18px;
    }
    
    .stock-ticker-large {
        font-size: 16px;
    }
    
    .stock-name-large {
        font-size: 12px;
    }
    
    .filter-section {
        padding: 10px 16px;
    }
    
    .filter-buttons .filter-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}
