:root {
    --bg: #07111e;
    --bg-soft: #0f1b29;
    --panel: rgba(10, 20, 31, 0.8);
    --panel-strong: rgba(8, 16, 26, 0.92);
    --text: #edf3f7;
    --muted: #b1c1cb;
    --line: rgba(197, 222, 237, 0.12);
    --primary: #6de0ff;
    --secondary: #4ee0a1;
    --accent: #ffb65f;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(109, 224, 255, 0.12), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(78, 224, 161, 0.12), transparent 24%),
        linear-gradient(180deg, #07111e 0%, #0a1724 40%, #050d16 100%);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container,
.nav-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(6, 15, 24, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-container {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo,
.footer-logo {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.logo-text,
.title-main {
    font-family: 'Chakra Petch', sans-serif;
}

.logo-text {
    color: var(--primary);
    letter-spacing: 0.08em;
    font-size: 1.4rem;
}

.logo-labs {
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    color: var(--muted);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-link {
    position: relative;
    font-weight: 700;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.25s ease;
}

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

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

.bar {
    width: 24px;
    height: 2px;
    background: var(--text);
}

section {
    padding: 112px 0;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(880px, calc(100% - 40px));
    margin: 0 auto;
    text-align: center;
}

.eyebrow,
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    color: var(--secondary);
    margin-bottom: 14px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.title-line {
    font-size: 1rem;
    color: var(--muted);
}

.title-main {
    font-size: clamp(3rem, 8vw, 5.6rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.title-sub,
.hero-description,
.section-subtitle {
    color: var(--muted);
}

.hero-description {
    max-width: 760px;
    margin: 24px auto 0;
    font-size: 1.05rem;
}

.hero-buttons,
.game-controls,
.game-stats,
.social-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-buttons {
    justify-content: center;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #05212b;
    box-shadow: 0 18px 36px rgba(78, 224, 161, 0.18);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(109, 224, 255, 0.2);
    color: var(--text);
}

.btn-small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.9rem;
}

.hero-background,
.floating-shapes {
    position: absolute;
    inset: 0;
}

.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    animation: float 8s ease-in-out infinite;
}

.shape-1 { width: 140px; height: 140px; top: 16%; left: 8%; transform: rotate(15deg); }
.shape-2 { width: 200px; height: 200px; top: 18%; right: 8%; border-radius: 50%; animation-delay: 1s; }
.shape-3 { width: 80px; height: 80px; bottom: 16%; left: 18%; transform: rotate(45deg); animation-delay: 2s; }
.shape-4 { width: 160px; height: 160px; bottom: 14%; right: 18%; transform: rotate(18deg); animation-delay: 3s; }
.shape-5 { width: 60px; height: 60px; top: 54%; left: 48%; border-radius: 50%; animation-delay: 4s; }

.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

.section-header {
    max-width: 760px;
    margin-bottom: 34px;
}

.about-text,
.games-grid,
.team-grid,
.contact-content,
.footer-content {
    display: grid;
    gap: 24px;
}

.about-text,
.games-grid,
.team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-card,
.game-demo-section,
.game-card,
.team-member,
.contact-info,
.contact-form,
.footer {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.about-card,
.team-member,
.contact-info,
.contact-form {
    background: var(--panel);
    border-radius: 20px;
    padding: 30px;
}

.card-icon,
.contact-item i {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(109, 224, 255, 0.14), rgba(78, 224, 161, 0.14));
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.game-demo-section {
    margin: 20px 0 34px;
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(12, 23, 36, 0.98), rgba(7, 15, 24, 0.98));
}

.game-demo-header {
    margin-bottom: 18px;
}

.game-stats span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.game-container {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #06111b;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(180deg, #0d1d2a, #06111b);
}

.game-container .game-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(5, 12, 20, 0.58);
    text-align: center;
}

.games-grid .game-card {
    min-height: 300px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--panel-strong);
}

.game-image {
    position: relative;
    height: 100%;
    padding: 20px;
    display: flex;
    align-items: end;
}

.game-image-1 { background: linear-gradient(145deg, #11273c, #0a4765); }
.game-image-2 { background: linear-gradient(145deg, #132a2a, #0d5c4c); }
.game-image-3 { background: linear-gradient(145deg, #231d17, #6f4e2e); }

.games-grid .game-overlay {
    width: 100%;
    padding: 22px;
    border-radius: 16px;
    background: rgba(4, 11, 18, 0.84);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.avatar-1 { background: linear-gradient(135deg, #0a4765, #6de0ff); }
.avatar-2 { background: linear-gradient(135deg, #0d5c4c, #4ee0a1); }
.avatar-3 { background: linear-gradient(135deg, #6f4e2e, #ffb65f); }

.contact-content {
    grid-template-columns: 0.92fr 1.08fr;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.form-group + .form-group {
    margin-top: 16px;
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: rgba(237, 243, 247, 0.48);
}

.footer {
    margin: 0 20px 20px;
    border-radius: 22px;
    padding: 36px 0 22px;
    background: rgba(5, 12, 20, 0.94);
}

.footer-content {
    grid-template-columns: 1.3fr 0.8fr 0.8fr;
}

.footer-section ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.social-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #07111e;
    z-index: 2000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 68px;
    height: 68px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(5deg); }
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(6px, 6px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .about-text,
    .games-grid,
    .team-grid,
    .contact-content,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: absolute;
        top: 74px;
        left: 20px;
        right: 20px;
        padding: 18px;
        border-radius: 16px;
        background: rgba(6, 15, 24, 0.98);
        border: 1px solid var(--line);
        flex-direction: column;
        display: none;
    }

    .nav-menu.active,
    .hamburger.active + .nav-menu {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}
