/* --- Variables & Reset --- */
:root {
    --primary-bg: #050505;
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom one */
}

body {
    background-color: var(--primary-bg);
    color: var(--text-white);
    font-family: var(--font-main);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Custom Cursor --- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--neon-blue);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--neon-purple);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out;
}

/* --- Layout Utilities --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.line-break {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    margin: 1rem auto;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(5px);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.accent-text {
    color: var(--neon-blue);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--neon-blue);
}

/* --- Hero Section --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #050505 80%);
    z-index: -2;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    perspective: 500px;
    transform-origin: top;
    transform: rotateX(60deg);
    animation: gridMove 10s linear infinite;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
}

@keyframes gridMove {
    0% {
        transform: rotateX(60deg) translateY(0);
    }

    100% {
        transform: rotateX(60deg) translateY(50px);
    }
}

.glitch {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 700;
    position: relative;
    color: var(--text-white);
    letter-spacing: 5px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-purple);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-blue);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(13px, 9999px, 81px, 0);
    }

    20% {
        clip: rect(86px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(25px, 9999px, 96px, 0);
    }

    60% {
        clip: rect(9px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(54px, 9999px, 32px, 0);
    }

    100% {
        clip: rect(76px, 9999px, 11px, 0);
    }
}

.hero-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin: 1rem 0 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Buttons --- */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    /* Ensure consistent box model */
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.primary-btn {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    box-shadow: 0 0 40px rgba(188, 19, 254, 0.5);
    transform: translateY(-3px);
}

.secondary-btn {
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    background: transparent;
    margin-left: 0;
    /* Removed margin since we use flex gap */
}

.secondary-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.sm-btn {
    padding: 0.8rem 2rem;
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.sm-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue);
}

/* --- Services --- */
#services,
#work,
#community,
#contact,
#about {
    padding: 8rem 5%;
}

.about-panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
    text-align: center;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.service-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
}

.icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

/* --- Our Work --- */
.subsection-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    /* White title */
    margin-bottom: 3rem;
    padding-left: 1.5rem;
    border-left: 5px solid var(--neon-blue);
    text-transform: uppercase;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.game-card {
    height: 450px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    border: 1px solid var(--glass-border);
}

.game-image {
    flex-grow: 1;
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.img-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    transform: rotate(-15deg);
}

.card-info {
    padding: 2rem;
    background: rgba(10, 10, 10, 0.9);
    border-top: 1px solid var(--glass-border);
}

.apps-grid {
    display: flex;
    overflow-x: auto;
    gap: 4rem;
    padding: 2rem 0;
    scrollbar-width: none;
    /* Firefox */
}

.apps-grid::-webkit-scrollbar {
    display: none;
    /* Chrome */
}

.app-card {
    min-width: 300px;
    padding: 0;
    text-align: center;
    background: transparent;
    border: none;
}

.phone-frame {
    width: 250px;
    height: 500px;
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    margin: 0 auto 2rem;
    background: #000;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 25px;
    background: #1a1a1a;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

.app-card:hover .phone-frame {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 243, 255, 0.2);
    border-color: #333;
}

.screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a2a6c, #b21f1f, #fdbb2d);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Community --- */
#community {
    text-align: center;
    max-width: 1000px;
    margin: 6rem auto;
    padding: 6rem;
    background: radial-gradient(circle at center, rgba(188, 19, 254, 0.1) 0%, rgba(5, 5, 5, 0) 70%);
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 6rem;
    margin: 4rem 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.label {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-links {
    margin-top: 3rem;
}

.social-btn {
    margin: 0 20px;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-btn:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 10px var(--neon-purple);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 6rem 5% 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020202;
}

.footer-content .btn {
    margin-top: 2rem;
}

.copyright {
    margin-top: 4rem;
    color: #444;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- Mobile Nav --- */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.line {
    width: 30px;
    height: 3px;
    background: white;
    margin: 6px;
    transition: 0.3s;
}

/* Hamburger Animation */
.nav-active .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-active .line:nth-child(2) {
    opacity: 0;
}

.nav-active .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 100vh;
        background: #000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 1000;
    }

    .nav-links li {
        opacity: 0;
    }

    .nav-active .nav-links {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    .hamburger {
        display: block;
    }

    .glitch {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats-row {
        flex-direction: column;
        gap: 3rem;
    }

    #hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
    }
}