:root {
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary-color: #f43f5e;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --border: #e5e7eb;
    --radius-lg: 1rem;
        --bg-color: #ffffff;
        --text-color: #333333;
        --card-bg: #f8f9fa;
        --border-color: #e0e0e0;
        --primary-color: #4e73df;
        --hover-color: #f1f1f1;
}

body {
 
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-dark) !important;
    background-color: #ffffff !important;
}
.logout_btn{
    font-size: 10px !important;
}
.transition-all {
    overflow-x: unset;       /* ya visible */
    white-space: normal;
    transition: all 0.3s ease-in-out;
}

.active-tab {
    background-color: white !important;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--radius-lg) !important;
}

.active-category {
    background-color: var(--primary-color) !important;
    color: white !important ;
    font-weight: 600 !important;
}

.mobile-search {
    font-size: 14px !important;
}

.template-card {
    min-height: 150px !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
    background-color: #fff !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.template-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
}

.template-card.hidden {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}

.category-container {
    padding-top: 10px !important;
    height: 50px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    overflow-x: auto !important;
    /* padding: 1rem 1rem 1.5rem; */
    
}
.category-container button{
    /*padding: 15px 20px;*/
    height: 30px !important;
}

.category-container::-webkit-scrollbar {
    height: 0 !important;
}
.category-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 8px;
    color: #1f2937;
}


@media (max-width: 768px) {
 .category-container {
     padding-top: 0px !important;
     
 }
}

#mainContent {
    transition: margin-left 0.3s ease;
    /*padding: 1.5rem;*/
    background-color: var(--bg-light);
    min-height: 100vh;
    margin-left: 40px !important;
}


/* ===== SIDEBAR FIXES ===== */
#mainSidebar {
    width: 40px !important;
    height: 100vh !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    background-color: #fff !important;
    border-right: 1px solid var(--border) !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.sidebar-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    font-size: 1rem !important;
    color: var(--text-light) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border: none !important;
    background: none !important;
    width: 100% !important;
}

.sidebar-btn:hover,
.sidebar-btn.active {
    color: var(--primary-color) !important;
    background-color: var(--bg-gray) !important;
}

/* ===== SUBMENU FIXES ===== */
#submenu-container {
    position: fixed !important;
    left: 40px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 250px !important;
    background-color: white !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    transition: transform 0.3s ease !important;
}

#submenu-container.hidden {
    transform: translateX(-100%) !important;
}

.submenu-panel {
    padding: 1rem !important;
    height: 100% !important;
    overflow-y: auto !important;
}

.submenu-panel.hidden {
    display: none !important;
}

/* Close button in submenu */
.submenu-panel button[onclick="closeSubMenu()"] {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-light) !important;
}

.submenu-panel button[onclick="closeSubMenu()"]:hover {
    color: var(--text-dark) !important;
}


.searchmenu{
    display: flex !important;
    justify-content: center !important;
}


.search-input {
    --radius: 0.75rem;
    --border-color: rgba(0, 0, 0, 0.1);
    --focus-color: rgba(124, 58, 237, 0.3);
    padding: 0.3rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background-color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.5rem;
    color: #333;
    width: 50%;
    transition: all 0.25s ease;
   
}

/* Hover effect */
.search-input:hover {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Focus effect */
.search-input:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 4px var(--focus-color);
    background-color: #fafafa;
}

/* Placeholder styling */
.search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-style: italic;
}


.category-btn {
     /*padding: 2px 20px !important; */
    background-color: white ;
    border-radius: 0.75rem;
    /*border: 1px solid var(--border);*/
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    color: black;
    
}

.category-btn:hover {
    transform: translateY(-3px);
    /*background-color: var(--primary-light);*/
    color: rgb(0, 0, 0);
}
.temp-cat {
    
}

.template-img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.template-img:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}
 .template-img{
        height: 130px !important;
    }
  .cardname{
        font-size: 10px !important;
    }
