/* styles.css */
.category-card {
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

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

/* Dropdown Styles */
.dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Backdrop */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    background-color: transparent;
    z-index: 40;
}

.dropdown-backdrop.active {
    display: block;
}

/* Hidden Categories */
.hidden-categories {
    display: none;
    opacity: 0;
    transition: all 0.5s ease;
}

.hidden-categories.show {
    display: grid;
    opacity: 1;
}

/* Rotate Icon */
.rotate-icon {
    transition: transform 0.3s ease;
}

.rotate-icon.active {
    transform: rotate(180deg);
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Mobile Menu */
#mobileMenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 50;
    transition: all 0.3s ease;
}

#mobileMenu.hidden {
    display: none;
}

#mobileMenu:not(.hidden) {
    display: block;
}

@media (max-width: 768px) {
    #mobileMenuBtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    #mobileMenu .mobile-menu-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        color: #4b5563;
        transition: all 0.2s ease;
    }
    
    #mobileMenu .mobile-menu-item:hover {
        background-color: #f3f4f6;
        color: #dc2626;
    }
}

/* Scrollbar Hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Active Link Styles */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link.active {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    box-shadow: 3px 3px 6px #e5e7eb, -3px -3px 6px #ffffff;
    color: #dc2626;
}

.nav-link:not(.active):hover {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
}

/* Profile Button */
#profileButton {
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

#profileButton:hover {
    background-color: rgb(243 244 246);
}

/* Desktop styles (md and up) */
@media (min-width: 768px) {
    #profileButton {
        min-width: 200px;
        padding: 0.5rem 1rem;
    }
    
    #profileButton .profile-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    #profileButton .role-badge {
        display: inline-flex;
    }
    
    #profileButton .chevron-icon {
        display: block;
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    #profileButton {
        min-width: auto;
        padding: 0.25rem;
    }

    #profileButton .profile-info {
        display: none;
    }

    #profileButton .chevron-icon {
        display: none;
    }

    #profileButton .mobile-role-indicator {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    }
}

/* Role Badges */
.role-badge {
    font-size: 0.625rem;
    line-height: 1rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

#profileButton:hover .role-badge {
    transform: translateY(-1px);
}

/* Role Colors */
.role-badge.admin {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(185, 28, 28);
}

.role-badge.district-admin {
    background-color: rgba(124, 58, 237, 0.1);
    color: rgb(109, 40, 217);
}

.role-badge.network-admin {
    background-color: rgba(59, 130, 246, 0.1);
    color: rgb(30, 64, 175);
}

.role-badge.school-admin {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(21, 128, 61);
}

.role-badge.teacher {
    background-color: rgba(234, 179, 8, 0.1);
    color: rgb(161, 98, 7);
}

.role-badge.score-user {
    background-color: rgba(249, 115, 22, 0.1);
    color: rgb(194, 65, 12);
}

.role-badge.user {
    background-color: rgba(107, 114, 128, 0.1);
    color: rgb(55, 65, 81);
}

/* Mobile Role Indicators */
.role-indicator-admin { background-color: rgb(239, 68, 68); }
.role-indicator-district-admin { background-color: rgb(124, 58, 237); }
.role-indicator-network-admin { background-color: rgb(59, 130, 246); }
.role-indicator-school-admin { background-color: rgb(34, 197, 94); }
.role-indicator-teacher { background-color: rgb(234, 179, 8); }
.role-indicator-score-user { background-color: rgb(249, 115, 22); }
.role-indicator-user { background-color: rgb(107, 114, 128); }

/* Mobile Menu User Info */
#mobileUserInfo {
    padding: 1rem;
    background-color: rgb(249, 250, 251);
}

#mobileUserInfo .user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#mobileUserInfo .user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#mobileUserInfo .user-name {
    font-weight: 500;
    color: rgb(17, 24, 39);
}

/* Hover Effects */
#profileButton:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.menu-item:hover {
    background-color: rgb(249, 250, 251);
}

/* Dropdown Animation */
.dropdown {
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown.active {
    opacity: 1;
    transform: scale(1);
}

.dropdown:not(.active) {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* Profile Image */
.profile-image {
    position: relative;
    width: 2rem;
    height: 2rem;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
}

/* Dropdown Menu Items */
.dropdown-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgb(55, 65, 81);
    transition: background-color 0.2s ease;
}

.dropdown-menu-item:hover {
    background-color: rgb(249, 250, 251);
}

.dropdown-menu-item i {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}

/* Dividers */
.dropdown-divider {
    height: 1px;
    background-color: rgb(229, 231, 235);
    margin: 0.5rem 0;
}



@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Profile Dropdown */
#profileDropdown {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    z-index: 50;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: rgb(55 65 81);
    transition: all 0.2s ease;
}

.menu-item:hover {
    background-color: rgb(243 244 246);
}

.logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: rgb(220 38 38);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: rgb(254 242 242);
}

/* Divider */
.dropdown-divider {
    height: 1px;
    background-color: rgb(243 244 246);
    margin: 0.25rem 0;
}

/* Logo Animation */
.logo-text {
    background: linear-gradient(45deg, #FF385C, #E61E4D);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.logo-text::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(45deg, #FF385C, #E61E4D);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.logo-text:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}



/* Navbar Link Styles */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link.active {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    box-shadow: 3px 3px 6px #e5e7eb, -3px -3px 6px #ffffff;
    color: #dc2626;
}

.nav-link:not(.active):hover {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    padding: 2px;
    background: linear-gradient(45deg, #FF385C, #E61E4D);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link.active::before {
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #dc2626;
    transform: scaleX(1);
    transition: transform 0.2s ease;
}

.nav-link:not(.active)::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #dc2626;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Mobile Menu Item Styles */
.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #4b5563;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.mobile-menu-item:hover {
    background-color: #f3f4f6;
    color: #dc2626;
}

.mobile-menu-item i {
    margin-right: 0.75rem;
}

/* Active Mobile Menu Item */
.mobile-menu-item.active {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    box-shadow: 3px 3px 6px #e5e7eb, -3px -3px 6px #ffffff;
    color: #dc2626;
    border-radius: 0.5rem;
}


