body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 100%;
}

/* Container should stretch full width */
.container {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}


/* Sidebar */
.sidebar {
    flex: 1;
    padding: 20px;
    position: relative;  /* ensures it scrolls with the page */
}

/* Sidebar boxes */
.sidebar .box {
    background: #f4f4f4;
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;   /* ensures no fixed/sticky lock */
}

/* Live Crypto Prices Widget - Override any fixed positioning */
.sidebar-prices {
    position: static !important;    /* Override any fixed/absolute positioning */
    top: auto !important;           /* Reset top positioning */
    left: auto !important;          /* Reset left positioning */
    right: auto !important;         /* Reset right positioning */
    transform: none !important;     /* Reset any transforms */
    z-index: auto !important;       /* Reset z-index */
}

/* Force parent containers to use normal flow */
div[class*="w-full"] {
    position: static !important;
    overflow: visible !important;
}


.crypto-menu {
    background: linear-gradient(135deg, blue 0%, #b50525 25%, #0e2fb1 50%, #9945ff 75%, #f3ba2f 100%);
    padding: 1rem;
 /*   position: relative !important; */
    position: static;
    top: 0;
    z-index: 1000;
}

.menu-item {
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.crypto-icon {
    font-size: 1.2em;
    margin-right: 0.5em;
}

.search-container {
    background: white;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.price-ticker {
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a);
    color: white;
    padding: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.price-scroll {
    display: inline-block;
    animation: scroll 30s linear infinite;

    position: sticky;
    top: 0;
    z-index: 1000;
    
}

@keyframes scroll {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.featured-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.crypto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sidebar-prices {
    position: sticky;
    top: 2rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.price-positive { color: #10b981; }
.price-negative { color: #ef4444; }

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f5f9;
}

/* MOBILE RESPONSIVE STYLES - FIXED VERSION */
@media (max-width: 768px) {
    
    /* Show hamburger menu */
    .hamburger {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 10001;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
    }
    
    /* Hide menu items by default on mobile */
    #menu-items {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 10000;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 5rem;
        overflow-y: auto;
    }
    
    /* Show menu when active */
    #menu-items.menu-active {
        display: flex !important;
    }
    
    /* Stack menu items vertically */
    #menu-items > div:first-child {
        flex-direction: column;
        gap: 1rem;
        width: 90%;
        max-width: 300px;
    }
    
    /* Style menu items for mobile */
    .menu-item {
        display: block;
        text-align: center;
        width: 100%;
        padding: 1rem !important;
        margin: 0.5rem 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
    }
    
    .menu-item:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
    
    /* Dropdown styles for mobile */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static !important;
        display: block !important;
        background: rgba(255, 255, 255, 0.1) !important;
        box-shadow: none !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
        width: 100% !important;
        min-width: auto !important;
    }
    
    .dropdown-content a {
        color: white !important;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .dropdown-content a:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Search container for mobile */
    .search-container {
        width: 90% !important;
        max-width: 300px !important;
        margin-top: 2rem;
        background: rgba(255, 255, 255, 0.9);
    }
    
    /* Brand section adjustments */
    .brand-section {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 10001;
        max-width: calc(100% - 8rem);
    }
    
    .brand-section .navbar-logo {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }
    
    /* Hide/show text based on screen size */
    .brand-section span {
        font-size: 0.875rem !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Main crypto menu container adjustments */
    .crypto-menu {
        position: relative;
        padding: 0;
        background: transparent;
    }
    
    .crypto-menu .container {
        position: relative;
    }
    
    /* Hide the main menu container content on mobile except hamburger */
    .crypto-menu .flex.items-center.justify-between {
        position: relative;
        height: 4rem;
        background: linear-gradient(135deg, blue 0%, #b50525 25%, #0e2fb1 50%, #9945ff 75%, #f3ba2f 100%);
        border-radius: 0 0 1rem 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hamburger {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.25rem;
        padding: 0.25rem 0.5rem;
    }
    
    .brand-section {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .brand-section span {
        font-size: 0.75rem !important;
    }
    
    #menu-items {
        padding-top: 4rem;
    }
    
    .menu-item {
        padding: 0.75rem !important;
        font-size: 0.875rem;
    }
}
/* MOBILE ENDED */

.price-item {
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 0;
}

.price-item:hover {
    background-color: #f8fafc !important;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-positive {
    color: #10b981 !important;
    font-weight: 600;
}

.price-negative {
    color: #ef4444 !important;
    font-weight: 600;
}

#chartContainer {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#chartTitle {
    color: #1f2937;
    font-size: 14px;
}

.trending-item {
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.trending-item:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Loading spinner */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1f2937;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 14px;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

 
        /* Floating Button Styles */
        #goToTopBtn, #goToBottomBtn {
            position: fixed;
            right: 30px;
            width: 60px;
            height: 60px;
            border: none;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            cursor: pointer;
            font-size: 16px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: scale(0.8);
        }

        #goToTopBtn {
            top: 45%;
            transform: translateY(-50%) scale(0.8);
        }

        #goToBottomBtn {
            top: 55%;
            transform: translateY(-50%) scale(0.8);
        }

        /* Show class to make buttons visible */
        #goToTopBtn.show, #goToBottomBtn.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) scale(1);
        }

        /* Hover effects */
        #goToTopBtn:hover, #goToBottomBtn:hover {
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

        /* Active state */
        #goToTopBtn:active, #goToBottomBtn:active {
            transform: translateY(-50%) scale(0.95);
        }

        /* Responsive design */
        @media (max-width: 768px) {
            #goToTopBtn, #goToBottomBtn {
                width: 50px;
                height: 50px;
                right: 20px;
                font-size: 14px;
            }
            
            #goToTopBtn {
                top: 43%;
                transform: translateY(-50%) scale(0.8);
            }
            
            #goToBottomBtn {
                top: 57%;
                transform: translateY(-50%) scale(0.8);
            }
        }

    
/* PRICE STICKER */
.price-ticker {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-bottom: 2px solid #3b82f6;
}

.price-scroll {
    display: inline-block;
    animation: scroll 60s linear infinite;
    font-size: 14px;
    font-weight: 500;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.price-positive { color: #10b981; }
.price-negative { color: #ef4444; }