/* ========================================
   Modern CSS Reset & Base Styles
   ======================================== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --dark-bg: #0f0f23;
    --dark-surface: #1a1a2e;
    --dark-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Loading Screen
   ======================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#main-container {
    opacity: 1;
    visibility: visible;
}

#main-container.visible {
    opacity: 1;
    visibility: visible;
}

.loader {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-ring:nth-child(2) {
    width: 100px;
    height: 100px;
    border-top-color: var(--secondary-color);
    animation-delay: 0.2s;
}

.loader-ring:nth-child(3) {
    width: 120px;
    height: 120px;
    border-top-color: var(--accent-color);
    animation-delay: 0.4s;
}

.loading-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Particle Canvas Background
   ======================================== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* ========================================
   Navigation Bar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 15, 35, 0.95);
    box-shadow: var(--shadow-md);
}

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

.nav-logo .logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

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

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

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

.lang-switch {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.badge-icon {
    font-size: 1.2rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(99, 102, 241, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.code-accent {
    color: var(--accent-color);
    font-weight: 700;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--glass-bg);
    color: white;
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

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

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.1rem;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
}

/* ========================================
   Apps Section
   ======================================== */
.apps-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-container {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.filter-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tag {
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.app-card {
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.app-card[data-hidden="true"] {
    display: none;
}

.app-card-inner {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.app-card-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(99, 102, 241, 0.1),
        transparent 30%
    );
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.app-card:hover .app-card-inner::before {
    opacity: 1;
}

@keyframes rotate {
    100% { transform: rotate(1turn); }
}

.app-card:hover .app-card-inner {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    background: var(--gradient-2);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.app-info-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 2;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-info-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.app-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.app-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.app-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.app-link:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

/* ========================================
   Features Section
   ======================================== */
.features-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, transparent 0%, var(--dark-surface) 50%, transparent 100%);
}

.features-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.5s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-lg);
}

.feature-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--dark-surface);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.footer-contact a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* ========================================
   Popups
   ======================================== */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    overflow-y: auto;
    padding: 2rem;
}

.popup-content {
    max-width: 700px;
    margin: 2rem auto;
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.popup-content h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
    transform: rotate(90deg);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popup-feature {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.popup-feature:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.popup-feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.popup-feature-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.popup-feature-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.contact-details a,
.contact-details p {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.contact-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.contact-form h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.contact-form textarea {
    resize: vertical;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-section {
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .lang-switch {
        margin-top: 0.5rem;
    }

    .hero-stats {
        gap: 2rem;
    }

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

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

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .popup-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

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

    .popup-feature {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .apps-section,
    .features-section {
        padding: 4rem 1rem;
    }

    .cta-section {
        padding: 4rem 1rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   Three.js layers
   ======================================== */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    display: none;
}

body.three-bg #bg-canvas {
    display: block;
}

body.three-bg #particle-canvas {
    display: none;
}

/* ========================================
   3D App Library
   ======================================== */
.view-toggle {
    display: none;
    padding: 0.3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    gap: 0.25rem;
}

body.lib-ready .view-toggle {
    display: inline-flex;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.lib-stage {
    display: none;
    outline: none;
}

body.lib-ready .lib-stage {
    display: block;
}

body.lib-ready:not(.view-grid) .apps-grid {
    display: none;
}

body.lib-ready.view-grid .lib-stage {
    display: none;
}

.lib-stage:focus-visible .lib-viewport {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

.lib-viewport {
    position: relative;
    height: clamp(430px, 66vh, 640px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 0%, rgba(240, 147, 251, 0.08) 0%, transparent 55%),
        rgba(10, 10, 28, 0.55);
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#lib-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
}

#lib-canvas.dragging {
    cursor: grabbing;
}

.lib-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.lib-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.5);
}

.lib-prev { left: 1rem; }
.lib-next { right: 1rem; }

.lib-counter {
    position: absolute;
    top: 1.1rem;
    left: 1.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: var(--text-primary);
    pointer-events: none;
}

.lib-counter-sep {
    margin: 0 0.4rem;
    color: var(--text-secondary);
}

#lib-total {
    color: var(--text-secondary);
}

.lib-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
}

.lib-detail {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    max-width: 960px;
    margin: 1.5rem auto 0;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    min-height: 130px;
}

.lib-detail.swap {
    animation: libSwap 0.45s ease;
}

@keyframes libSwap {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.lib-detail .app-icon {
    margin: 0;
}

.lib-detail-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.lib-detail-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 700;
}

.lib-detail-badge {
    padding: 0.25rem 0.8rem;
    background: var(--gradient-2);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}

.lib-detail-desc {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.lib-detail .app-tags {
    margin-bottom: 0;
}

.lib-detail-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
}

.lib-detail-actions .app-link {
    justify-content: center;
    white-space: nowrap;
}

.lib-info-link {
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.lib-info-link:hover {
    color: var(--primary-color);
}

.lib-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .lib-viewport {
        height: clamp(380px, 58vh, 520px);
        border-radius: 22px;
    }

    .lib-nav {
        width: 40px;
        height: 40px;
    }

    .lib-prev { left: 0.5rem; }
    .lib-next { right: 0.5rem; }

    .lib-hint {
        font-size: 0.72rem;
    }

    .lib-detail {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem;
    }

    .lib-detail-top,
    .lib-detail .app-tags {
        justify-content: center;
    }

    .lib-detail-actions {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lib-detail.swap {
        animation: none;
    }
}


/* ========================================
   Cinematic hero (Three.js launch sequence)
   ======================================== */
#hero-canvas,
.hero-fx,
.hero-hud,
.hero-skip {
    display: none;
}

html.hero-3d .hero-section {
    justify-content: flex-end;
    padding: 6rem 2rem 5.5rem;
    min-height: 100vh;
    background: #0a0a1f;
}

html.hero-3d .hero-section::before {
    display: none;
}

html.hero-3d #hero-canvas {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    -webkit-mask-image: linear-gradient(#000 82%, transparent 100%);
    mask-image: linear-gradient(#000 82%, transparent 100%);
}

html.hero-3d .hero-fx {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.95) 0%, rgba(139, 156, 255, 0.55) 26%, transparent 68%);
    mix-blend-mode: screen;
}

