:root {
    --bg-color: #0b0512;
    /* Deep dark purple/black */
    --text-color: #ffffff;
    --accent-pink: #ff0055;
    /* Hotter pink */
    --accent-blue: #00d4ff;
    /* Brighter blue */
    /* Dark reddish-brown hue for cards as seen in Image 2 */
    --card-bg: #1a0b14;
    --card-border: rgba(255, 42, 109, 0.1);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: #05010a;
    background: radial-gradient(circle at 50% 50%, #16052b 0%, #000000 100%);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

canvas#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(11, 5, 18, 0.95), transparent);
    backdrop-filter: blur(10px);
}

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

.logo {
    color: var(--accent-pink);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(255, 42, 109, 0.5), 0 0 30px rgba(255, 42, 109, 0.8);
}

.logo span {
    color: inherit;
    transition: text-shadow 0.3s ease;
}

.logo:hover span {
    text-shadow: 0 0 20px rgba(255, 42, 109, 1);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: #ddd;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-pink);
}

main {
    padding-top: 80px;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.hero .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.gradient-text {
    font-size: 6rem;
    line-height: 0.95;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #ff2a6d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(255, 42, 109, 0.4));
    animation: fadeIn 1.5s ease-out;
}

.hero-sub {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 3rem;
    animation: fadeIn 2s ease-out;
}

.cta-button {
    background: #ff0055;
    border: none;
    padding: 1rem 3rem;
    color: white;
    font-weight: 700;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.6);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeIn 2.5s ease-out;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(255, 0, 85, 0.8);
}

/* Sections General */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.pink {
    color: var(--accent-pink);
}

.blue {
    color: var(--accent-blue);
}

.section-subtitle {
    color: #888;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem;
    max-width: 700px;
    text-align: center;
    font-weight: 400;
}

.devlogs .divider {
    height: 3px;
    width: 80px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-blue));
    margin: 0 auto 4rem auto;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

@media (max-width: 768px) {
    section {
        padding: 56px 0;
    }
}

/* Vision Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background: var(--card-bg);
    border: none;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: left;
    transition: transform 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    background: #25101c;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: white;
    font-weight: 700;
}

.card p {
    color: #ccc;
    line-height: 1.7;
    font-size: 0.95rem;
}

@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Tools */
.tools h2 {
    font-size: 1.2rem;
    letter-spacing: 4px;
    /* Wide spacing */
    margin-bottom: 3rem;
    text-transform: uppercase;
    font-weight: 600;
}

.divider {
    height: 1px;
    width: 60px;
    background: var(--accent-pink);
    margin: -1rem auto 4rem auto;
    /* Centered margin */
    box-shadow: 0 0 10px var(--accent-pink);
}

/* Tools Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 2rem 0;
}

.marquee-content {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.tool-item {
    display: inline-block;
    font-size: 3rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    margin: 0 3rem;
    transition: all 0.3s;
    cursor: default;
    text-transform: uppercase;
}

.tool-item:hover {
    color: white;
    -webkit-text-stroke: 1px white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.team-card {
    background: #0f0b14;
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
    background: #25101c;
}

.avatar-circle {
    width: 140px;
    height: 140px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    min-height: 1.5em;
    /* Alignment */
}

.team-card .role {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    display: block;
}

/* Game Card */
.game-card.featured-layout {
    display: flex;
    flex-direction: row;
    background: #0f0b14;
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    align-items: stretch;
}

.game-image-col {
    flex: 1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-content-col {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    background: #0f0b14;
    z-index: 2;
}

.game-chip {
    display: inline-block;
    background: rgba(18, 50, 100, 0.5);
    color: #4da6ff;
    border: 1px solid rgba(77, 166, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    align-self: flex-start;
    box-shadow: none;
    position: static;
}

.game-content-col h3 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: white;
}

.game-content-col p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #bcc;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.trailer-btn {
    background: linear-gradient(90deg, #ff0055, #a200ff);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-transform: capitalize;
    align-self: flex-start;
    box-shadow: 0 10px 20px rgba(162, 0, 255, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.trailer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 0, 85, 0.4);
}

/* DevLogs */
.devlog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 24px;
}

