/* Global Styles & Variables */
:root {
    --bg-color: #0d0d0d;
    --card-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary-color: #ff5722; /* Deep Orange */
    --primary-hover: #ff8a50;
    --secondary-color: #2196f3; /* Blue for accents */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --transition-speed: 0.3s;
    --spacing-section: 100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: #fff;
}

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

/* Utilities */
.section {
    padding: var(--spacing-section) 0;
}

.bg-darker {
    background-color: #080808;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: black;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.8rem;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Header & Nav */
header {
    background-color: rgba(13, 13, 13, 0.95);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.logo img {
    height: 40px;
    width: auto;
}

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

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-icon {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-icon span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: #0b0b0b;
    background-image:
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    animation: gradientBG 15s ease infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(33, 150, 243, 0.1) 0%, rgba(13,13,13,0.8) 70%, rgba(13,13,13,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-short {
    height: 50vh;
}

.white-text-stat {
    color: white;
    margin-top: 10px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    background: linear-gradient(45deg, #fff, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 4s ease-in-out infinite;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #ddd;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    display: table; /* Centers the element while shrinking to fit content */
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Games Carousel */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    margin: 0 40px; /* Space for buttons */
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease-in-out;
}

.game-card {
    flex: 0 0 calc(50% - 15px); /* 2 items visible by default */
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.carousel-btn {
    background-color: transparent;
    border: 1px solid #333;
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 10;
}

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

.prev-btn { left: 0; }
.next-btn { right: 0; }

@media (max-width: 768px) {
    .game-card {
        flex: 0 0 100%; /* 1 item visible on mobile */
    }
}

.game-image-placeholder {
    width: 100%;
    height: 220px;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    background-image: linear-gradient(45deg, #1a1a1a 25%, #222 25%, #222 50%, #1a1a1a 50%, #1a1a1a 75%, #222 75%, #222 100%);
    background-size: 20px 20px;
}

.game-info {
    padding: 25px;
}

.game-genre {
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    min-height: 60px;
}

.platform-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    font-size: 0.75rem;
    background-color: #333;
    padding: 3px 8px;
    border-radius: 3px;
    color: #ccc;
}

/* About & Stats */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.mission-statement {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 40px;
    background-color: rgba(255,255,255,0.02);
    border-left: 3px solid var(--primary-color);
}

.mission-statement h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.mission-statement p {
    font-style: italic;
    font-size: 1.1rem;
    color: #fff;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: bold;
    animation: pulse 2s ease-in-out infinite;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

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

.member-photo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: #222;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #444;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.team-member:hover .member-photo-placeholder {
    transform: scale(1.05);
}

.role {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.section-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.news-card:hover {
    border-left-color: var(--primary-color);
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.news-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.9rem;
    color: #fff;
    font-weight: bold;
}

.read-more:hover {
    color: var(--primary-color);
}

/* Community Banner */
.community-banner {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('assets/images/hero-bg.jpg'); /* Reuse bg */
    background-attachment: fixed;
    background-size: cover;
    text-align: center;
}

.community-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-discord {
    background-color: #5865F2; /* Discord Color */
    color: white;
}

.btn-discord:hover {
    background-color: #4752c4;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: white;
    border-radius: 4px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

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

/* Footer */
footer {
    background-color: #050505;
    padding: 60px 0 20px;
    border-top: 1px solid #222;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
    color: #888;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #888;
    font-size: 1.2rem;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #111;
    color: #555;
    font-size: 0.9rem;
}

/* Game Template Styles */
.game-hero {
    height: 70vh;
    display: flex;
    align-items: center;
    background-color: #050505;
    background-image:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.9)),
        radial-gradient(circle at 50% 50%, rgba(255, 87, 34, 0.2), transparent 60%),
        repeating-linear-gradient(45deg, #111 0, #111 1px, transparent 0, transparent 50%);
    background-size: cover, cover, 20px 20px;
    padding-top: 80px;
    position: relative;
    justify-content: center; /* Center content */
    text-align: center;      /* Center text */
}

.game-hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.game-about .sidebar {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
}

.game-info-card ul {
    margin-bottom: 20px;
}

.game-info-card li {
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    font-size: 0.9rem;
}

.game-info-card strong {
    color: var(--primary-color);
}

.feature-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.feature-list li {
    margin-bottom: 10px;
}

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

.placeholder-img {
    background-color: #222;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
}

.specs-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
}

.spec-col ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #ccc;
}

.game-cta-banner {
    padding: 80px 0;
}

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

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Staff Section */
.meet-the-staff {
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.subsection-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

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

.staff-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

.staff-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: white;
}

.staff-title {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.staff-bio {
    color: #ccc;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-icon {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(13, 13, 13, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        transform: translateY(-200%);
        transition: transform 0.3s ease-in-out;
        border-bottom: 1px solid #333;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid, .specs-table {
        grid-template-columns: 1fr;
    }

    .cta-group {
        flex-direction: column;
    }
}

/* Lexomancy Theme */
@font-face {
    font-family: 'CCNearMyth';
    src: url('assets/fonts/CCNearMyth-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --lex-purple: #9c27b0;
    --lex-magenta: #e91e63;
    --lex-cyan: #00bcd4;
    --lex-platinum: #e5e4e2;
}

.lexomancy-page {
    --primary-color: var(--lex-magenta); /* Override for this page */
    --font-heading: 'IM Fell English', serif;
    --font-body: 'Alegreya', serif;
    font-family: var(--font-body);
}

.lexomancy-page .game-hero {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(156, 39, 176, 0.2), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 188, 212, 0.2), transparent 50%),
        linear-gradient(rgba(13, 13, 13, 0.8), rgba(13, 13, 13, 1));
}

.lexomancy-page h1, .lexomancy-page h2, .lexomancy-page h3 {
    color: var(--lex-platinum);
    text-shadow: 0 0 5px rgba(229, 228, 226, 0.2);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-weight: normal; /* IM Fell English is naturally bold */
    font-style: italic;
}

/* Specific override for the main title using the custom font */
.lexomancy-page .game-hero h1 {
    font-family: 'CCNearMyth', var(--font-heading);
    font-style: normal;
    font-size: 5rem;
    text-shadow: 0 0 10px rgba(229, 228, 226, 0.5);
}

/* Flat, front-facing fantasy card border style */
.lex-card-border {
    position: relative;
    border: 1px solid rgba(229, 228, 226, 0.3); /* Thin platinum */
    background: #111;
    padding: 2px; /* Inner gap */
}

.lex-card-border .inner-content {
    border: 1px solid rgba(229, 228, 226, 0.1);
    background: #151515;
    height: 100%;
}

/* Corner Accents */
.lex-card-border::before, .lex-card-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid transparent;
    pointer-events: none;
}

.lex-card-border::before {
    top: 0; left: 0;
    border-top-color: var(--lex-cyan);
    border-left-color: var(--lex-purple);
}

.lex-card-border::after {
    bottom: 0; right: 0;
    border-bottom-color: var(--lex-magenta);
    border-right-color: var(--lex-purple);
}

/* Apply to specific elements on the Lexomancy page */
.lexomancy-page .game-info-card {
    border: 1px solid rgba(229, 228, 226, 0.3);
    position: relative;
}

.lexomancy-page .game-info-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border: 1px solid transparent;
    background: linear-gradient(45deg, var(--lex-cyan), var(--lex-purple), var(--lex-magenta)) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.lexomancy-page .btn-primary {
    background: linear-gradient(135deg, var(--lex-purple), var(--lex-magenta));
    border: 1px solid var(--lex-platinum);
    color: #fff;
}

.lexomancy-page .btn-primary:hover {
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.5);
    transform: translateY(-2px);
}

.lexomancy-page .feature-list li strong {
    color: var(--lex-cyan);
}

/* Karen Simulator Theme */
:root {
    --karen-pink: #ff69b4;
    --karen-teal: #00ced1;
    --karen-yellow: #ffd700;
    --karen-black: #111;
}

.karen-page {
    --primary-color: var(--karen-pink);
    --font-heading: 'Bangers', cursive;
    --font-body: 'Roboto', sans-serif;
    color: #f0f0f0;
}

.karen-page h1, .karen-page h2, .karen-page h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    text-shadow: 3px 3px 0px var(--karen-black);
    -webkit-text-stroke: 1px var(--karen-black);
}

.karen-page .game-hero {
    background:
        repeating-linear-gradient(
            45deg,
            var(--karen-black),
            var(--karen-black) 10px,
            #222 10px,
            #222 20px
        );
    border-bottom: 5px solid var(--karen-black);
}

.karen-page .game-hero h1 {
    font-size: 5rem;
    color: var(--karen-yellow);
    text-shadow: 5px 5px 0px var(--karen-pink);
    transform: rotate(-2deg);
}

.karen-page .btn-primary {
    background-color: var(--karen-teal);
    border: 3px solid var(--karen-black);
    color: var(--karen-black);
    box-shadow: 5px 5px 0px var(--karen-pink);
    text-shadow: none;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.karen-page .btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px var(--karen-pink);
    background-color: #fff;
}

.karen-page .game-info-card {
    border: 3px solid var(--karen-black);
    background-color: #fff;
    color: var(--karen-black);
    box-shadow: 10px 10px 0px var(--karen-teal);
}

.karen-page .game-info-card h3,
.karen-page .game-info-card li,
.karen-page .game-info-card strong {
    color: var(--karen-black);
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.karen-page .feature-list li strong {
    color: var(--karen-yellow);
    text-shadow: 1px 1px 0 #000;
}

.karen-page .gallery-item {
    border: 3px solid var(--karen-black);
    background-color: #fff;
    padding: 10px;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.5);
    transform: rotate(1deg);
    transition: transform 0.3s ease;
}

.karen-page .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid #000;
}

.karen-page .gallery-item:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.karen-page .gallery-item:nth-child(even) {
    transform: rotate(-1deg);
}

.karen-page .game-about p {
    font-size: 1.1rem;
}
