/* Base & Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
}

/* Footer Styles */
.main-footer {
    background: var(--primary-dark);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: auto;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col .social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-col .social-links li {
    margin-bottom: 0;
}

.footer-col .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.footer-col .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    color: white;
}

.footer-col .social-links svg {
    width: 20px;
    height: 20px;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

/* Mobile Base Styles */
@media (max-width: 768px) {

    /* Container adjustment */
    .container {
        padding: 0 1.25rem;
    }

    /* Typography Scaling */
    html {
        font-size: 15px;
        /* Slightly smaller base */
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .main-footer {
        padding: 3rem 0 1.5rem;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-col .social-links {
        justify-content: center;
    }

    .footer-col h4 {
        margin-bottom: 1rem;
    }
}

/* UIVERSE Animated Button */
.uiverse {
    --duration: 7s;
    --easing: linear;
    --c-color-1: rgba(255, 77, 141, 0.7);
    /* Secondary Pink */
    --c-color-2: var(--primary);
    /* Primary Purple */
    --c-color-3: var(--primary-dark);
    /* Deep #4B249B */
    --c-color-4: rgba(255, 209, 102, 0.7);
    /* Accent Yellow */
    --c-shadow: rgba(106, 76, 255, 0.5);
    /* Primary Shadow */
    --c-shadow-inset-top: rgba(255, 255, 255, 0.9);
    --c-shadow-inset-bottom: rgba(255, 255, 255, 0.8);
    --c-radial-inner: var(--primary-hover);
    --c-radial-outer: var(--primary);
    --c-color: #fff;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    position: relative;
    cursor: pointer;
    border: none;
    display: table;
    border-radius: 24px;
    padding: 0;
    margin: 0;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: var(--c-color);
    background: radial-gradient(circle,
            var(--c-radial-inner),
            var(--c-radial-outer) 80%);
    box-shadow: 0 0 14px var(--c-shadow);
}

.uiverse:before {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    box-shadow:
        inset 0 3px 12px var(--c-shadow-inset-top),
        inset 0 -3px 4px var(--c-shadow-inset-bottom);
}

.uiverse .wrapper {
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    overflow: hidden;
    border-radius: 24px;
    min-width: 132px;
    padding: 12px 0;
}

.uiverse .wrapper span {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.uiverse:hover {
    --duration: 1400ms;
}

.uiverse .wrapper .circle {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    filter: blur(var(--blur, 8px));
    background: var(--background, transparent);
    transform: translate(var(--x, 0), var(--y, 0)) translateZ(0);
    animation: var(--animation, none) var(--duration) var(--easing) infinite;
}

.uiverse .wrapper .circle.circle-1,
.uiverse .wrapper .circle.circle-9,
.uiverse .wrapper .circle.circle-10 {
    --background: var(--c-color-4);
}

.uiverse .wrapper .circle.circle-3,
.uiverse .wrapper .circle.circle-4 {
    --background: var(--c-color-2);
    --blur: 14px;
}

.uiverse .wrapper .circle.circle-5,
.uiverse .wrapper .circle.circle-6 {
    --background: var(--c-color-3);
    --blur: 16px;
}

.uiverse .wrapper .circle.circle-2,
.uiverse .wrapper .circle.circle-7,
.uiverse .wrapper .circle.circle-8,
.uiverse .wrapper .circle.circle-11,
.uiverse .wrapper .circle.circle-12 {
    --background: var(--c-color-1);
    --blur: 12px;
}

.uiverse .wrapper .circle.circle-1 {
    --x: 0;
    --y: -40px;
    --animation: circle-1;
}

.uiverse .wrapper .circle.circle-2 {
    --x: 92px;
    --y: 8px;
    --animation: circle-2;
}

.uiverse .wrapper .circle.circle-3 {
    --x: -12px;
    --y: -12px;
    --animation: circle-3;
}

.uiverse .wrapper .circle.circle-4 {
    --x: 80px;
    --y: -12px;
    --animation: circle-4;
}

.uiverse .wrapper .circle.circle-5 {
    --x: 12px;
    --y: -4px;
    --animation: circle-5;
}

.uiverse .wrapper .circle.circle-6 {
    --x: 56px;
    --y: 16px;
    --animation: circle-6;
}

.uiverse .wrapper .circle.circle-7 {
    --x: 8px;
    --y: 28px;
    --animation: circle-7;
}

.uiverse .wrapper .circle.circle-8 {
    --x: 28px;
    --y: -4px;
    --animation: circle-8;
}

.uiverse .wrapper .circle.circle-9 {
    --x: 20px;
    --y: -12px;
    --animation: circle-9;
}

.uiverse .wrapper .circle.circle-10 {
    --x: 64px;
    --y: 16px;
    --animation: circle-10;
}

.uiverse .wrapper .circle.circle-11 {
    --x: 4px;
    --y: 4px;
    --animation: circle-11;
}

.uiverse .wrapper .circle.circle-12 {
    --blur: 14px;
    --x: 52px;
    --y: 4px;
    --animation: circle-12;
}

@keyframes circle-1 {
    33% {
        transform: translate(0px, 16px) translateZ(0);
    }

    66% {
        transform: translate(12px, 64px) translateZ(0);
    }
}

@keyframes circle-2 {
    33% {
        transform: translate(80px, -10px) translateZ(0);
    }

    66% {
        transform: translate(72px, -48px) translateZ(0);
    }
}

@keyframes circle-3 {
    33% {
        transform: translate(20px, 12px) translateZ(0);
    }

    66% {
        transform: translate(12px, 4px) translateZ(0);
    }
}

@keyframes circle-4 {
    33% {
        transform: translate(76px, -12px) translateZ(0);
    }

    66% {
        transform: translate(112px, -8px) translateZ(0);
    }
}

@keyframes circle-5 {
    33% {
        transform: translate(84px, 28px) translateZ(0);
    }

    66% {
        transform: translate(40px, -32px) translateZ(0);
    }
}

@keyframes circle-6 {
    33% {
        transform: translate(28px, -16px) translateZ(0);
    }

    66% {
        transform: translate(76px, -56px) translateZ(0);
    }
}

@keyframes circle-7 {
    33% {
        transform: translate(8px, 28px) translateZ(0);
    }

    66% {
        transform: translate(20px, -60px) translateZ(0);
    }
}

@keyframes circle-8 {
    33% {
        transform: translate(32px, -4px) translateZ(0);
    }

    66% {
        transform: translate(56px, -20px) translateZ(0);
    }
}

@keyframes circle-9 {
    33% {
        transform: translate(20px, -12px) translateZ(0);
    }

    66% {
        transform: translate(80px, -8px) translateZ(0);
    }
}

@keyframes circle-10 {
    33% {
        transform: translate(68px, 20px) translateZ(0);
    }

    66% {
        transform: translate(100px, 28px) translateZ(0);
    }
}

@keyframes circle-11 {
    33% {
        transform: translate(4px, 4px) translateZ(0);
    }

    66% {
        transform: translate(68px, 20px) translateZ(0);
    }
}

@keyframes circle-12 {
    33% {
        transform: translate(56px, 0px) translateZ(0);
    }

    66% {
        transform: translate(60px, -32px) translateZ(0);
    }
}

/* Header Variant: Darker, Main Theme */
.uiverse-header {
    --c-radial-inner: var(--primary-dark);
    --c-radial-outer: #240046;
    /* Deepest Purple */
    --c-color-1: var(--primary);
    --c-color-2: var(--secondary);
    --c-color-3: var(--primary-light);
    --c-color-4: var(--accent);
    transform: scale(0.9);
    /* Slightly smaller for header */
}

/* CTA Variant: Pure White, No Colored Animations */
.uiverse-cta {
    margin: 0 auto;
    min-width: 260px;
    /* Longer */
    background: #ffffff;
    --c-color: var(--primary-dark);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

    /* Permanently hide colored circles */
    --c-color-1: transparent;
    --c-color-2: transparent;
    --c-color-3: transparent;
    --c-color-4: transparent;
    --c-radial-inner: transparent;
    --c-radial-outer: transparent;
}

.uiverse-cta:hover {
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block !important;
    }

    /* Hide menu items initially on mobile */
    #nav-menu,
    #nav-actions {
        display: none !important;
        width: 100%;
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 1.5rem;
        text-align: center;
    }

    /* Show when active */
    #nav-menu.active,
    #nav-actions.active {
        display: flex !important;
    }

    #nav-menu {
        order: 3;
        /* Move below everything */
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        margin-top: 1rem;
    }

    #nav-actions {
        order: 4;
        margin-bottom: 1rem;
    }
}

