:root {
    --primary: #ED04F5;
    --primary-dark: #b803be;
    --secondary: #AA71B8;
    --accent: #64327F;
    --dark-bg: #462359;
    --bg-deep: #0f0514;
    --bg-surface: rgba(70, 35, 89, 0.3);
    --text-main: #ffffff;
    --text-muted: #BCC8DC;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 2rem;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 5, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: radial-gradient(circle at top right, var(--dark-bg) 0%, var(--bg-deep) 60%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeIn 1s ease-out;
}

.hero-image {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.hero-mini {
    min-height: 40vh;
    padding-top: 120px;
    padding-bottom: 40px;
    text-align: center;
    background: radial-gradient(circle at top, var(--dark-bg) 0%, var(--bg-deep) 60%);
}

.hero-mini .hero-content {
    display: block;
    max-width: 800px;
    margin: 0 auto;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(237, 4, 245, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(237, 4, 245, 0.4);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Gallery */
.gallery {
    overflow-x: auto;
    display: flex;
    gap: 20px;
    padding: 20px 0 40px;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    min-width: 300px;
    flex: 1;
}

.gallery-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* Touch Control Section */
.touch-control {
    background: linear-gradient(to bottom, var(--bg-deep), var(--dark-bg));
    text-align: center;
}

.touch-demo {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
}

.touch-demo img {
    width: 100%;
    border-radius: 20px;
}

/* Footer */
footer {
    background: #000;
    padding: 60px 0 20px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

/* Instructions */
.instructions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    section {
        padding: 40px 0;
    }

    .hero-mini {
        padding-bottom: 10px;
    }

    /* Fix header overlap */
    .logo {
        font-size: 1rem;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Fix hero occlusion */
    .hero {
        padding-top: 140px;
        /* Increased padding */
        align-items: flex-start;
        /* Align top to avoid centering if content is long */
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 20px;
        max-width: 80%;
        /* Don't take full width to look better */
        margin-left: auto;
        margin-right: auto;
    }

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

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Guide Page Styles */
.alert-box {
    background: rgba(237, 4, 245, 0.1);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.guide-text h3 {
    color: var(--text-main);
    text-align: left;
    font-size: 1.5rem;
    margin-top: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

/* Sticky Image Layout */
.layout-sticky-side {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.sticky-image-container {
    position: sticky;
    top: 200px;
    /* Adjust based on header height */
    align-self: start;
}

@media (max-width: 768px) {
    .layout-sticky-side {
        grid-template-columns: 1fr;
    }

    .sticky-image-container {
        position: static;
        order: -1;
        /* Show image above text on mobile */
        margin-bottom: 20px;
    }
}