/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-app-store {
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

.btn-app-store:hover {
    transform: scale(1.05);
}

.btn-app-store img {
    height: 54px;
    width: auto;
    display: block;
}

/* Ensure App Store badge isn't clipped by generic .btn styles */
.btn.btn-app-store {
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    border-radius: 12px;
    cursor: pointer;
}

.btn.btn-app-store::before {
    display: none;
}

.btn.btn-app-store:hover {
    transform: translateY(-1px) scale(1.03);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    font-size: 2rem;
}

.logo-icon-img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--text-primary);
}

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: slideInRight 1s ease-out;
    z-index: 3;
    /* ensure above background orbs */
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: transparent;
    /* remove frame */
    border-radius: 0;
    padding: 0;
    /* no gutter */
    box-shadow: none;
    /* no outer shadow */
    position: relative;
    transform: none;
    /* no 3D tilt */
    transition: var(--transition);
}

.phone-mockup:hover {
    transform: none;
    /* keep static */
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: transparent;
    /* no frame */
    border-radius: 0;
    overflow: visible;
    /* allow glow to be visible outside */
    position: relative;
    z-index: 2;
}

.app-preview {
    padding: 0;
    /* maximize screenshot size, no border/stroke */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-screenshot {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(99, 102, 241, 0.50), 0 18px 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

/* glow halo */
.hero-screenshot::before {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 28px;
    background: radial-gradient(60% 60% at 50% 50%, rgba(99, 102, 241, 0.55), rgba(139, 92, 246, 0.35), transparent 70%);
    filter: blur(24px);
    z-index: -1;
}

.preview-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.preview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* floating elements removed */

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: pulse 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -150px;
    right: -150px;
    animation-delay: 2s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #f59e0b;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* Features Section */
.features {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Games Section */
.games {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.game-card:hover::after {
    opacity: 0.05;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.game-card>* {
    position: relative;
    z-index: 2;
}

.game-icon {
    font-size: 0;
    /* hide inline spacing when using images */
    margin-bottom: 1.5rem;
}

.game-card h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.game-icon-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.game-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.game-example {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    font-style: italic;
    color: var(--text-secondary);
}

.games-note {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* Screenshots Section */
.screenshots {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.screenshots-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    justify-items: center;
}

.screenshot-placeholder {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 200px;
    height: 400px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 25px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.phone-frame:hover {
    transform: translateY(-10px) scale(1.05);
}

.screen-content {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.screen-content h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.screen-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Download Section */
.download {
    padding: 8rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.05;
    z-index: 1;
}

.download-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.download-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.download-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    margin-top: 1.25rem;
    margin-bottom: 3rem;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.info-icon {
    font-size: 1.25rem;
}

/* Left-side checklist like the reference layout */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
}

.list-bullet {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    display: inline-block;
}

/* Download grid layout */
.download-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
}

.download-left {
    text-align: left;
    position: relative;
    z-index: 5;
    /* ensure above any overlays */
}

.download-left h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    /* space under heading */
    padding-bottom: 0.25rem;
}

.download-left p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.download-right {
    display: flex;
    justify-content: center;
}

.download-visual {
    width: 300px;
    /* match hero image width */
    height: 600px;
    max-width: 100%;
}

.download-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(99, 102, 241, 0.35), 0 10px 30px rgba(0, 0, 0, 0.55);
}

@media (max-width: 900px) {
    .download-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .download-left {
        text-align: center;
    }

    .download-left h2 {
        font-size: 2.5rem;
    }

    .download-info {
        justify-content: center;
    }

    .download-visual {
        width: 250px;
        height: 500px;
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon-img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    /* Mobile nav menu: off-canvas panel */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        display: flex;
        /* ensure it's visible when sliding in */
        flex-direction: column;
        background-color: rgba(10, 10, 10, 0.95);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(20px);
        padding: 2rem 0;
        z-index: 1001;
        /* above navbar */
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hamburger animation */
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .download-info {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
        transform: none;
    }

    .phone-mockup:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .feature-card,
    .game-card {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {

    .feature-card,
    .game-card,
    .phone-frame {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease-out forwards;
    }

    .feature-card:nth-child(2n) {
        animation-delay: 0.1s;
    }

    .feature-card:nth-child(3n) {
        animation-delay: 0.2s;
    }

    .game-card:nth-child(2n) {
        animation-delay: 0.15s;
    }

    .game-card:nth-child(3n) {
        animation-delay: 0.3s;
    }

    .phone-frame:nth-child(2n) {
        animation-delay: 0.2s;
    }

    .phone-frame:nth-child(3n) {
        animation-delay: 0.4s;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Legal pages */
.legal {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.legal .prose {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.legal h1 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.legal h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.legal p,
.legal li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal a {
    color: var(--accent-primary);
    text-decoration: none;
}

.legal a:hover {
    text-decoration: underline;
}