/* Global Search Bar Styles */
.search-section {
    padding: 4rem 0;
    text-align: center;
}

.search-bar-wrapper {
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-bar-wrapper input {
    border: none;
    outline: none;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    width: 100%;
    border-radius: 50px;
    color: var(--text-main);
    background: transparent;
}

.search-bar-wrapper button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-bar-wrapper button:hover {
    background: var(--primary-hover);
    /* Ensure this var exists or use a hex */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 76, 255, 0.4);
}

/* Global Course Card Styles */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    color: var(--text-main);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

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

.course-thumb {
    height: 200px;
    background: #ddd;
    position: relative;
    background-size: cover;
    background-position: center;
}

.course-info {
    padding: 1.5rem;
}

.pill-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* User Profile Dropdown Redesign */
.user-dropdown-card {
    min-width: 250px;
    background: white;
    position: absolute;
    top: 55px;
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.user-dropdown-card::before {
    content: '';
    position: absolute;
    width: 250px;
    background-image: linear-gradient(180deg, rgb(0, 183, 255), rgb(255, 48, 255));
    height: 200%;
    animation: rotBGimg 3s linear infinite;
    transition: all 0.2s linear;
    top: -50%;
    left: 0;
}

@keyframes rotBGimg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.user-dropdown-card::after {
    content: '';
    position: absolute;
    background: white;
    /* USER REQUESTED WHITE BACKGROUND */
    inset: 4px;
    border-radius: 17px;
    z-index: 0;
}

.user-dropdown-card .dropdown-inner {
    position: relative;
    z-index: 1;
    /* Content above the rotating border */
    width: 100%;
}