/* Same CSS as before, no changes needed */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Stock card styles */
.stock-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.stock-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stock-card.positive {
    border-left: 4px solid #10b981;
}

.stock-card.negative {
    border-left: 4px solid #ef4444;
}

.stock-card.neutral {
    border-left: 4px solid #6b7280;
}

/* Price change indicators */
.price-up {
    color: #10b981;
}

.price-down {
    color: #ef4444;
}

.price-unchanged {
    color: #6b7280;
}

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* Chart container */
.chart-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
}

/* Loading states */
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Enhanced Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #7c73e6;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #7c73e6;
    border-radius: 1px;
}

/* Mobile Menu Styles */
#mobileMenu {
    animation: slideDown 0.2s ease-out;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
    text-decoration: none;
}

.mobile-menu-item:hover {
    background: #7c73e6;
    color: white;
    transform: translateX(4px);
}

/* Text overflow fixes */
.stock-card .company-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}

.stock-card .price-container {
    min-width: 0;
}

.stock-card .price-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

/* Slider styles */
.slider {
    background: linear-gradient(to right, #3b82f6, #10b981);
    height: 6px;
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Status messages */
.status-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.status-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.status-info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/* Mobile optimizations */
@media (max-width: 1024px) {
    .lg\\:flex {
        display: none !important;
    }
    
    .lg\\:hidden {
        display: block !important;
    }
    
    #settingsBtn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #mobileMenu {
        right: 0.5rem;
        width: 220px;
    }
    
    .stock-card {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .stock-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 300px !important;
    }

    #notificationPanel {
        right: 1rem;
        left: 1rem;
        max-width: none;
        width: auto;
    }
    
    #mobileMenu {
        width: 200px;
        font-size: 0.8rem;
    }
    
    .mobile-menu-item {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .stock-card h3 {
        font-size: 1.1rem;
        word-break: break-word;
    }
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #7c73e6;
    outline-offset: 2px;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #7c73e6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Chart responsive fixes */
.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* Grid responsive improvements */
@media (max-width: 480px) {
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .stock-card {
        margin: 0.5rem 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Footer link hover effects */
footer a:hover {
    color: #7c73e6;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* Settings button hover */
#settingsBtn:hover {
    color: #7c73e6;
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

/* Mobile menu divider styling */
#mobileMenu .border-t {
    border-color: rgba(0, 0, 0, 0.1) !important;
    margin: 4px 0;
}

/* Ensure proper z-index layering */
nav {
    z-index: 1000;
}

#mobileMenu {
    z-index: 1001;
}

/* Very small devices */
@media (max-width: 480px) {
    #mobileMenu {
        width: 180px;
        right: 0.5rem;
    }
    
    .mobile-menu-item {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
}

/* Mobile menu scroll for many items */
#mobileMenu {
    max-height: 70vh;
    overflow-y: auto;
}

/* Custom scrollbar for mobile menu */
#mobileMenu::-webkit-scrollbar {
    width: 4px;
}

#mobileMenu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

#mobileMenu::-webkit-scrollbar-thumb {
    background: #7c73e6;
    border-radius: 2px;
}

#mobileMenu::-webkit-scrollbar-thumb:hover {
    background: #6b63d6;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    border-color: #7c73e6;
    box-shadow: 0 10px 25px -5px rgba(124, 115, 230, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
}