/* BuddyMU Main Design System Style Sheet */

:root {
    --primary-color: #0B4EA2;
    --primary-light: #3b82f6;
    --secondary-color: #4CAF50;
    --secondary-light: #81c784;
    --accent-color: #FDB515;
    --bg-color: #F8FAFC;
    --text-color: #1E293B;
    --text-muted: #64748B;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --input-bg: #F8FAFC;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #0B4EA2 0%, #4CAF50 100%);
    --gradient-glow: linear-gradient(135deg, rgba(11, 78, 162, 0.1) 0%, rgba(76, 175, 80, 0.1) 100%);
    --gradient-sun: linear-gradient(135deg, #FFD54F 0%, #FDB515 100%);

    /* Shadows & Border Radius */
    --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 20px 40px rgba(11, 78, 162, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(11, 78, 162, 0.06);
    --border-radius-sm: 10px;
    --border-radius-md: 18px;
    --border-radius-lg: 28px;
    --border-radius-pill: 50rem;

    /* Fonts */
    --font-poppins: 'Poppins', sans-serif;
    --font-inter: 'Inter', sans-serif;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(15px);
}

/* Global Reset & Body */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-inter);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-poppins {
    font-family: var(--font-poppins);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: var(--border-radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Glassmorphic sticky header */
.custom-navbar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.custom-navbar.navbar-scrolled {
    padding: 10px 0;
    box-shadow: var(--glass-shadow);
}

/* Brand design */
.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-name span {
    color: var(--secondary-color);
}

.brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--text-color);
    font-family: var(--font-poppins);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 15px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: var(--border-radius-pill);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 30px);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius-pill);
    font-family: var(--font-poppins);
    padding: 10px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: #083c7d;
    border-color: #083c7d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 78, 162, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--border-radius-pill);
    font-family: var(--font-poppins);
    padding: 10px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 78, 162, 0.1);
}

/* Cards style */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--soft-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(11, 78, 162, 0.15);
}

/* Dark mode and theme toggler */
.btn-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
    background: var(--input-bg);
}

/* User Profile button in navbar */
.btn-user {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    padding: 6px 14px;
    transition: all 0.2s ease;
}

.btn-user:hover {
    background: var(--input-bg);
}

/* Sidebar Styling (Admin and Client) */
.sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link::after {
    display: none; /* remove bottom line */
}

.sidebar .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(11, 78, 162, 0.2);
}

.sidebar .nav-link:hover:not(.active) {
    background-color: var(--input-bg);
    color: var(--primary-color) !important;
}

/* Footer elements */
.footer-title-border::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-pill);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-light) !important;
    padding-left: 5px;
}

.btn-social {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-3px);
}

/* Loader style */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(11, 78, 162, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations classes */
.hover-float {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.glow-yellow-sun {
    animation: sun-pulse 3s ease-in-out infinite alternate;
}

@keyframes sun-pulse {
    0% {
        filter: drop-shadow(0 0 2px rgba(253, 181, 21, 0.4));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(253, 181, 21, 0.8));
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(11, 78, 162, 0.05) 0%, rgba(76, 175, 80, 0.05) 90.1%);
    padding: 100px 0 120px 0;
    overflow: hidden;
}

.hero-shape-1 {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(11, 78, 162, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-shape-2 {
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Leaderboard Page details */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
}
.rank-1 { background-color: #FFD700; color: #1E293B; }
.rank-2 { background-color: #C0C0C0; color: #1E293B; }
.rank-3 { background-color: #CD7F32; color: #FFFFFF; }
.rank-other { background-color: #E2E8F0; color: #64748B; }

/* Dashboard Cards metrics */
.metric-card {
    padding: 20px;
    border-radius: var(--border-radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.badge-rounded {
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    font-weight: 600;
}

/* Glassmorphism generic container */
.glass-container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
    padding: 30px;
}
