/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at center, #1C2526 0%, #0D1117 100%);
    color: #F7FAFC;
    margin: 0;
    overflow-x: hidden;
}

i {
    width: 20px;
}

.text-sm {
    margin-bottom: 0.1rem;
    font-size: 13px;
}

a {
    text-decoration: none;
}

.active {
    border-bottom: solid 2px #f3ba2f;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 256px;
    height: 100%;
    background: linear-gradient(180deg, #151923 0%, #0B0E14 100%);
    color: #F7FAFC;
    transition: transform 0.3s ease-in-out;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto; /* Allow scrolling if content overflows */
}

/* Custom Scrollbar for WebKit browsers (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar {
    width: 8px; /* Slim scrollbar */
}

.sidebar::-webkit-scrollbar-track {
    background: #151923; /* Dark track matching sidebar gradient */
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #F3BA2F; /* Yellow thumb matching theme */
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #DAA520; /* Slightly darker yellow on hover */
}

/* Custom Scrollbar for Firefox */
.sidebar {
    scrollbar-width: thin; /* Slim scrollbar */
    scrollbar-color:#1c2526 #151923; /* Thumb and track colors */
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar:not(.hidden) {
        transform: translateX(0);
        display: block;
    }
}

@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
        display: block;
    }
}

.sidebar.hidden {
    transform: translateX(-100%);
    display: none;
}

.sidebar-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Ensure content takes full height */
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F3BA2F;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    flex-grow: 1; /* Push social links to bottom */
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #F7FAFC;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-link:hover {
    background-color: #F3BA2F;
    color: #0D1117;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

/* Sidebar Social Links */
.sidebar-social {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(243, 186, 47, 0.2);
    padding-top: 1rem;
    padding-bottom: 1rem; /* Add padding to ensure visibility */
}

.sidebar-social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #A0AEC0;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-social-link:hover {
    background-color: #F3BA2F;
    color: #0D1117;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

.sidebar-social-link i {
    width: 16px;
    font-size: 0.9rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.sidebar-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.sidebar-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .sidebar-overlay {
        display: none;
    }
}

/* Main content */
.main-content {
    margin-left: 0;
    padding: 1.5rem;
    transition: margin-left 0.3s ease-in-out;
}

@media (min-width: 769px) {
    .main-content {
        margin-left: 256px;
    }
}

/* Header */
.header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #F3BA2F;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle {
    background-color: #F3BA2F;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    color: #0D1117;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #DAA520;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Top Section */
.top-section {
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .top-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

.top-section-left, .top-section-right {
    min-height: 16rem;
    display: flex;
    flex-direction: column;
}

.bg-section {
    background: linear-gradient(180deg, #1C2526 0%, #151923 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: #0D1117;
    background-color: #F3BA2F;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: fit-content;
}

.btn-primary:hover {
    background-color: #DAA520;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

.btn-primary:disabled {
    background-color: #4B5563;
    cursor: not-allowed;
    box-shadow: none;
}

/* Slider */
.top-section-right {
    position: relative;
    overflow: hidden;
}

#slider {
    display: flex;
    width: 100%;
    /*height: 16rem;*/
    transition: transform 0.5s ease-in-out;
}

#slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #151923 0%, #0B0E14 100%);
    color: #F7FAFC;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.slider-btn.left-0 {
    left: 0.5rem;
}

.slider-btn.right-0 {
    right: 0.5rem;
}

.slider-btn:hover {
    background-color: #F3BA2F;
    color: #0D1117;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

/* Token Grid */
#tokenGrid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    #tokenGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #tokenGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.token-card {
    background: linear-gradient(180deg, #1C2526 0%, #151923 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.token-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.token-card img {
    max-height: 128px;
    max-width: 128px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-right: 1rem;
}

.token-card .flex-1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 640px) {
    .token-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .token-card img {
        margin-bottom: 1rem;
        margin-right: 0;
        max-width: 100%;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

#prevPage, #nextPage {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: #0D1117;
    background-color: #F3BA2F;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#prevPage:hover, #nextPage:hover {
    background-color: #DAA520;
    box-shadow: 0 0 10px rgba(243, 186, 47, 0.5);
}

#prevPage:disabled, #nextPage:disabled {
    background-color: #4B5563;
    cursor: not-allowed;
    box-shadow: none;
}

/* Utilities */
.text-bnb-yellow {
    color: #F3BA2F;
}

.text-gray-400 {
    color: #A0AEC0;
}

.error {
    color: #E53E3E;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}