/* reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* blue theme color palette (matching GitHub pages) */
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #22d3ee;
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #374151;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;

    /* theme mappings */
    --primary-color: var(--primary);
    --primary-dark: var(--primary-dark);
    --secondary-color: var(--secondary);
    --accent-color: var(--accent-cyan);
    --text-color: var(--text-primary);
    --text-light: var(--text-secondary);
    --bg-color: var(--bg-primary);
    --bg-secondary: var(--bg-secondary);
    --border-color: var(--border);
    --shadow-sm: 0 1px 2px 0 rgba(10, 15, 28, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(10, 15, 28, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(10, 15, 28, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

/* scroll animation styles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* stagger animation for grid items */
.feature-card.animate-on-scroll,
.tech-item.animate-on-scroll,
.platform-card.animate-on-scroll {
    transition-delay: calc(var(--animation-order, 0) * 0.1s);
}

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

/* navigation */
.navbar {
    background-color: rgba(10, 15, 28, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

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

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* hero section - full screen */
.hero-fullscreen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem 0;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    margin: auto;
    text-align: center;
}

.hero-text {
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

#cell-animation {
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20%;
    right: -20%;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 20%, var(--bg-color) 85%);
    pointer-events: none;
    z-index: 1;
}

.hero-visual canvas {
    position: relative;
    z-index: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
}

.scroll-indicator a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-indicator a:hover {
    color: var(--primary-color);
}

.scroll-indicator span {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* legacy hero (kept for other pages) */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg-primary);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

/* buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

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

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* sections */
section {
    padding: 3rem 0;
}

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

.intro {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.4);
    background-color: rgba(17, 24, 39, 0.6);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* workflow section */
.workflow {
    background-color: var(--bg-secondary);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.workflow-step {
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    border: 2px solid rgba(55, 65, 81, 0.5);
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: scale(1.05);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.15);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.workflow-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.workflow-step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.workflow-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* tech stack */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-item {
    text-align: center;
    padding: 2rem;
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-item:hover {
    transform: translateY(-5px);
    background-color: rgba(17, 24, 39, 0.6);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.15);
}

.tech-item h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tech-item p {
    color: var(--text-light);
}

/* documentation page */
.docs-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
}

.docs-sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 100px;
    height: fit-content;
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    margin-bottom: 0.75rem;
}

.docs-sidebar a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.docs-sidebar a:hover {
    color: var(--primary-color);
}

.docs-content {
    flex: 1;
    max-width: 800px;
}

.docs-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.docs-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-align: left;
}

.docs-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.docs-content h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.docs-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.docs-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.docs-content a:hover {
    text-decoration: underline;
}

.code-block {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    border: 1px solid var(--border);
}

.code-block code {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* download page */
.download-page {
    padding: 2rem 0 4rem;
}

.download-header {
    text-align: center;
    margin-bottom: 3rem;
}

.download-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.version-info {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.version-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.release-date {
    color: var(--text-light);
}

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

.platform-card {
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 2px solid rgba(55, 65, 81, 0.5);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-card:hover {
    transform: translateY(-5px);
    background-color: rgba(17, 24, 39, 0.6);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.15);
}

.platform-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.platform-requirements {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.file-info {
    font-size: 0.9rem;
    color: var(--text-light);
}

.installation-guide,
.build-from-source,
.system-requirements-detailed,
.release-notes,
.support {
    margin-top: 4rem;
}

.installation-guide h2,
.build-from-source h2,
.system-requirements-detailed h2,
.release-notes h2,
.support h2 {
    text-align: left;
    margin-bottom: 2rem;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.install-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.install-step ul {
    list-style-position: inside;
    color: var(--text-light);
}

.code-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.build-note {
    margin-top: 1rem;
    color: var(--text-light);
}

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

.requirement-card {
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 2px solid rgba(55, 65, 81, 0.5);
    transition: all 0.3s ease;
}

.requirement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.requirement-card.recommended {
    border-color: var(--accent-color);
    background-color: var(--bg-tertiary);
}

.requirement-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.requirement-card ul {
    list-style: none;
    padding: 0;
}

.requirement-card li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.performance-note {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--secondary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.performance-note p {
    margin: 0;
    color: var(--text-color);
}

.version-history {
    margin-top: 2rem;
}

.version-entry {
    background-color: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.5);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.version-entry:hover {
    transform: translateX(5px);
    border-color: rgba(14, 165, 233, 0.4);
}

.version-entry h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.version-date {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.version-entry h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.version-entry ul {
    padding-left: 1.5rem;
}

.version-entry li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.support {
    text-align: center;
    background-color: var(--bg-secondary);
    padding: 3rem;
    border-radius: 0.75rem;
}

.support p {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* footer */
footer {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* responsive design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        position: static;
        flex: 1;
    }

    .workflow-arrow {
        display: none;
    }

    .nav-menu {
        gap: 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .download-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
}
