/* --- 1. FONTS & ROOT VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:ital,opsz,wght@1,9..144,400&display=swap');

:root {
    --bg: #F5F5F0;
    /* Champagne Cream */
    --sidebar-bg: #E8E8E1;
    /* Muted Sand */
    --accent: #3A4D39;
    /* Deep Sage Green */
    --text-main: #2C2C2C;
    --text-muted: #6B7280;
    --white: #FFFFFF;
    --sidebar-width: 280px;
    --sidebar-collapsed: 85px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 2. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.5;
}

.main-wrapper {
    display: flex;
    padding-right: 20px;
    gap: 20px;
    min-height: 100vh;
}

/* --- 3. SIDEBAR (FLOATING EDITORIAL LOOK) --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-radius: 30px;
    position: fixed;
    height: calc(100vh - 40px);
    padding: 40px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: width 0.1s ease;
    z-index: 1000;
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.02);
    top: 20px;
    left: 20px;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    margin-bottom: 50px;
}

.logo-text {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.8rem;
    color: var(--accent);
    transition: opacity 0.3s;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.sidebar-toggle-inner {
    background: var(--accent);
    color: var(--white);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-toggle-inner {
    transform: rotate(180deg);
}

/* --- 4. NAVIGATION & ICON LOGIC --- */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-icon {
    width: 24px;
    height: 24px;
    fill: none;
    /* Outline by default */
    stroke: currentColor;
    stroke-width: 1.8;
    flex-shrink: 0;
    transition: fill 0.3s ease;
}

.nav-link span {
    margin-left: 15px;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* ACTIVE & HOVER STATES (SVG Fill Logic) */
.nav-link:hover,
.nav-link.active {
    background: rgba(58, 77, 57, 0.08);
    color: var(--accent);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    fill: var(--accent);
    /* Inactive hone par outline, active par solid */
}

/* Settings exception: No-Fill */
.nav-link.settings-link:hover .nav-icon,
.nav-link.settings-link.active .nav-icon {
    fill: none !important;
}

/* --- 5. MAIN CONTENT AREA --- */
.main-content {
    flex-grow: 1;
    transition: margin-left 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    margin-left: calc(var(--sidebar-width) + 40px);
    width: calc(100% - var(--sidebar-width) - 40px);
    padding: 0px;
}

.sidebar.collapsed ~ .main-content {
    margin-left: calc(var(--sidebar-collapsed) + 40px);
    width: calc(100% - var(--sidebar-collapsed) - 40px);
}

/* ==========================================
   PUSH-LAYOUT LOGIC (Pinterest Style)
========================================== */
.notif-drawer.open ~ .main-content {
    margin-left: calc(var(--sidebar-width) + 400px);
    width: calc(100% - var(--sidebar-width) - 400px);
}

.sidebar.collapsed ~ .notif-drawer.open ~ .main-content {
    margin-left: calc(var(--sidebar-collapsed) + 400px);
    width: calc(100% - var(--sidebar-collapsed) - 400px);
}

/* Header Section */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 40px;
    gap: 20px;
    /* Search bar aur button ke beech space */
}

.header-title h1 {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 8px;
}

/* Search Bar (Pinterest Inspired) */
.search-bar-wrapper {
    flex: 1;
    /* Ye saari available space le lega */
    display: flex;
    align-items: center;
}