/* Empty state styling */
/*.empty-state {*/
/*    background-color: var(--bg-gray) !important;*/
/*    border-radius: var(--radius-lg) !important;*/
/*    padding: 3rem 2rem !important;*/
/*    text-align: center !important;*/
/*    font-weight: 500 !important;*/
/*    color: var(--text-light) !important;*/
/*    box-shadow: inset 0 0 15px rgba(0,0,0,0.05) !important;*/
/*    font-size: 1rem !important;*/
/*}*/

/*.empty-state-icon {*/
/*    font-size: 3.5rem !important;*/
/*    color: var(--text-light) !important;*/
/*    margin-bottom: 1.5rem !important;*/
/*    opacity: 0.8 !important;*/
/*}*/

/* Template box wrapper */
.templatebox {
    /*background-color: #75420e !important;*/
    position: relative !important;
    top: 10px !important;
    padding: 0.5rem !important;
    border-radius: var(--radius-lg) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
      --radius-lg: 12px;
    --transition-speed: 0.4s;
    
    /* Subtle gradient that doesn't overwhelm */
    background: linear-gradient(
        270deg,
        #ff7b7b,  /* softer red */
        #f9c449,  /* softer orange */
        #5fb4ff,  /* softer blue */
        #4df18f   /* softer green */
    );
    background-size: 300% 300%;
    animation: gradientFlow 20s ease infinite;
}

.templatebox:hover {
    /*transform: translateY(-5px) !important;*/
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Clean, elegant gradient header */
.gradient-header {
    --radius-lg: 12px;
    --transition-speed: 0.4s;
    
    
    /* Subtle gradient that doesn't overwhelm */
    background: linear-gradient(
        270deg,
        #ff7b7b,  /* softer red */
        #f9c449,  /* softer orange */
        #5fb4ff,  /* softer blue */
        #4df18f   /* softer green */
    );
    background-size: 300% 300%;
    animation: gradientFlow 20s ease infinite;
    
    /* Text styling */
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;

    /* Layout */
    padding: 10px 2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    
    /* Subtle shadow that doesn't look dated */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    
    /* Smooth transitions for interactions */
    transition: 
        transform var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease;
}

/* Slower, more elegant gradient animation */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle interaction effects */
.gradient-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gradient-header:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

    .mobile {
        font-size: 24px !important;
        text-align: center !important;
    }
  .mobile2 {
         /*margin-top: -10px !important;*/
        font-size: 16px !important;
        text-align: center !important;
    }
/* 🌐 Responsive Design */
@media (max-width: 768px) {
    
/* Clean, elegant gradient header */
.gradient-header {
    padding: 10px !important;
}

    .nav-button-main {
        padding-left: 0px !important;
        height: 35px !important;
        align-items: center !important;
        gap: 6px !important;
    }
    .nav-button {
        font-size: 9px !important;
        height: 30px !important;
        padding: 8px 15px !important;
    }
    .mobile {
        font-size: 22px !important;
    }
      .mobile2 {
         
        font-size: 12px !important;
    }
    .mobile-search{
       font-size: 14px !important;
       width: 67vw !important;
    }
    .mobile-search-button {
        font-size: 14px !important;
    }
    .mobile-template-grid {
        /*padding-top: 50px !important;*/
    }
    .mobile-template {
        margin: 0px 40px !important;
        /* padding-left: 10px !important; */
    }
    .recent {
        font-size: 16px !important;
        padding-left: 10px;
        padding-top: 10px;
    }
    .recent-available {
        font-size: 12px !important;
        padding-right: 10px !important;
    }
    #mainSidebar {
        display: none !important;
        width: 100% !important;
        height: 100vh !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        padding: 0.5rem !important;
        position: fixed !important;
        bottom: 0 !important;
        z-index: 1000 !important;
        border-top: 1px solid var(--border) !important;
        border-right: none !important;
    }

    #submenu {
        width: 100% !important;
        height: auto !important;
        position: static !important;
        margin-top: 1rem !important;
    }

    .submenu-open #mainContent {
        margin-left: 0 !important;
        margin-top: 4rem !important;
    }

    #mainContent {
        margin: 0px !important;
        padding: 0px !important;
        width: 100vw !important;
    }

    .category-container {
        /* height: auto; */
        flex-wrap: nowrap;
    }
 

    .transition{
        margin: 0px 0px !important;
    }
    .template-img{
        height: 130px !important;
    }
    .cardname{
        font-size: 10px !important;
    }
    .searchmenu{
        /*margin-top: -20px !important;*/
    }
}


