:root {
    --font-inter: 'Inter', -apple-system, sans-serif;
    --bg-gradient: linear-gradient(130deg, #b2caff 0%, #82a3ff 30%, #a4b4fc 60%, #7e8dfc 100%);
    --ide-bg: #101010;
    --ide-sidebar: #18181a;
    --ide-border: rgba(255, 255, 255, 0.08);
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: var(--font-inter);
    background: #000;
    /* Pure black background base */
    min-height: 100vh;
    color: #000;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.page-wrapper {
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

.bg-blur {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 75% 35%, rgba(200, 220, 255, 0.7) 0%, transparent 40%),
        radial-gradient(circle at 25% 65%, rgba(160, 180, 255, 0.5) 0%, transparent 45%);
    filter: blur(80px);
    z-index: -3;
    pointer-events: none;
}

.decor {
    position: absolute;
    color: rgba(255, 255, 255, 0.25);
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 2px;
    line-height: 1.8;
    z-index: -1;
    pointer-events: none;
}

.decor-1 {
    top: 15%;
    left: 5%;
    transform: scale(0.9);
}

.decor-2 {
    top: 25%;
    right: 10%;
    text-align: right;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mark {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 2px solid white;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem 5rem;
}

.hero-logo {
    width: 120px;
    border-radius: 20%;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.app-icon {
    width: 88px;
    height: 88px;
    background: white;
    border-radius: 22px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.app-icon-cloud {
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.25rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 600;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(0, 0, 0, 0.8);
    max-width: 550px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.chevron {
    font-size: 0.6rem;
    opacity: 0.8;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.85rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* IDE Container */
.ide-wrapper {
    max-width: 1050px;
    margin: 0 auto;
    background: var(--ide-bg);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex;
    height: 520px;
    color: #e5e5e5;
    overflow: hidden;
}

.ide-sidebar {
    width: 240px;
    background: var(--ide-sidebar);
    border-right: 1px solid var(--ide-border);
    padding: 1.25rem 1rem;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.9;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section {
    font-size: 0.7rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0.5rem;
}

.sidebar-section:first-child {
    margin-top: 0;
}

.sidebar-menu li {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #e5e5e5;
}

.sidebar-menu li .icon {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sidebar-menu li:hover .icon {
    opacity: 0.8;
}

.sidebar-menu li.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 500;
}

.sidebar-menu li.active .icon {
    opacity: 1;
}

.ide-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ide-header {
    height: 54px;
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    background: rgba(255, 255, 255, 0.02);
}

.header-left {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-path {
    color: #a1a1aa;
    border-left: 1px solid var(--ide-border);
    padding-left: 1rem;
    font-family: monospace;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.changes-text {
    font-size: 0.8rem;
    color: #a1a1aa;
    margin-right: 0.5rem;
}

.ide-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.ide-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Chat Window */
.ide-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Custom Dark Scrollbar for IDE */
.ide-content::-webkit-scrollbar {
    width: 8px;
}

.ide-content::-webkit-scrollbar-track {
    background: transparent;
}

.ide-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ide-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-bubble {
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.6;
}

.chat-user {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    align-self: flex-start;
    color: #e5e5e5;
}

.chat-ai {
    align-self: flex-start;
    width: 100%;
}

.typewriter-text {
    color: #a1a1aa;
}

/* Embedded Demo */
.game-view {
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 100%;
    margin-top: 1rem;
    transition: opacity 0.5s ease;
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.demo-copy {
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 0.75rem;
    color: #a1a1aa;
    text-transform: uppercase;
    font-weight: 600;
}

.demo-copy strong {
    font-size: 1.5rem;
    color: #fff;
    display: block;
    margin-top: 0.35rem;
}

.demo-copy p {
    margin: 0.55rem 0 0;
    color: #a1a1aa;
    max-width: 520px;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.status {
    font-size: 0.85rem;
    color: #a1a1aa;
    margin: 0 0 1rem 0;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.embed-wrap {
    background: #000;
    border: 1px solid var(--ide-border);
    border-radius: 8px;
    padding: 0.5rem;
    overflow: hidden;
}

.game-embed {
    width: 100%;
    min-height: 1100px;
    border: 0;
    display: block;
    background: #09050d;
}

/* Fullscreen Mode */
@keyframes fullscreenExpand {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.game-embed.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    background: #09050d;
    animation: fullscreenExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.exit-fullscreen-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.exit-fullscreen-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.exit-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Background video and foreground canvas */
.pointer-events-none {
    pointer-events: none;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.text-white-80 {
    color: rgba(255, 255, 255, 0.8);
}

.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    object-fit: cover;
    opacity: 1;
    mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
}

#ascii-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease;
    mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
}

.footer-cta {
    text-align: center;
    padding: 8rem 2rem 5rem;
    color: #fff;
}

.footer-cta h2 {
    font-size: 2.2rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.footer-cta p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

@media (max-width: 900px) {
    .navbar {
        padding: 1.2rem 1rem;
    }

    .hero {
        padding: 2.25rem 1rem 3rem;
    }

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

    .hero-actions,
    .demo-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ide-wrapper {
        height: auto;
        margin: 0 12px;
        flex-direction: column;
    }

    .ide-sidebar {
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ide-border);
    }

    .ide-content {
        padding: 1rem;
    }

    .chat-bubble {
        max-width: 100%;
    }

    .game-embed {
        min-height: 1500px;
    }
}