.search-box {
    width: 100%;
    /* Parent wrapper ki poori width */
    background: #eeeeee;
    /* Light Grey background like Pinterest */
    border-radius: 10px;
    /* Pill shape */
    padding: 15px 20px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-box:hover {
    background: #e1e1e1;
}

.search-box:focus-within {
    background: var(--white);
    border-color: var(--accent);
    /* Sage Green border on focus */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #767676;
    margin-right: 12px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 16px;
    color: var(--text-main);
    font-family: inherit;
}

/* --- 6. MASONRY GRID --- */
/* --- 6. TRUE PINTEREST MASONRY GRID --- */
.gallery-container {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.masonry-grid {
    /* Industry standard: Let CSS handle the columns */
    column-width: 210px;
    column-gap: 16px;
    width: 100%;
    transform: translateZ(0);
    column-fill: balance;
    orphans: 1;
    widows: 1;
}

.masonry-item {
    display: inline-block;
    /* Required for columns */
    width: 100%;
    margin-bottom: 16px;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    will-change: transform;
    break-inside: avoid-column;
    /* Hardware acceleration for smooth scrolling */
    transform: translateZ(0);
}

.image-wrapper {
    position: relative;
    border-radius: 16px;
    background: #e2e8f0;
    overflow: hidden;
    display: block;
    animation: colorPulse 1.5s infinite ease-in-out;
    /* Base height to prevent stacking */
}

.image-wrapper img,
.masonry-item img {
    width: 100%;
    height: auto !important;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.3s ease-in-out;
}

.image-wrapper.is-loaded img {
    opacity: 1;
}

.image-wrapper.is-loaded {
    animation: none;
}


@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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


.masonry-item img.loaded {
    opacity: 1;
}

.masonry-item:hover img {
    transform: scale(1.03);
    /* Subtle Pinterest hover zoom */
}

/* Overlay Effects */
.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.masonry-item:hover .item-overlay {
    opacity: 1;
}

.overlay-top {
    display: flex;
    justify-content: flex-end;
    /* Pushes the Save button to the top right */
}

.masonry-item:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Responsive columns */


/* --- PREMIUM BUTTONS --- */
.save-tag {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.save-tag:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.save-tag.saved-active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.save-tag.saved-active:hover {
    background: #000000;
}



/* ==========================================
   SWEET TOAST NOTIFICATION POPUP for saved state (TEXT BASED)
========================================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    /* Niche chhipa hua */
    background-color: #111;
    /* Premium dark theme */
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Smooth bounce effect */
    z-index: 99999;
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    /* Upar aayega */
    opacity: 1;
}

.action-group {
    display: flex;
    gap: 10px;
}

.photo-title {
    font-family: 'Fraunces', serif;
    color: var(--white);
    font-weight: 400;
    margin-top: 5px;
}

.photo-category {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
}

/* --- 7. AUTH MODAL & SPINNER --- */
/* Frosted Glass Background */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    /* Premium Blur */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-card {
    background: #ffffff;
    padding: 45px 35px;
    border-radius: 32px;
    /* Extra rounded like iOS/Pinterest */
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* --- CLOSE BUTTON STYLING --- */
.close-modal-btn {
    position: absolute;
    top: 20px;
    /* Upar se gap */
    right: 20px;
    /* Right se gap */
    background: #f1f5f9;
    /* Halka grey background circle */
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    /* Circle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    /* Icon color */
    transition: all 0.3s ease;
}

.close-modal-btn svg {
    width: 18px;
    height: 18px;
}

.close-modal-btn:hover {
    background: #e2e8f0;
    color: #1a1a1a;
    transform: rotate(90deg);
    /* Modern hover effect */
}

.modal-brand-tag {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #3a4d39;
    /* Sage Green */
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.modal-main-title {
    font-family: 'Fraunces', serif;
    /* Use an editorial font if available */
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.2;
}

.modal-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Button Layout */
.modal-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-register-main {
    background: #3a4d39;
    /* Your Accent Color */
    color: #ffffff;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-register-main:hover {
    background: #2d3b2c;
    transform: scale(1.02);
}

.btn-login-sub {
    background: #f1f5f9;
    color: #334155;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.btn-login-sub:hover {
    background: #e2e8f0;
}



@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.primary-btn {
    background-color: var(--accent);
    /* Aapka Sage Green color */
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    /* Button text wrap na ho */
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(58, 77, 57, 0.2);
    text-decoration: none;
    display: inline-block;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(58, 77, 57, 0.3);
    filter: brightness(1.1);
}

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

/* Dropdown Positioning */
.user-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-dropdown-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    width: 250px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 1000;
    border: 1px solid #f0f0f0;
}

.profile-dropdown-menu.show {
    display: block;
}

/* Dropdown Header Styling */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.avatar-large {
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-weight: bold;
    font-size: 1.2rem;

    line-height: 1;
    box-sizing: border-box;
    flex-shrink: 0;
}

.user-info {
    min-width: 0;
}

.user-info strong {
    display: block;
    font-size: 1rem;
    color: #333;
}

.user-info span {
    font-size: 0.8rem;
    color: #777;

    max-width: 170px;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Links */
.drop-link {
    display: block;
    padding: 10px 0;
    color: #444;
    text-decoration: none;
    font-weight: 500;
}

.drop-link:hover {
    color: #000;
}

.logout-btn-nav {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #e91e63;
    padding: 10px 0;
    cursor: pointer;
    font-weight: 600;
}

/* Upgrade Button */
.upgrade-btn {
    background-color: #D4AF37;
    /* Gold for Premium */
    margin-right: 15px;
    font-size: 0.8rem;
    padding: 8px 18px;
}

/* User Avatar */
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    /* The frosted glass look */
    -webkit-backdrop-filter: blur(8px);
    border: none;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.icon-btn:hover {
    background: #ffffff;
    color: var(--text-main);
    transform: scale(1.1);
    /* Subtle hover lift */
}

/* --- THE HEART ANIMATION --- */
@keyframes heartBounce {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* When the user clicks like, JS will add the 'liked' class */
.icon-btn.like-btn.liked {
    background: #ffffff;
}

.icon-btn.like-btn.liked svg.heart-icon {
    fill: #ff2a5f;
    /* Deep aesthetic red */
    stroke: #ff2a5f;
    animation: heartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================
   LIKE COUNT (RIGHT SIDE)
========================================== */
.like-count {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    /* Image light ho ya dark, ye shadow text ko padhne me madad karegi */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.overlay-center {
    text-align: center;
}

/* The Blinking Skeleton Animation */
@keyframes colorPulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(0.8);
    }

    100% {
        filter: brightness(1);
    }
}

.skeleton-card {
    position: absolute;
    /* Important for masonry layout */
    width: 100%;
    /* Will be set dynamically via JS to match column width */
    height: 300px;
    /* Default placeholder height */
    border-radius: 16px;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1200px 100%;
    animation: shimmer 1.5s infinite linear;
}

/* ==========================================
   DRIBBBLE STYLE TWO-COLUMN LAYOUT
========================================== */
.dribbble-page-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 80px 80px;
    position: relative;
}

.dribbble-nav {
    position: absolute;
    /* 🔴 NAYA: Ab ye card ke bahar hawa me float karega */
    top: 0;
    /* Card ke ekdam top level par */
    left: 20px;
    /* Left edge se 20px ki doori par */
    padding: 0;
    z-index: 50;
}

.dribbble-nav .back-btn {
    background: transparent;
    /* White background aur shadow hata diya */
    color: #111;
    box-shadow: none;
    width: 48px;
    height: 48px;
}

.dribbble-nav .back-btn:hover {
    background: #e2e8f0;
    /* Hover karne par halka grey circle aayega */
}

/* 1. The Main White Card */
.dribbble-main-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    /* Clean, modern shadow */
    padding: 24px;
    display: flex;
    gap: 40px;
    /* Left aur Right column ke beech ka space */
    margin-bottom: 60px;
}

/* ==========================================
   LEFT COLUMN: The Fluid Image Area
========================================== */
.dribbble-left-col {
    flex: 1;
    /* THE GOLDEN RULE: Bachi hui saari jagah le lo (Approx 70%) */
    min-width: 0;
    /* Prevents flexbox bugs */
    display: flex;
    flex-direction: column;
}

/* Image Container */
.dribbble-image-box {
    width: 100%;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 30px;
    background: #FFFFFF;
}

.dribbble-image-box img {
    max-width: 100%;
    max-height: 75vh;
    /* Landscape ho ya Portrait, is height se bahar nahi jayegi */
    object-fit: contain;
    border-radius: 16px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Action Bar (Below Image) */
.dribbble-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.actions-left-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Special Button Styling */
.dribbble-actions-bar .icon-btn {
    background: #f1f5f9;
    color: #333;
    border-radius: 50%;
}


.action-btn-with-text:hover,
.dribbble-actions-bar .icon-btn:hover {
    background: #e2e8f0;
}

.primary-save-btn {
    background: var(--accent);
    /* Pinterest Red / Your Brand Color */
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.primary-save-btn.saved-active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.primary-save-btn.saved-active:hover {
    background: #000000;
}

/* ==========================================
   RIGHT COLUMN: The Fixed Details Area
========================================== */
.dribbble-right-col {
    width: 380px;
    /* THE GOLDEN RULE: Width fix rahegi, kabhi text nahi failega */
    flex-shrink: 0;
    /* Ye chhota nahi hoga */
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.dribbble-title {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    color: #111;
    line-height: 1.2;
    margin-bottom: 16px;
}

.dribbble-desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
}

.dribbble-tags-container {
    margin-bottom: 24px;
}

.dribbble-pill {
    display: inline-block;
    background: #f8eaeb;
    /* Soft red/pink tint */
    color: #d13239;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

.dribbble-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

/* Stats Container (Right Side) */
.dribbble-stats-container {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
}

.stat-item svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   RELATED PHOTOS SECTION
========================================== */
.dribbble-explore-title {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #111;
}

/* ==========================================
   RESPONSIVE: MOBILE & TABLET STACKING
========================================== */
@media (max-width: 1024px) {
    .dribbble-main-card {
        flex-direction: column;
        /* Agal-bagal se Upar-Niche ho jayega */
        gap: 20px;
        padding: 16px;
    }

    .dribbble-right-col {
        width: 100%;
        /* Pura space lega */
        padding-top: 0;
    }

    .dribbble-actions-bar {
        flex-wrap: wrap;
        /* Agar screen choti ho toh buttons wrap ho jayein */
    }

    /* Auto-collapse Sidebar */
    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .sidebar .logo-text,
    .sidebar .nav-link span {
        display: none;
        /* Text hide karo */
    }

    .sidebar .sidebar-toggle-inner {
        transform: rotate(180deg);
    }

    /* Adjust main content margin */
    .main-content {
        margin-left: calc(var(--sidebar-collapsed) + 40px);
        width: calc(100% - var(--sidebar-collapsed) - 40px);
    }
}


@media (max-width: 768px) {

    /* Main Layout Setup */
    .main-wrapper {
        padding-right: 0;
        gap: 0;
        flex-direction: column;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px;
        padding-bottom: 90px;
        /* Bottom Nav ke liye jagah chhodi */
    }

    /* --- THE MAGIC: SIDEBAR TO BOTTOM APP NAV --- */
    .sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        width: 100% !important;
        height: 70px;
        padding: 0 15px;
        border-radius: 24px 24px 0 0;
        /* Upar se round */
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
        /* Premium shadow upar ki taraf */
        flex-direction: row;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    /* Hide Logo, Toggle, and Settings on Bottom Nav */
    .sidebar-header,
    .sidebar-bottom {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        /* Icons ko barabar failao */
        gap: 0;
    }

    .nav-link {
        padding: 12px;
        border-radius: 50%;
    }

    .nav-link.active {
        background: transparent;
    }

    /* Active Icon Pop Effect */
    .nav-link.active .nav-icon {
        transform: scale(1.2);
        filter: drop-shadow(0 4px 6px rgba(58, 77, 57, 0.3));
    }

    /* --- HEADER RE-ARRANGEMENT --- */
    .main-header {
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 25px;
        padding: 10px 0;
    }

    /* Mobile par naya Logo banaya (Kyunki sidebar wala gayab ho gaya) */
    .main-header::before {
        content: "Photopic.";
        font-family: 'Fraunces', serif;
        font-style: italic;
        font-size: 1.8rem;
        color: var(--accent);
        display: block;
    }

    .auth-wrapper {
        margin-left: auto;
        /* Avatar ko right me bhejo */
    }

    /* Chhoti screen par Upgrade button chupao */
    .upgrade-btn {
        display: none;
    }

    /* Search Bar ab puri width lega aur neeche aayega */
    .search-bar-wrapper {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
    }

    .search-box {
        background: #ffffff;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        /* Floating search bar */
        padding: 12px 20px;
    }

    /* Profile Dropdown Fix (Screen se bahar na jaye) */
    .profile-dropdown-menu {
        width: 260px;
        right: -10px;
    }

    /* --- AUTH MODAL FIXES --- */
    .modal-card {
        width: 90%;
        max-width: 360px;
        padding: 35px 25px;
    }

    .modal-main-title {
        font-size: 1.5rem;
    }

    /* 1. Force 2-Column Grid on Mobile */
    .masonry-grid {
        column-count: 2 !important;
        /* Mobile par strictly 2 columns */
        column-width: auto !important;
        column-gap: 12px;
        padding: 0 5px;
    }

    .masonry-item {
        margin-bottom: 12px;
        border-radius: 12px;
        /* Thoda chhota border radius mobile ke liye */
    }

    .image-wrapper {
        border-radius: 12px;
    }

    .dribbble-related-section .masonry-grid {
        padding: 0;
        /* Detail page ke niche ki grid ka gap adjust kiya */
    }

    /* 2. Fix 'No Hover' Issue on Mobile Screens */
    /* Phone par mouse nahi hota, isliye halka sa overlay pehle se dikhayenge */
    .item-overlay {
        display: none !important;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.45) 100%);
        padding: 10px;
        /* Padding kam ki taki image zyada dikhe */
    }

    /* 3. Scale down buttons for 2-column mobile view */
    .save-tag {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .action-group {
        gap: 6px;
        /* Buttons ke beech ka space kam kiya */
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.35);
        /* Thoda zyada visible banaya */
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .like-count {
        font-size: 13px;
    }

    /* Page Titles */
    .content-header h1,
    div>h1[style*="1.8rem"] {
        /* Inline styles ko override karne ke liye */
        font-size: 1.4rem !important;
        margin-bottom: 10px !important;
    }

    .content-header p,
    div>p[style*="1rem"] {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }

    /* Empty States Adjustment */
    .empty-state {
        padding: 50px 15px !important;
        /* 100px se 50px kar diya */
    }

    .empty-state i {
        font-size: 3rem !important;
        /* Icon chhota kiya */
    }

    .empty-state h2 {
        font-size: 1.3rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    /* ==========================================
   DETAIL PAGE (PHOTO SHOW) MOBILE FIXES
   (Add this inside your existing @media (max-width: 768px) block)
========================================== */

    /* 1. Page Wrapper & Back Button */
    .dribbble-page-wrapper {
        padding: 0 0 80px 0 !important;
        /* Side padding hata di taki card edge-to-edge ho */
    }

    .dribbble-nav {
        top: 15px;
        left: 15px;
    }

    .dribbble-nav .back-btn {
        background: rgba(255, 255, 255, 0.85);
        /* Image ke upar dikhne ke liye frosted background */
        backdrop-filter: blur(5px);
        width: 40px;
        height: 40px;
    }

    /* 2. Main Card - Edge to Edge on Mobile */
    .dribbble-main-card {
        border-radius: 0;
        /* Mobile par rounded corners ajeeb lagte hain badi image ke sath */
        padding: 20px;
        box-shadow: none;
        /* Shadow hata kar clean look diya */
        border-bottom: 1px solid #e2e8f0;
        /* Neeche ek subtle line */
        margin-bottom: 30px;
        gap: 20px;
    }

    /* 3. Image Box Padding Remove */
    .dribbble-image-box {
        padding: 0;
        /* Desktop ka 30px padding hataya taki image badi dikhe */
        border-radius: 12px;
        background: transparent;
    }

    .dribbble-image-box img {
        max-height: 60vh;
        /* Mobile par image thodi choti ki taki buttons bhi screen par dikhein */
        border-radius: 12px;
        box-shadow: none;
    }

    /* 4. Text & Titles Scaling */
    .dribbble-title {
        font-size: 1.6rem;
        /* Title thoda chhota kiya */
        margin-bottom: 12px;
    }

    .dribbble-desc {
        font-size: 0.95rem;
    }

    /* 5. Action Buttons Styling for Mobile */
    .dribbble-actions-bar {
        padding: 15px 0 5px 0;
    }

    /* Share aur Download buttons thode compact */
    .action-btn-with-text {
        padding: 8px 16px;
        font-size: 14px;
    }

    .action-btn-with-text svg {
        width: 16px;
        height: 16px;
    }

    .primary-save-btn {
        padding: 10px 24px;
        font-size: 15px;
    }

    /* 6. Stats Container Wrap */
    .dribbble-stats-container {
        flex-wrap: wrap;
        /* Agar 3-4 stats hon toh next line me chale jayein */
        gap: 15px;
    }

    /* 7. Similar Photos Section Alignment */
    .dribbble-explore-title {
        font-size: 1.5rem;
        padding-left: 20px;
        /* Mobile layout ke gap ke hisaab se align kiya */
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1 !important;
    }

    .main-header::before {
        font-size: 1.5rem;
    }

    .header-title h1 {
        font-size: 2rem;
    }

    .dribbble-title {
        font-size: 1.4rem;
    }
}

/* ==========================================
   CATEGORY SYSTEM STYLES (Dribbble/Pinterest Style)
========================================== */

/* --- 1. CATEGORY LISTING PAGE --- */
.category-page-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 80px 0px;
}

.category-header {
    margin-bottom: 40px;
}

.fraunces-title {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 8px;
}

.dm-sans-subtitle {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-muted);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Trending Section */
.trending-section {
    margin-bottom: 50px;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.trending-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.trending-pill {
    background: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.trending-pill:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(58, 77, 57, 0.1);
}

.pill-count {
    color: var(--accent);
    font-size: 0.8rem;
    background: rgba(58, 77, 57, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Category Cards Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--white);
    height: 400px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.category-card .card-link {
    text-decoration: none;
    height: 100%;
    display: block;
    position: relative;
}

.card-image-box {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.category-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 3;
    color: var(--white);
    transition: transform 0.4s ease;
}

.category-name {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.photo-count-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.category-desc {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    line-height: 1.5;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.category-card:hover .category-thumbnail {
    transform: scale(1.1);
}

.category-card:hover .category-desc {
    opacity: 1;
    transform: translateY(0);
}

.category-card:hover .card-content {
    transform: translateY(-10px);
}

/* --- 2. INDIVIDUAL CATEGORY PAGE (SHOW) --- */
.category-show-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px 80px 0px;
}

.breadcrumbs {
    margin-bottom: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .separator {
    margin: 0 10px;
}

.breadcrumbs .current {
    color: var(--accent);
    font-weight: 600;
}

.category-show-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.header-main {
    max-width: 600px;
}

.header-stats .total-count {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sorting-toolbar {
    margin-bottom: 40px;
    background: var(--white);
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-pill {
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.sort-pill:hover {
    background: rgba(58, 77, 57, 0.05);
    color: var(--accent);
}

.sort-pill.active {
    background: var(--accent);
    color: var(--white);
}

.pagination-footer {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn {
    background: var(--white);
    color: var(--text-main);
    border: 2px solid var(--accent);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.05);
}

/* ==========================================
   RESPONSIVE OVERRIDES
========================================== */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .fraunces-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {

    .category-page-wrapper,
    .category-show-wrapper {
        padding: 10px 15px 80px 15px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-show-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .sorting-toolbar {
        overflow-x: auto;
        padding: 10px;
    }

    .sort-options {
        white-space: nowrap;
    }

    .fraunces-title {
        font-size: 2rem;
    }
}

/* ==========================================
   NOTIFICATION DRAWER (Pinterest Style)
========================================== */
.notif-drawer {
    position: fixed;
    top: 20px;
    /* Sidebar ke just bagal me start hoga */
    left: calc(var(--sidebar-width) + 20px);
    width: 360px;
    height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.08);
    z-index: 9900;
    /* Keeps it on top of everything */
    display: flex;
    flex-direction: column;

    /* Animation setup */
    transform: translateX(-120%);
    /* Chhupa hua */
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.notif-drawer.open {
    transform: translateX(0);
    /* Bahar aayega */
    opacity: 1;
    pointer-events: auto;
}

/* Agar sidebar collapsed hai, toh drawer left me khiskega */
.sidebar.collapsed~.notif-drawer {
    left: calc(var(--sidebar-collapsed) + 20px);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px 10px 20px;
}

.notif-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.notif-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
}

.notif-close-btn:hover {
    background: #f1f5f9;
}

.notif-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Notification Items Styling */
.notif-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    background: #eef2f6;
    /* Pinterest jaisa light grey shade */
}

.notif-item.unread:hover {
    background: #e2e8f0;
}

.notif-thumb img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.notif-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-icon-circle svg {
    width: 24px;
    height: 24px;
    color: #111;
}

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

.notif-content p {
    font-size: 0.95rem;
    color: #111;
    line-height: 1.4;
    margin: 0;
}

.notif-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 40px;
}

.notif-time {
    font-size: 0.8rem;
    color: #64748b;
}

.notif-options {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

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

.scrollbar-custom::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .notif-drawer {
        top: 0;
        left: 0 !important;
        width: 100%;
        height: calc(100vh - 70px);
        /* Bottom nav ke upar tak */
        border-radius: 0;
        transform: translateY(120%);
        /* Niche se aayega mobile par */
        z-index: 10000;
    }

    .notif-drawer.open {
        transform: translateY(0);
    }
}