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


:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #818cf8;
    --background: #0f1117;
    --surface: #1a1d27;
    --surface-2: #222636;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border: #2d3148;
    --gradient-start: #6366f1;
    --gradient-end: #818cf8;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* offset for sticky navbar when jumping to anchors */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 56px;
    display: inline-block;
    animation: lobster-wiggle 3s ease-in-out infinite;
    cursor: default;
}

.logo-icon:hover {
    animation: lobster-excited 0.6s ease-in-out infinite;
}

@keyframes lobster-wiggle {
    0%, 100% { transform: rotate(0deg); }
    15%      { transform: rotate(-8deg) translateY(-2px); }
    30%      { transform: rotate(6deg); }
    45%      { transform: rotate(-4deg) translateY(-1px); }
    60%      { transform: rotate(3deg); }
    75%      { transform: rotate(-2deg); }
}

@keyframes lobster-excited {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25%      { transform: rotate(-12deg) scale(1.1); }
    50%      { transform: rotate(12deg) scale(1.05); }
    75%      { transform: rotate(-8deg) scale(1.1); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.lang-switcher .lang-icon {
    opacity: 0.6;
    margin-right: 2px;
}

.lang-switcher a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.lang-switcher a:hover {
    color: var(--text-primary);
}

.lang-switcher a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--border);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    padding: 40px 0 48px;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title-sm {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.gradient-text {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end), #a78bfa, var(--gradient-start));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Download count in hero */
.hero-download-count {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.hero-download-count .count-highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Download button pulse */
.btn-primary.btn-large {
    animation: btn-glow 3s ease-in-out infinite;
}

@keyframes btn-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    50%      { box-shadow: 0 0 24px 4px rgba(99, 102, 241, 0.35); }
}

.btn-primary.btn-large:hover {
    animation: none;
}

/* Channel badges */
.channel-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.channel-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.channel-badge:hover {
    opacity: 1;
}

.channel-badge svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    min-height: 18px;
    max-height: 18px;
    flex-shrink: 0;
}

/* Features section */
.features-section {
    padding: 72px 0;
    background: var(--background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 14px;
    display: block;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: #080b10;
    color: var(--text-secondary);
    padding: 40px 0 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-logo .logo-icon {
    font-size: 18px;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 12px;
}

.footer-section h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

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

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
}

/* Screenshots Section */
.screenshots-section {
    padding: 80px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.screenshot-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--background);
    cursor: pointer;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s, border-color 0.3s;
}

.screenshot-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.screenshot-card img {
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--border);
}

.screenshot-caption {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: lightbox-in 0.2s ease;
}

@keyframes lightbox-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    display: block;
}

.lightbox-caption {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 48px;
    line-height: 1;
    padding: 8px 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 8px;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev { left: -5px; }
    .lightbox-next { right: -5px; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .nav-links a:not(.btn) {
        display: none;
    }

    .nav-links .lang-switcher {
        display: none;
    }

    .hero {
        padding: 24px 0 32px;
    }

    .hero-title-sm {
        font-size: 18px;
        white-space: normal;
    }

    .section-header h2 {
        font-size: 28px;
    }

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

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

    .channel-badges {
        gap: 14px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
}