/* Add to your CSS file */
.activity-card {
    font-size: 8px !important;
    transition: all 0.3s ease !important;
}
.activity-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Container Box */
#welcome-box {
    position: fixed !important;
    top: 20px !important;
    right: 10px !important; /* Hidden initially */
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white !important;
    padding: 12px 18px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-family: Arial, sans-serif !important;
    font-size: 16px !important;
    transition: all 0.8s ease-in-out !important;
    z-index: 9999 !important;
}

/* Profile Image */
#welcome-box img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    object-fit: cover !important;
}

/* Small profile-only state */
#welcome-box.small {
    padding: 5px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    justify-content: center !important;
}
#welcome-box.small span {
    display: none !important;
}
  /* Profile Section Styles */
    .profile-container {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    
    .profile-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        transition: all 0.3s ease;
    }
    
    .profile-btn:hover {
        opacity: 0.9;
    }
    
    .profile-content {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .user-name {
        font-weight: 600;
        color: #2d3748;
        font-size: 14px;
    }
    
    .user-role {
        font-size: 12px;
        color: #718096;
        margin-top: 2px;
    }
    
    .profile-image img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #e2e8f0;
        transition: all 0.3s ease;
    }
    
    .profile-btn:hover .profile-image img {
        border-color: #cbd5e0;
    }
    
    .dropdown-arrow {
        color: #718096;
        font-size: 12px;
        transition: transform 0.3s ease;
    }
    
    .profile-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Dropdown Menu */
    .dropdown-menu {
        position: absolute;
        right: 0;
        top: 100%;
        margin-top: 10px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .profile-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown-item {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        color: #4a5568;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    
    .dropdown-item i {
        margin-right: 10px;
        width: 18px;
        text-align: center;
    }
    
    .dropdown-item:hover {
        background-color: #f7fafc;
        color: #2b6cb0;
    }
    
    .dropdown-divider {
        height: 1px;
        background-color: #e2e8f0;
        margin: 5px 0;
    }
  /* Dark Mode Variables */
:root {
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary-color: #f43f5e;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --border: #e5e7eb;
    --radius-lg: 1rem;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --primary-color: #4e73df;
    --hover-color: #f1f1f1;
}

/* Dark Mode Overrides */
.dark-mode {
    --text-dark: #e2e8f0;
    --text-light: #a0aec0;
    --bg-light: #1a202c;
    --bg-gray: #2d3748;
    --border: #4a5568;
    --bg-color: #1a202c;
    --text-color: #e2e8f0;
    --card-bg: #2d3748;
    --border-color: #4a5568;
    --hover-color: #4a5568;
}

/* Dark Mode Specific Styles */
.dark-mode body {
    background-color: var(--bg-light) !important;
    color: var(--text-dark) !important;
}

.dark-mode .gradient-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
}

.dark-mode .template-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .template-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.dark-mode .category-btn {
    background-color: var(--card-bg) !important;
    color: var(--text-dark) !important;
    border-color: var(--border) !important;
}

.dark-mode .active-category {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.dark-mode .search-input {
    background-color: var(--card-bg) !important;
    color: var(--text-dark) !important;
    border-color: var(--border) !important;
}

.dark-mode .sidebar {
    background-color: var(--card-bg) !important;
    border-right-color: var(--border) !important;
}

.dark-mode .sidebar-btn {
    color: var(--text-dark) !important;
}

.dark-mode .sidebar-btn:hover,
.dark-mode .sidebar-btn.active {
    color: var(--primary-light) !important;
}

.dark-mode .bookmark-btn {
    background: rgba(45, 55, 72, 0.95) !important;
    color: var(--text-dark) !important;
}

.dark-mode #mainContent {
    background-color: var(--bg-light) !important;
}

.dark-mode .activity-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .profile-container .user-name {
    color: var(--text-dark) !important;
}

.dark-mode .profile-container .user-role {
    color: var(--text-light) !important;
}

.dark-mode .dropdown-menu {
    background-color: var(--card-bg) !important;
    border-color: var(--border) !important;
}

.dark-mode .dropdown-item {
    color: var(--text-dark) !important;
}

.dark-mode .dropdown-item:hover {
    background-color: var(--hover-color) !important;
}

.dark-mode .dropdown-divider {
    background-color: var(--border) !important;
}

.dark-mode .empty-state {
    background-color: var(--bg-gray) !important;
    color: var(--text-light) !important;
}

.dark-mode .empty-state-icon {
    color: var(--text-light) !important;
}

.dark-mode .active-tab {
    background-color: var(--card-bg) !important;
    color: var(--primary-light) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Mobile Dark Mode Styles */
@media (max-width: 768px) {
    .dark-mode #mainSidebar {
        background-color: var(--card-bg) !important;
        border-top-color: var(--border) !important;
    }
    #mainSidebar {
        height: 100vh !important;
    }
}

