:root {
    /* Color Palette */
    --color-bg: #0a0a12;
    --color-bg-alt: #13131f;
    --color-primary: #00f3ff;
    /* Neon Cyan */
    --color-secondary: #ff00ff;
    /* Neon Magenta */
    --color-text: #e0e0e0;
    --color-text-muted: #8888aa;

    /* Effects */
    --glow-primary: 0 0 10px rgba(0, 243, 255, 0.7);
    --glow-secondary: 0 0 10px rgba(255, 0, 255, 0.7);
    --border-glow: 0 0 5px var(--color-primary);

    /* Layout */
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Orbitron', sans-serif;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.fade-in {
    opacity: 0;
    transform: translateY(-20px);
    /* Start slightly above */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CRT Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-neon {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.btn-secondary {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: var(--color-secondary);
    color: white;
    box-shadow: var(--glow-secondary);
}

.btn-neon {
    color: var(--color-bg);
    background-color: var(--color-primary);
    border-radius: 4px;
    /* Slight roundness for nav button */
}

/* Navigation */
.main-nav {
    padding: 1.5rem 0;
    background: rgba(10, 10, 18, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
}

.logo .highlight {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-neon):hover {
    color: var(--color-primary);
    text-shadow: var(--glow-primary);
}

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

.hero-bg-split {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: -1;
    overflow: hidden;
}

.panel {
    flex: 1;
    height: 100%;
    border-right: 1px solid rgba(0, 243, 255, 0.1);
    background-size: cover;
    background-position: center;
    position: relative;
    transition: flex 0.5s ease;
}

.panel:last-child {
    border-right: none;
}

.panel:hover {
    flex: 1.5;
}

/* Placeholder colored gradients for University locations */
.panel-1 {
    background-image: url('../assets/images/uni_dorms.png');
}

/* Dorms */
.panel-2 {
    background-image: url('../assets/images/uni_quad.png');
}

/* Quad */
.panel-3 {
    background-image: url('../assets/images/uni_lab.png');
}

/* Lab */
.panel-4 {
    background-image: url('../assets/images/uni_lib.png');
}

/* Library */

/* Add CRT overlay specific to panels if desired, but general overlay covers it */

.hero-content {
    text-align: center;
    width: 100%;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--color-secondary);
}

.hero-title-uni {
    font-family: 'Graduate', serif !important;
    /* Force Graduate font */
    letter-spacing: 5px;
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* Glitch Effect Text */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 120px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(120px, 9999px, 140px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 40px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 80px, 0);
    }
}

/* Games Section */
.games-section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    /* Changed from inline-block with transform centering */
    padding-bottom: 0.5rem;
    /* Removed transform centering to fix animation conflict */
    /* To center an inline-block, parent needs text-align: center (which .container usually doesn't have by default, but we can rely on margin auto if we make it block or wrapped) */
    /* Or better: make it table/block and margin auto */
    display: table;
    margin-left: auto;
    margin-right: auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: var(--color-bg-alt);
    border: 1px solid #333;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.card-image-wrapper {
    height: 250px;
    background: #000;
    position: relative;
}

.game-placeholder-art {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.main-art {
    background: linear-gradient(45deg, #220033, #001133);
    background-image: url('../assets/images/uni_campus.png');
    position: relative;
}

.main-art::after {
    content: "SEXOLOGY";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.05);
    font-family: 'Orbitron';
    font-size: 2rem;
}

.upcoming-art {
    background: repeating-linear-gradient(45deg,
            #111,
            #111 10px,
            #222 10px,
            #222 20px);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.genre {
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.status {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* About Section */
.about-section {
    padding: var(--spacing-lg) 0;
    background: linear-gradient(to top, var(--color-bg-alt), var(--color-bg));
    position: relative;
    overflow: hidden;
}

/* Add a subtle grid detail behind about section for continuity */
.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

.about-content {
    max-width: 800px;
    /* Readability width */
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--color-text);
    position: relative;
    z-index: 1;
    border: 1px solid var(--color-primary);
    padding: 2rem;
    background: rgba(10, 10, 18, 0.8);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Team Section */
.team-section {
    padding: var(--spacing-lg) 0;
    background: linear-gradient(to top, var(--color-bg-alt), var(--color-bg));
}

.team-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.team-member {
    text-align: center;
}

.avatar {
    width: 120px;
    height: 120px;
    background: #222;
    border-radius: 50%;
    /* Circular avatars for team */
    margin: 0 auto 1rem;
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.team-member h4 {
    color: white;
    margin-bottom: 0.2rem;
}

.team-member p {
    color: var(--color-text-muted);
}

/* Footer */
.main-footer {
    padding: 3rem 0;
    border-top: 1px solid #333;
    margin-top: 4rem;
}

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

.footer-brand h5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.social-links a {
    margin-left: 1.5rem;
    color: var(--color-text-muted);
}

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

/* Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: white;
        transition: all 0.3s ease;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 18, 0.95);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--color-primary);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        /* Hidden by default */
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .hero-bg-grid {
        transform: perspective(200px) rotateX(60deg);
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .social-links a {
        margin: 0 0.8rem;
    }
}

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