:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --primary: #7928ca;
    --secondary: #ff0080;
    --accent: #0070f3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
}

.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 20px;
    margin: 0 -20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-bar {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 20px;
    width: 400px;
    transition: border-color 0.3s;
}

.search-bar:focus-within {
    border-color: var(--primary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: var(--font-main);
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-item:hover {
    color: white;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(121, 40, 202, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 10px 25px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: white;
}

.large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Hero */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(to right, #7928ca, #ff0080, #ff4d4d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientMove 5s linear infinite;
}

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

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

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-visual {
    position: absolute;
    top: 0;
    right: -10%;
    width: 60%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: 20%;
    right: 20%;
    animation: float 6s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: 20%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

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

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

/* Categories */
.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    margin-bottom: 100px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 20px;
    height: 400px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.5s;
}

.category-card:hover .card-bg {
    opacity: 0.2;
    transform: scale(1.05);
}

/* Placeholder gradients for images */
.events-bg {
    background: linear-gradient(45deg, #1a1a1a, #4a1a1a);
}

.gear-bg {
    background: linear-gradient(45deg, #1a1a1a, #1a2a4a);
}

.learn-bg {
    background: linear-gradient(45deg, #1a1a1a, #1a4a2a);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.card-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* Trending */
.trending {
    margin-bottom: 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h3 {
    font-size: 2rem;
}

.tabs {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 5px;
    border-radius: 50px;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.tab.active {
    background: var(--glass-bg);
    color: white;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-image {
    height: 180px;
    background: #222;
    border-radius: 10px;
    margin-bottom: 15px;
}

.item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}

/* Events Page Specific Styles */

.events-layout {
    display: flex;
    height: calc(100vh - 80px);
    /* Subtract navbar height */
    overflow: hidden;
}

.events-sidebar {
    width: 400px;
    background: var(--bg-card);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.filters {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.filters h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.date-toggles {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    color: white;
}

.filter-select {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px;
    border-radius: 8px;
    outline: none;
}

.view-toggle {
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.toggle-btn.active {
    color: white;
    border-bottom-color: var(--primary);
}

.events-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Event Card in Sidebar */
.event-card-side {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid transparent;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.event-card-side:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

.event-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-date {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.event-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.2;
}

.event-venue {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Map Container */
.events-map-container {
    flex: 1;
    position: relative;
    background: #1a1a1a;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom Map Styles (Dark Mode for Leaflet) */
.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.map-overlay {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 500;
}

.small {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* Calendar Grid (Hidden by default) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    background: var(--glass-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.calendar-day.has-event {
    border: 1px solid var(--primary);
    color: white;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    margin-top: 4px;
}
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.whop-button {
    background: #FF6B00; /* Whop Orange-ish brand color */
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.whop-button:hover {
    transform: scale(1.02);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

/* MOBILE RESPONSIVENESS FIXES */
@media (max-width: 768px) {
    /* Fix Horizontal Scroll */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    /* Navbar Cleanup */
    .navbar {
        padding: 15px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .nav-links {
        display: none; /* Hide links on mobile for now to save space */
    }

    .search-bar {
        display: none; /* Hide search bar on mobile to clean up */
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Hero Section Stacking */
    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        width: 100%;
        padding: 20px;
        z-index: 2; /* Ensure text is above 3D */
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-visual {
        width: 100%;
        height: 40vh; /* Give the 3D shape some space below */
        position: relative;
        margin-top: -50px;
        z-index: 1;
    }

    /* Fix Buttons */
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn-primary.large, .btn-secondary.large {
        width: 100%;
    }

    /* Cards */
    .categories {
        flex-direction: column;
        padding: 20px;
    }

    .category-card {
        width: 100%;
        height: 250px;
    }
}

/* FIX: Stack Category Cards on Mobile */
@media (max-width: 768px) {
    .categories {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        align-items: center;
    }

    .category-card {
        width: 100% !important; /* Force full width */
        max-width: 350px; /* Prevent them from getting too huge */
        height: auto;
        min-height: 250px;
        margin: 0 auto; /* Center them */
    }

    .card-content {
        position: relative;
        padding: 30px;
        opacity: 1 !important; /* Always show text on mobile */
        transform: translateY(0) !important; /* No hover animation needed */
    }

    .card-bg {
        opacity: 0.3; /* Dim background so text is readable */
    }
}