/* Dark Mode Toggle Switch */
.dark-mode .theme-switch .slider {
    background-color: var(--border) !important;
}

.dark-mode .theme-switch input:checked + .slider {
    background-color: var(--primary-color) !important;
}

/*model popup*/

/* Backdrop with premium blur & fade */
.bg-whi {
    backdrop-filter: blur(8px) !important;
    background-color: --bg-color: #ffffff !important;
    animation: modalBackdropFade 0.3s ease !important;
}
.dark-mode .bg-whi {
    background-color: --bg-color: #1a202c !important;
}
/* Modal container */
.bg-whi .bg-whi {
    background: --bg-color: #ffffff !important;
    border-radius: 1rem !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
    animation: modalFadeIn 0.4s ease !important;
}
.dark-mode .bg-whi{
    background-color: --bg-color: #1a202c !important;
}
/* Modal header */
.bg-whi .border-b {
    border-color: rgba(0,0,0,0.08) !important;
    background: --bg-color: #ffffff !important;
}
.dark-mode .bg-whi .border-b {
    border-color: rgba(0,0,0,0.08) !important;
    background: --bg-color: #1a202c !important;
}

#templateModal h2 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: #2c2c2c !important;
    letter-spacing: 0.3px !important;
}

/* Close button */
#templateModal button {
    transition: all 0.25s ease !important;
}

#templateModal button:hover {
    transform: scale(1.1) !important;
    color: #000 !important;
}

/* Image preview container */
#templateModal .relative {
    position: relative !important;
    overflow: hidden !important;
}

/* Image style */
#templateModal img {
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08) !important;
    transition: transform 0.4s ease !important;
}

/* Zoom-in effect */
#templateModal img:hover {
    transform: scale(1.05) !important;
}

/* Caption overlay */
#templateModal .relative::after {
    content: attr(data-caption) !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 10px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent) !important;
    color: white !important;
    font-size: 0.85rem !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

/* Show caption on hover */
#templateModal .relative:hover::after {
    opacity: 1 !important;
}

/* Floating action buttons */
#templateModal .absolute button {
    background: rgba(255,255,255,0.95) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    backdrop-filter: blur(4px) !important;
    transition: all 0.3s ease !important;
}

#templateModal .absolute button:hover {
    background: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12) !important;
}

/* Category label */
#modalCategory {
    background: rgba(124, 58, 237, 0.1) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    color: #7c3aed !important;
}

/* Footer */
#templateModal .border-t {
    border-color: rgba(0,0,0,0.08) !important;
    background: #fafafa !important;
}
.dark-mode #templateModal .border-t {
    border-color: rgba(0,0,0,0.08) !important;
    background: --bg-color: #1a202c !important;
}

/* Edit button */
#editButton {
    font-weight: 600 !important;
    border-radius: 0.6rem !important;
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25) !important;
    transition: all 0.3s ease !important;
}

