/* HAPPENGRID - GLOBAL STYLES */

/* CSS Variables */
:root {
    --background: hsl(240, 15%, 6%);
    --foreground: hsl(0, 0%, 98%);
    --card: hsl(240, 15%, 9%);
    --card-foreground: hsl(0, 0%, 98%);
    --popover: hsl(240, 15%, 9%);
    --popover-foreground: hsl(0, 0%, 98%);
    --primary: hsl(270, 80%, 65%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(240, 15%, 15%);
    --secondary-foreground: hsl(0, 0%, 98%);
    --muted: hsl(240, 15%, 18%);
    --muted-foreground: hsl(240, 10%, 60%);
    --accent: hsl(270, 80%, 55%);
    --accent-foreground: hsl(0, 0%, 100%);
    --destructive: hsl(0, 72%, 51%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(270, 30%, 25%);
    --input: hsl(240, 15%, 15%);
    --ring: hsl(270, 80%, 65%);
    --radius: 1rem;

    /* Custom HappenGrid tokens */
    --violet-glow: hsl(270, 80%, 65%);
    --violet-soft: hsl(270, 60%, 75%);
    --violet-deep: hsl(270, 80%, 45%);
    --navy-dark: hsl(240, 20%, 8%);
    --navy-light: hsl(240, 15%, 12%);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(240, 20%, 6%) 0%, hsl(270, 30%, 12%) 50%, hsl(240, 20%, 8%) 100%);
    --gradient-card: linear-gradient(135deg, hsl(240, 15%, 10%) 0%, hsl(240, 15%, 8%) 100%);
    --gradient-violet: linear-gradient(135deg, hsl(270, 80%, 60%) 0%, hsl(290, 80%, 55%) 100%);
    --gradient-violet-soft: linear-gradient(135deg, hsla(270, 80%, 65%, 0.2) 0%, hsla(290, 80%, 60%, 0.1) 100%);

    /* Shadows */
    --shadow-glow: 0 0 60px hsla(270, 80%, 65%, 0.3);
    --shadow-card: 0 8px 32px hsla(0, 0%, 0%, 0.4);
    --shadow-elevated: 0 20px 60px hsla(0, 0%, 0%, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Sticky Footer Setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main,
.dashboard-container,
.main-content {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(240, 15%, 8%);
}

::-webkit-scrollbar-thumb {
    background: hsl(270, 40%, 35%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(270, 60%, 45%);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Utility Classes */
.text-gradient-violet {
    background: var(--gradient-violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-hero {
    background: var(--gradient-hero);
}

.bg-gradient-card {
    background: var(--gradient-card);
}

.bg-gradient-violet {
    background: var(--gradient-violet);
}

.glow-violet {
    box-shadow: var(--shadow-glow);
}

.glow-violet-sm {
    box-shadow: 0 0 30px hsla(270, 80%, 65%, 0.2);
}

.hidden {
    display: none !important;
}

.glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: hsla(240, 15%, 10%, 0.7);
    border-bottom: 1px solid hsla(270, 80%, 65%, 0.1);
}

.glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: linear-gradient(135deg, hsla(240, 15%, 12%, 0.9) 0%, hsla(240, 15%, 8%, 0.9) 100%);
    border: 1px solid hsla(270, 30%, 35%, 0.2);
    border-radius: 1rem;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px hsla(0, 0%, 0%, 0.4), 0 0 40px hsla(270, 80%, 65%, 0.15);
    border-color: hsla(270, 60%, 50%, 0.4);
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-sm {
    height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    height: 3rem;
    padding: 0 1.75rem;
    font-size: 1rem;
}

.btn-xl {
    height: 3.5rem;
    padding: 0 2.25rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-violet);
    color: var(--primary-foreground);
    box-shadow: 0 4px 15px hsla(270, 80%, 65%, 0.4);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px hsla(270, 80%, 65%, 0.5);
}

.btn-hero {
    background: var(--gradient-violet);
    color: var(--primary-foreground);
    box-shadow: 0 0 40px hsla(270, 80%, 65%, 0.3);
}

.btn-hero:hover {
    box-shadow: 0 0 60px hsla(270, 80%, 65%, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background: hsla(270, 80%, 65%, 0.1);
    color: var(--foreground);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: hsla(270, 80%, 65%, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-tag {
    background: var(--secondary);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.btn-tag:hover {
    background: hsla(270, 80%, 65%, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-tag-active {
    background: hsla(270, 80%, 65%, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.w-full {
    width: 100%;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem 0;
    transition: all 0.3s ease;
    /* Default darker background for better visibility */
    background: hsla(240, 15%, 8%, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(270, 80%, 65%, 0.1);
}

/* Always solid on mobile */
@media (max-width: 767px) {
    .navbar {
        background: hsl(240, 15%, 7%) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid hsla(270, 80%, 65%, 0.15) !important;
    }
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: var(--gradient-violet);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    font-weight: 800;
    font-size: 1.25rem;
}

img.logo-icon {
    background: transparent;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

@media (min-width: 1024px) {
    .logo-text {
        font-size: 1.5rem;
    }
}

.nav-links {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--foreground);
    background: hsl(240, 10%, 15%);
}

.nav-link.active {
    color: var(--primary);
    background: hsla(270, 80%, 65%, 0.1);
}

.nav-actions {
    display: none;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-actions {
        display: flex;
    }
}

.nav-icons-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-divider {
    width: 1px;
    height: 1.5rem;
    background: var(--border);
    margin: 0 0.25rem;
}

.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--foreground);
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    /* Ensure mobile menu has solid dark background */
    background: hsl(240, 15%, 7%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1rem 1.25rem;
    border-radius: 0 0 1rem 1rem;
    border-top: 1px solid hsla(270, 80%, 65%, 0.15);
    box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.5);
}

.mobile-menu.active {
    display: flex;
    animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    color: var(--foreground);
    background: hsla(240, 15%, 18%, 0.8);
}

.mobile-nav-link.active {
    color: var(--primary);
    background: hsla(270, 80%, 65%, 0.12);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid hsla(270, 30%, 35%, 0.3);
}

.mobile-icon-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    background: hsla(240, 15%, 12%, 0.6);
    border-radius: 0.75rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 4rem 0 2rem;
    background: hsla(240, 15%, 8%, 0.5);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

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

/* Brand spans both columns on mobile */
.footer-brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    /* Brand back to single column on tablet/desktop */
    .footer-brand {
        grid-column: auto;
    }
}

@media (min-width: 1024px) {
    .footer-top {
        grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

/* Mobile footer: compact 2-column grid for link groups */
@media (max-width: 767px) {
    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-top {
        gap: 1.5rem 1rem;
        margin-bottom: 2rem;
    }

    .footer-desc {
        margin-bottom: 0.75rem;
    }
}

.footer-desc {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    max-width: 20rem;
    margin-bottom: 1rem;
}
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-link svg {
    color: var(--primary);
}

.footer-links-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.copyright {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: hsla(240, 15%, 15%, 0.5);
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-2px);
}

.notification-wrapper {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: 40px;
    width: 280px;
    background: hsl(240, 15%, 10%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

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

.notif-item {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.notif-empty {
    padding: 15px;
    text-align: center;
    color: gray;
}