/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --bg-color: #0f172a;
    --text-color: #cbd5e1;
    --text-muted-color: #94a3b8;
    --border-color: #334155;
    --card-bg-color: rgba(15, 23, 42, 0.8);
    --neon-cyan: #22d3ee;
    --neon-rose: #fb7185;
    --font-family: 'Vazirmatn', sans-serif;
}

/* Base and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    color: #ffffff;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--text-muted-color); }
.small-text { font-size: 0.9rem; }

/* Layout */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.state-container {
    width: 100%;
    max-width: 56rem; /* 896px */
    transition: opacity 0.5s ease;
}

/* Neon Button */
.btn-neon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem 1.8rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: transparent;
    border: 2px solid;
    cursor: pointer;
}

.btn-neon-cyan {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan), 0 0 5px var(--neon-cyan) inset;
    text-shadow: 0 0 5px var(--neon-cyan);
}
.btn-neon-cyan:hover {
    color: var(--bg-color);
    background-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}
.btn-neon-rose {
    border-color: var(--neon-rose);
    color: var(--neon-rose);
    box-shadow: 0 0 5px var(--neon-rose), 0 0 5px var(--neon-rose) inset;
    text-shadow: 0 0 5px var(--neon-rose);
}
.btn-neon-rose:hover {
    color: var(--bg-color);
    background-color: var(--neon-rose);
    box-shadow: 0 0 20px var(--neon-rose), 0 0 40px var(--neon-rose);
}

/* Initial State */
#initial-state .icon-wrapper {
    margin-bottom: 1.5rem;
}
#initial-state .icon-wrapper i {
    font-size: 4.5rem;
    color: var(--neon-cyan);
}
#initial-state h1 { margin-bottom: 1rem; }
#initial-state p { max-width: 42rem; margin-left: auto; margin-right: auto; }
#initial-state button { margin-top: 1rem; }

/* QR State */
.card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
}
.qr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}
@media (min-width: 768px) {
    .qr-grid {
        grid-template-columns: 1fr 1fr;
        text-align: right;
    }
}
.qr-code-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
#qrcode-container-wrapper {
    background-color: #ffffff;
    padding: 0.5rem;
    border-radius: 1rem;
    display: inline-block;
}
#qrcode-container img {
    display: block;
    border-radius: 0.8rem;
}
.button-group {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}
.button-group .btn-neon {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

/* Instructions */
.instructions-section h3 {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    margin-bottom: 1rem;
}
.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.instruction-item i {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    padding-top: 0.25rem;
}
.animate-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Video Section */
.video-wrapper {
    width: 100%;
    max-width: 64rem; /* 1024px */
    margin-top: 2.5rem;
    transition: opacity 0.5s ease;
}
.video-container {
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 1rem;
    overflow: hidden;
    border: 4px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.video-controls {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Menu */
.menu-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    color: var(--neon-cyan);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}
.menu-toggle:hover {
    background-color: #334155;
}
.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 980;
    transition: opacity 0.3s ease-in-out;
}
.menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 18rem; /* 288px */
    background-color: var(--bg-color);
    border-right: 1px solid #1e293b;
    z-index: 990;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.menu-panel.is-active {
    transform: translateX(0);
}
.menu-content {
    padding: 1.5rem;
}
.menu-content h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.menu-content ul {
    list-style: none;
}
.menu-content ul a {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.menu-content ul a:hover {
    color: var(--neon-cyan);
    background-color: #1e293b;
    text-decoration: none;
}
.menu-content ul a i {
    width: 1.5rem;
    text-align: center;
}

/* Footer */
footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

/* Utility Classes for JS */
.hidden { display: none !important; }
.opacity-0 { opacity: 0 !important; }

/* FIX: Prevent AOS flicker on page load */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}