#editButton:hover {
    background: linear-gradient(135deg, #6d28d9, #4c1d95) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35) !important;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalBackdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}


.like-section {
    margin-top: 10px;
}
.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    font-size: 14px;
}
.like-btn:hover {
    color: #e74c3c;
}
.like-btn.liked {
    color: #e74c3c;
}
.like-btn i {
    margin-right: 5px;
}

/**/
/* Add to your stylesheet */
#bookmarkModal code {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

#bookmarkModal .bg-gray-200.dark\:bg-gray-800 {
    transition: background-color 0.3s ease;
}

#bookmarkModalImage {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.bookmark-items-container::-webkit-scrollbar {
    width: 0px;
    height: 100vh;
}

.bookmark-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bookmark-items-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bookmark-items-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark .bookmark-items-container::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark .bookmark-items-container::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.dark .bookmark-items-container::-webkit-scrollbar-thumb:hover {
    background: #718096;
}





/**/

/* Mobile Dark Mode Styles */
@media (max-width: 1024px) {
 
    #mainSidebar {
        height: 100vh !important;
    }
   #mainSidebar .sidebar{
        height: 100vh !important;
    }
}

@media (min-width: 1280px){
      #mainSidebar {
        height: 100vh !important;
    }
     #mainSidebar  .sidebar{
        height: 100vh !important;
    }
}




/* ================= AI BOT PANEL ================= */

#aibotPanel{
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 420px !important;
    height: 420px !important;
    background: #ffffff !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px 0 0 16px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,.25) !important;
    overflow: hidden !important;
    font-family: Inter, system-ui, -apple-system !important;
    animation: aiSlideUp .35s ease !important;
}

/* Hidden state */
#aibotPanel.hidden{
    display: none !important;
}

/* ================= ANIMATION ================= */

@keyframes aiSlideUp{
    from{
        transform: translateY(40px);
        opacity: 0;
    }
    to{
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================= HEADER ================= */

#aibotPanel > div:first-child{
    background: linear-gradient(135deg,#6d28d9,#9333ea) !important;
    color: #fff !important;
    padding: 14px 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#aibotPanel h3{
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: .3px !important;
}

#aibotPanel button{
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 22px !important;
    cursor: pointer !important;
    opacity: .85 !important;
}
#aibotPanel button:hover{
    opacity: 1 !important;
}

/* ================= CHAT BODY ================= */

#aiChatBody{
    flex: 1 !important;
    padding: 14px !important;
    background: #f9fafb !important;
    overflow-y: auto !important;
}

/* Scrollbar */
#aiChatBody::-webkit-scrollbar{
    width: 6px !important;
}
#aiChatBody::-webkit-scrollbar-thumb{
    background: #c4b5fd !important;
    border-radius: 10px !important;
}

/* ================= MESSAGE BUBBLES ================= */

.ai-msg{
    max-width: 85% !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.08) !important;
}

/* User */
.ai-user{
    margin-left: auto !important;
    background: linear-gradient(135deg,#6366f1,#4f46e5) !important;
    color: #fff !important;
    border-bottom-right-radius: 4px !important;
}

/* Bot */
.ai-bot{
    background: #ffffff !important;
    color: #111 !important;
    border-bottom-left-radius: 4px !important;
}

/* ================= INPUT AREA ================= */

#aibotPanel > div:last-child{
    padding: 12px !important;
    border-top: 1px solid #e5e7eb !important;
    display: flex !important;
    gap: 10px !important;
    background: #fff !important;
}

#aiInput{
    flex: 1 !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid #ddd !important;
    font-size: 13px !important;
}
#aiInput:focus{
    outline: none !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139,92,246,.15) !important;
}

/* Send Button */
#aibotPanel button.bg-purple-600{
    padding: 10px 18px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg,#7c3aed,#9333ea) !important;
    color: #fff !important;
    font-size: 13px !important;
    box-shadow: 0 6px 18px rgba(124,58,237,.4) !important;
    transition: .25s !important;
}
#aibotPanel button.bg-purple-600:hover{
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 28px rgba(124,58,237,.55) !important;
}

/* ================= MOBILE ================= */

@media(max-width: 520px){
    #aibotPanel{
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }
}