.devlog-item {
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #110816;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.devlog-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Grid Organization */
.phase-1 {
    grid-column: span 2;
    grid-row: span 2;
}

.phase-2,
.phase-3,
.phase-4,
.phase-5,
.phase-6,
.phase-7,
.phase-8,
.phase-9 {
    grid-column: span 1;
    grid-row: span 1;
}

/* Entry Animation */
.devlog-item {
    animation: slideUpFade 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.devlog-item:nth-child(1) {
    animation-delay: 0.1s;
}

.devlog-item:nth-child(2) {
    animation-delay: 0.15s;
}

.devlog-item:nth-child(3) {
    animation-delay: 0.2s;
}

.devlog-item:nth-child(4) {
    animation-delay: 0.25s;
}

.devlog-item:nth-child(5) {
    animation-delay: 0.3s;
}

.devlog-item:nth-child(6) {
    animation-delay: 0.35s;
}

.devlog-item:nth-child(7) {
    animation-delay: 0.4s;
}

.devlog-item:nth-child(8) {
    animation-delay: 0.45s;
}

.devlog-item:nth-child(9) {
    animation-delay: 0.5s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Adjust row height to compensate for more items */
@media (max-width: 1200px) {
    .devlog-grid {
        grid-auto-rows: 240px;
    }
}

/* Overlay Styling */
.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(11, 5, 18, 0.95) 0%,
            rgba(11, 5, 18, 0.4) 40%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem 2rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(4px);
}

.overlay h4 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.overlay span {
    color: var(--accent-blue);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.05s;
}

/* Hover Effects */
.devlog-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.15);
}

.devlog-item:hover img {
    transform: scale(1.08);
}

.devlog-item:hover .overlay {
    opacity: 1;
}

.devlog-item:hover .overlay h4,
.devlog-item:hover .overlay span {
    transform: translateY(0);
}

footer {
    padding: 4rem;
    background: #05020a;
    text-align: center;
    color: #444;
    font-size: 0.9rem;
    border-top: none;
}

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

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

/* --- MODERN RESPONSIVE OVERHAUL --- */

/* Fluid Typography */
:root {
    --h1-size: clamp(3rem, 10vw, 6rem);
    --h2-size: clamp(2rem, 6vw, 3.5rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* Base Adjustments */
h1 {
    font-size: var(--h1-size);
}

h2 {
    font-size: var(--h2-size);
}

p {
    font-size: var(--body-size);
}

/* Improved Grid Systems */
.devlog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 24px;
}

/* Tablet Optimization (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .devlog-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 240px;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .phase-1 {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* Mobile Overhaul (768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    section {
        padding: 80px 0;
    }

    /* Header & Navigation */
    header {
        padding: 1rem 0;
        background: rgba(11, 5, 18, 0.98);
    }

    header .container {
        flex-direction: row;
        /* Keep logo and hamburger on same line */
        justify-content: space-between;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 1.5rem 0;
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    /* Hero Section */
    .hero {
        padding: 120px 0 60px 0;
    }

    .hero-sub {
        max-width: 100%;
        padding: 0 10px;
    }

    /* Featured Game */
    .game-card.featured-layout {
        flex-direction: column;
    }

    .game-image-col {
        min-height: 300px;
    }

    .game-content-col {
        padding: 3rem 2rem;
        text-align: center;
        align-items: center;
    }

    .game-content-col h3 {
        font-size: 2.4rem;
    }

    /* DevLogs - Modern 2 Column Grid */
    .devlog-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
        gap: 16px;
    }

    /* Symmetry fix for 9 items */
    .devlog-item:last-child:nth-child(odd) {
        grid-column: span 2;
        aspect-ratio: 2 / 1;
    }

    .devlog-item {
        aspect-ratio: 1 / 1;
        /* Perfect squares for mobile */
        border-radius: 20px;
    }

    .devlog-item .overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
        padding: 1.2rem;
    }

    .devlog-item .overlay h4 {
        font-size: 1rem;
        transform: translateY(0);
    }

    .devlog-item .overlay span {
        font-size: 0.7rem;
        transform: translateY(0);
    }

    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .team-card {
        padding: 2rem 1rem;
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
    }
}

/* Small Device Optimization (480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .devlog-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Keep 2 columns for symmetry */
        gap: 12px;
    }

    .devlog-item {
        border-radius: 16px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        /* Single column for readable team cards */
        max-width: 320px;
        margin: 0 auto;
    }

    .tool-item {
        font-size: 1.8rem;
        margin: 0 1.5rem;
    }

    .cta-button {
        width: 100%;
        padding: 1rem 2rem;
    }

    footer {
        padding: 3rem 1.5rem;
    }
}

/* Mobile Nav Toggle Button Styling */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}