@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
strong,
i,
ol,
ul,
li,
form,
label,
footer,
header,
menu,
nav,
section {
    margin: 0;
    padding: 0;
}

ol,
ul {
    list-style: none;
}

a {
    text-decoration: none;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

:root {
    --primary--black: #000;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #272727;
    color: white;
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    gap: 32px;
    height: 100vh;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    background-color: #272727;
}

/* Fixed Sidebar Styles */
.sidebar {
    position: relative;
    width: 350px;
    /* Fixed width for desktop */
    flex-shrink: 0;
    /* Prevent sidebar from shrinking */
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    z-index: 50;
}

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

.sidebar-content {
    height: 100%;
    padding: 24px 32px;
    background: #151515;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 48px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    position: relative;
    /* Changed from fixed to relative */
    width: 100%;
    /* Take full width of sidebar container */
    overflow-y: auto;
}

body {
    background: #020817;
    font-family: "Space Grotesk", sans-serif;
}

/* Mobile sidebar toggle */
.sidebar-mobile {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar-mobile.open {
    transform: translateX(0);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #0f172a;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animation for stats cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Chart container improvements */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Crypto card hover effects */
.crypto-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crypto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Mobile sidebar styles */
@media (max-width: 1279px) {
    .sidebar {
        width: auto;
        /* Reset width for mobile */
    }

    .sidebar-content {
        position: fixed;
        left: -100%;
        top: 20px;
        bottom: 20px;
        width: 320px;
        z-index: 220;
        transition: left 0.3s ease-in-out;
    }

    .sidebar-content.active {
        left: 20px;
    }
}

.sidebar-logo {
    display: block;
    text-decoration: none;
}

.logo-image {
    width: 100%;
    max-width: 310px;
    height: auto;
    object-fit: cover;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    color: white;
    text-decoration: none;
    border: none;
    background: none;
    font-family: inherit;
}

.nav-item:hover {
    color: #C7541A;
    background: rgba(199, 84, 26, 0.1);
}

.nav-item.active {
    color: #C7541A;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.bottom-links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    text-align: left;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    background: #151515;
    color: white;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    min-width: 0;
    /* Allow main content to shrink */
}

/* Common Navbar Styles */
.common-navbar {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
    padding: 24px 30px 0 30px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.title-text {
    color: white;
    font-size: 30px;
    font-weight: bold;
}

/* Search Area */
.search-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    max-width: 793px;
    width: 100%;
    border-radius: 50px;
    background: #272727;
}

.search-icon {
    color: #616161;
}

.search-input {
    background: transparent;
    outline: none;
    border: none;
    width: 100%;
    color: white;
    font-size: 16px;
}

.search-input::placeholder {
    color: #616161;
}

/* Navbar Right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.create-btn {
    width: 205px;
    height: 60px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    background: linear-gradient(135deg, #C7541A, #961E19);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
}

.create-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(199, 84, 26, 0.3);
}

.notification-icon {
    width: 60px;
    height: 60px;
    border: 1px solid #C7541A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
}

.notification-icon i {
    color: #C7541A;
    font-size: 24px;
}

.avatar-card {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #C7541A;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow: auto;
}

.content-section {
    background: #272727;
    border-radius: 16px;
    padding: 30px;
    min-height: 400px;
}

/* Custom Scrollbar */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: #272727;
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb {
    background: #C7541A;
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #961E19;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #272727;
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #C7541A;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 1279px) {
    .hamburger-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        padding: 10px;
        gap: 16px;
    }

    .common-navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px 16px 0 16px;
    }

    .search-area {
        order: 3;
        width: 100%;
    }

    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .create-btn {
        width: 140px;
        height: 50px;
    }

    .sidebar-content {
        width: calc(100vw - 40px);
        max-width: 320px;
    }

    .content-area {
        padding: 16px;
    }

    .content-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title-text {
        font-size: 24px;
    }

    .create-btn {
        width: 120px;
        height: 45px;
        font-size: 14px;
    }

    .notification-icon,
    .avatar-card {
        width: 45px;
        height: 45px;
    }

    .sidebar-content {
        padding: 20px 16px;
    }
}


.dashboard-container {
    display: flex;
    gap: 20px;
    padding: 20px 40px;
}

/* Main Content Section (75%) */
.main-content-section {
    flex: 0 0 75%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tab {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid white;
    color: white;
    background: transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.tab.active {
    background: linear-gradient(135deg, #C7541A, #961E19);
    color: white;
    border-color: transparent;
}

.tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Content Display */
.content-display {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Sections */
.section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    gap: 20px;
}

.recents-grid,
.audio-book-grid {
    grid-template-columns: repeat(3, 1fr);
}

.live-audio-grid {
    grid-template-columns: repeat(4, 1fr);
}

.live-audio-only-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Card Styles */
.recent-card,
.live-stream-card,
.suggestion-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.recent-card:hover,
.live-stream-card:hover,
.suggestion-card:hover {
    transform: scale(1.05);
}

.recent-card {
    height: 175px;
}

.live-stream-card {
    height: 220px;
}

.suggestion-card {
    height: 200px;
    border-radius: 24px;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-card:hover .card-image,
.live-stream-card:hover .card-image,
.suggestion-card:hover .card-image {
    transform: scale(1.05);
}

/* Recent Card Content */
.recent-card-content {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recent-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border: 1px solid #C7541A;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.user-username {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.live-badge {
    background: #DC2626;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 15px;
    color: white;
    font-weight: 500;
}

.read-book-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #C7541A;
    padding: 10px;
    border-radius: 50px;
    color: white;
    font-size: 14px;
}

/* Live Stream Card Content */
.live-stream-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
}

.live-stream-card:hover .live-stream-overlay {
    opacity: 1;
}

.streamer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.small-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.streamer-name {
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.view-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
}

.view-count i {
    color: #C7541A;
}

/* Suggestions Sidebar (25%) */
.suggestions-sidebar {
    flex: 0 0 25%;
}

.suggestions-container {
    border: 1px solid rgba(145, 158, 171, 0.32);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Suggestion Card */
.suggestion-content {
    position: relative;
    height: 100%;
}

.suggestion-header {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.follow-btn {
    padding: 8px 28px;
    border: 1px solid white;
    border-radius: 30px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.follow-btn:hover {
    background: white;
    color: black;
}

.suggestion-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(39, 39, 39, 0.69);
    padding: 20px;
}

.suggestion-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.suggestion-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: -40px;
}

.suggestion-user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -20px;
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    text-align: center;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-container {
        flex-direction: column;
    }

    .main-content-section,
    .suggestions-sidebar {
        flex: 0 0 100%;
    }

    .recents-grid,
    .audio-book-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .live-audio-grid,
    .live-audio-only-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .recents-grid,
    .audio-book-grid,
    .live-audio-grid,
    .live-audio-only-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        justify-content: center;
    }

    .tab {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}
