:root {
    --bg-dark: #0a0a0a;
    --primary: #8a2be2;
    /* BlueViolet */
    --accent: #00e5ff;
    /* Cyan */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 10px;
    --transition-speed: 0.3s;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* App Container (Mobile Constraint) */
.app-container {
    width: 100%;
    max-width: 480px;
    /* Constrain for desktop view to mimic mobile */
    height: 100%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 20%, #1a1a2e 0%, var(--bg-dark) 80%);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Background Elements */
.bg-gradient {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 60%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
}

/* Header */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-speed);
}

.menu-btn:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 40px;
    overflow-y: auto;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main-content::-webkit-scrollbar {
    display: none;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-visual {
    margin-bottom: 24px;
    position: relative;
}

.icon-container {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: var(--glass-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
}

.app-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.app-version {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent);
}

/* Download Section */
.download-section {
    margin-bottom: 40px;
    text-align: center;
}

.primary-cta {
    position: relative;
    width: 100%;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.3);
}

.primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(138, 43, 226, 0.4);
}

.primary-cta:active {
    transform: translateY(1px);
}

.primary-cta[aria-busy="true"] {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    pointer-events: none;
}

.btn-text,
.progress-container,
.success-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    transition: opacity 0.3s ease;
}

.progress-container,
.success-state {
    opacity: 0;
    pointer-events: none;
}

.primary-cta[aria-busy="true"] .btn-text {
    opacity: 0;
}

.primary-cta[aria-busy="true"] .progress-container {
    opacity: 1;
}

.primary-cta.completed .progress-container {
    opacity: 0;
}

.primary-cta.completed .success-state {
    opacity: 1;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.1s linear;
}

.platform-hint {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Media Section */
.media-section {
    margin-top: auto;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: #111;
}

.feature-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    /* Hidden by default if no source */
}

/* Release Notes Drawer */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 90;
    /* Below drawer, above content */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.release-notes-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    height: 70vh;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid var(--glass-border);
    z-index: 100;
    padding: 24px;
    transition: transform 0.4s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
}

.release-notes-drawer.open {
    transform: translateX(-50%) translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.drawer-header h2 {
    font-size: 1.25rem;
}

.close-drawer {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.drawer-content {
    overflow-y: auto;
    flex: 1;
}

.version-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.version-item:last-child {
    border-bottom: none;
}

.version-item h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.version-item .date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.version-item ul {
    list-style: none;
    padding-left: 0;
}

.version-item li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.version-item li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Animations */
@keyframes particlePulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

.bg-particles {
    animation: particlePulse 4s infinite ease-in-out;
}

/* Responsive */
@media (min-width: 481px) {
    body {
        background-color: #000;
    }
}