.hero-grain {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(5, 5, 20, 0.72) 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}

html.hero-3d .hero-content {
    position: relative;
    z-index: 3;
}

/* the 3D logo is the headline; keep the h1 for screen readers and search engines */
html.hero-3d .hero-title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

html.hero-3d .hero-subtitle { margin-bottom: 0.6rem; }
html.hero-3d .hero-description { margin-bottom: 1.8rem; }
html.hero-3d .hero-actions { margin-bottom: 2rem; }
html.hero-3d .hero-stats { margin-top: 0; }

html.hero-3d .hero-content > * {
    opacity: 0;
    transition: opacity 0.9s ease;
}

html.hero-3d body.hero-ready .hero-content > * {
    opacity: 1;
}

html.hero-3d .hero-content > :nth-child(3) { transition-delay: 0.1s; }
html.hero-3d .hero-content > :nth-child(4) { transition-delay: 0.25s; }
html.hero-3d .hero-content > :nth-child(5) { transition-delay: 0.4s; }
html.hero-3d .hero-content > :nth-child(6) { transition-delay: 0.55s; }

html.hero-3d .scroll-indicator {
    z-index: 3;
    bottom: 1rem;
}

html.hero-3d .hero-hud {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}

.hero-log {
    position: absolute;
    top: 5.6rem;
    left: 2rem;
    width: min(320px, 40vw);
    height: 11rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.2rem;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(165, 180, 252, 0.8);
    -webkit-mask-image: linear-gradient(transparent 0%, #000 38%);
    mask-image: linear-gradient(transparent 0%, #000 38%);
}

.hero-log-line {
    white-space: nowrap;
    overflow: hidden;
    animation: heroType 0.55s steps(34, end) both;
}

.hero-log-line.ok { color: rgba(110, 231, 183, 0.9); }
.hero-log-line.wait { color: rgba(251, 191, 36, 0.9); }
.hero-log-line.go { color: #fff; text-shadow: 0 0 12px rgba(139, 156, 255, 0.9); }

@keyframes heroType {
    from { max-width: 0; }
    to { max-width: 100%; }
}

.hero-progress {
    position: absolute;
    left: 2rem;
    bottom: 1.3rem;
    width: min(340px, 40vw);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: rgba(199, 210, 254, 0.9);
}

.hero-phase { min-width: 4.6rem; }

.hero-bar {
    position: relative;
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.hero-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #f093fb, #4facfe);
    box-shadow: 0 0 12px rgba(139, 156, 255, 0.9);
}

.hero-pct { min-width: 2.4rem; text-align: right; }

html.hero-3d .hero-skip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    top: 5.6rem;
    right: 2rem;
    z-index: 4;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 15, 35, 0.55);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

html.hero-3d .hero-skip:hover {
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}

@media (max-width: 768px) {
    html.hero-3d .hero-section { padding: 21rem 1.25rem 5rem; }
    .hero-log { display: none; }
    .hero-progress { left: 1.25rem; bottom: 1.4rem; width: calc(100% - 9.5rem); }
    html.hero-3d .hero-skip { top: auto; bottom: 1rem; right: 1rem; }
    html.hero-3d .scroll-indicator { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-log-line { animation: none; }
}

/* ========================================
   Photo band + CTA photo
   ======================================== */
.platform-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.platform-card {
    position: relative;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    aspect-ratio: 4 / 5;
    background: var(--dark-card);
    isolation: isolate;
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.platform-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 1.2s ease;
}

.platform-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 10, 31, 0.1) 25%, rgba(10, 10, 31, 0.92) 100%);
}

