:root {
    --bg: #120224;
    --bg-soft: #1d0d36;
    --panel: rgba(25, 13, 52, 0.82);
    --panel-strong: rgba(37, 18, 74, 0.92);
    --text: #fef7ff;
    --muted: #d6c9f2;
    --line: rgba(255, 255, 255, 0.12);
    --primary: #ff7a18;
    --secondary: #7bffcf;
    --accent: #ff4fd8;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 79, 216, 0.18), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(123, 255, 207, 0.15), transparent 22%),
        linear-gradient(180deg, #160326 0%, #18082e 32%, #11031f 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(10, 3, 24, 0.74);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

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

.logo-text {
    font-family: 'Bungee', cursive;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.logo-labs {
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    color: var(--secondary);
}

.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: 3px;
    border-radius: 999px;
    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: 26px;
    height: 3px;
    background: var(--text);
    border-radius: 99px;
}

section {
    padding: 110px 0;
}

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

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

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

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

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

.title-main {
    font-family: 'Bungee', cursive;
    font-size: clamp(3rem, 8vw, 5.8rem);
    line-height: 0.95;
    color: transparent;
    background: linear-gradient(90deg, #ffeb7a, #ff7a18 35%, #ff4fd8 70%, #7bffcf);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 122, 24, 0.22);
}

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

.hero-description {
    max-width: 720px;
    margin: 28px auto 0;
    font-size: 1.08rem;
}

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

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #230019;
    box-shadow: 0 18px 35px rgba(255, 79, 216, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(123, 255, 207, 0.35);
    color: var(--text);
}

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

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

.shape {
    position: absolute;
    border-radius: 28px;
    opacity: 0.75;
    animation: float 7s ease-in-out infinite;
    filter: blur(1px);
}

.shape-1,
.shape-4 {
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.55), rgba(255, 79, 216, 0.2));
}

.shape-2,
.shape-5 {
    background: linear-gradient(135deg, rgba(123, 255, 207, 0.58), rgba(69, 183, 209, 0.18));
}

.shape-3 {
    background: linear-gradient(135deg, rgba(255, 235, 122, 0.4), rgba(255, 122, 24, 0.18));
}

.shape-1 { width: 130px; height: 130px; top: 16%; left: 8%; transform: rotate(12deg); }
.shape-2 { width: 180px; height: 180px; top: 20%; right: 10%; border-radius: 50%; animation-delay: 1s; }
.shape-3 { width: 90px; height: 90px; bottom: 18%; left: 14%; animation-delay: 2s; }
.shape-4 { width: 150px; height: 150px; bottom: 12%; right: 18%; animation-delay: 3s; }
.shape-5 { width: 70px; height: 70px; top: 52%; left: 48%; border-radius: 50%; animation-delay: 4s; }

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

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

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

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

.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,
.team-member,
.contact-info,
.contact-form {
    background: var(--panel);
    border-radius: 28px;
    padding: 28px;
}

.card-icon,
.contact-item i {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.18), rgba(123, 255, 207, 0.18));
    color: var(--secondary);
    margin-bottom: 18px;
    font-size: 1.3rem;
}

.game-demo-section {
    margin: 20px 0 34px;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(34, 16, 68, 0.92), rgba(15, 6, 31, 0.96));
}

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

.game-stats span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.game-container {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #12071f;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: radial-gradient(circle at top, #33104f, #12071f 72%);
}

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

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

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

.game-image-1 { background: linear-gradient(145deg, #ff8d3c, #ff4fd8); }
.game-image-2 { background: linear-gradient(145deg, #00c2ff, #0047ff); }
.game-image-3 { background: linear-gradient(145deg, #7bffcf, #00a76f); }

.games-grid .game-overlay {
    width: 100%;
    padding: 22px;
    border-radius: 22px;
    background: rgba(14, 8, 26, 0.82);
}

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

.avatar-1 { background: linear-gradient(135deg, #ff7a18, #ff4fd8); }
.avatar-2 { background: linear-gradient(135deg, #7bffcf, #00c2ff); }
.avatar-3 { background: linear-gradient(135deg, #ffeb7a, #ff7a18); }

.contact-content {
    grid-template-columns: 0.95fr 1.05fr;
}

.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: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.64);
}

.footer {
    margin: 0 20px 20px;
    border-radius: 28px;
    padding: 34px 0 22px;
    background: rgba(10, 4, 21, 0.92);
}

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

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

.social-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

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

.fade-in {
    opacity: 0;
    transform: translateY(26px);
    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: #120224;
    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.18);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

@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: 72px;
        left: 20px;
        right: 20px;
        padding: 18px;
        border-radius: 20px;
        background: rgba(15, 5, 29, 0.95);
        border: 1px solid var(--line);
        flex-direction: column;
        display: none;
    }

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

    .hamburger {
        display: flex;
    }

    .title-main {
        line-height: 1;
    }
}