.platform-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.platform-card:hover img {
    transform: scale(1.08);
}

.platform-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
}

.platform-step {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 3px;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.platform-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0.25rem 0 0.6rem;
}

.platform-text {
    color: #c3cbe0;
    line-height: 1.7;
}

.cta-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, var(--dark-bg) 0%, rgba(15, 15, 35, 0.35) 35%, rgba(15, 15, 35, 0.35) 65%, var(--dark-bg) 100%),
        url('assets/img/launch.jpg') center / cover no-repeat;
    opacity: 0.36;
}

@media (max-width: 768px) {
    .platform-section { padding: 4rem 1rem; }
    .platform-card { aspect-ratio: 4 / 4.2; }
}


/* ========================================
   Loader: (Ru)n (Y)our (App) -> RUY.APP
   ======================================== */
#loading-screen {
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.16) 0%, transparent 55%),
        var(--dark-bg);
}

.loader {
    flex-direction: column;
    gap: 1.4rem;
}

.loader-word {
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: clamp(2rem, 8vw, 3.8rem);
    letter-spacing: 0.04em;
    color: #c7d2fe;
    white-space: nowrap;
}

.loader-word .lw {
    display: inline-block;
    overflow: hidden;
    max-width: 3em;
    padding: 0.08em 0.02em;
    opacity: 0;
    transform: translateY(0.5em);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.5s ease, text-shadow 0.5s ease, max-width 0.9s cubic-bezier(0.7, 0, 0.3, 1), filter 0.7s ease;
}

.loader-word .sp { max-width: 0.4em; }

.loader-word .dot {
    max-width: 0;
    opacity: 0;
    transform: scale(0.2);
    color: var(--accent-color);
}

.ld-show .loader-word .lw:not(.dot) {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--i) * 70ms), calc(var(--i) * 70ms), 0s, 0s, 0s, 0s;
}

/* the initials R U Y A P P light up, everything else dims */
.ld-lit .loader-word .keep {
    color: #fff;
    text-shadow: 0 0 18px rgba(139, 156, 255, 0.95), 0 0 42px rgba(139, 92, 246, 0.6);
}

.ld-lit .loader-word .drop {
    opacity: 0.28;
}

/* "n", "our" and the spaces dissolve, the rest slides together and the dot ignites */
.ld-merge .loader-word .drop,
.ld-merge .loader-word .sp {
    max-width: 0;
    opacity: 0;
    padding: 0;
    filter: blur(8px);
    transform: scale(0.3);
}

.ld-merge .loader-word .lc { text-transform: uppercase; }

.ld-merge .loader-word .dot {
    max-width: 0.5em;
    opacity: 1;
    transform: none;
    text-shadow: 0 0 22px rgba(245, 158, 11, 0.95);
}

.ld-done .loader-word .keep {
    background: linear-gradient(135deg, #c7d2fe 0%, #f0abfc 55%, #a5f3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 14px rgba(139, 156, 255, 0.8));
    animation: ldPulse 0.9s ease-out;
}

@keyframes ldPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.loader-bar {
    width: min(240px, 60vw);
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.loader-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #f093fb, #4facfe);
    box-shadow: 0 0 12px rgba(139, 156, 255, 0.9);
}

.ld-show .loader-bar i {
    animation: ldBar 3.3s linear forwards;
}

@keyframes ldBar {
    to { width: 100%; }
}

.loader-cap {
    min-height: 1.2em;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(165, 180, 252, 0.85);
}

.loader-cap::before { content: '$ ruy run --your --app'; }
.ld-lit .loader-cap::before { content: '[ .. ] extracting initials R\00b7U\00b7Y\00b7A\00b7P\00b7P'; color: rgba(251, 191, 36, 0.9); }
.ld-merge .loader-cap::before { content: '[ ok ] building RUY.APP'; color: rgba(110, 231, 183, 0.9); }
.ld-done .loader-cap::before { content: '[ \25b6 ] RUNNING'; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .loader-word .lw { transition: none; }
    .ld-done .loader-word .keep { animation: none; }
}
