:root {
    --primary: #5e5ce6;
    --primary-glow: rgba(94, 92, 230, 0.4);
    --bg-dark: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    --accent-gradient: linear-gradient(135deg, #5e5ce6 0%, #a259ff 100%);
    --glass-border: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(10, 10, 12, 0.8);
    --shadow-color: rgba(0,0,0,0.5);
}

:root[data-theme="light"] {
    --bg-dark: #fcfcfc;
    --card-bg: #ffffff;
    --card-hover: #f5f5f7;
    --text-main: #1d1d1f;
    --text-dim: #86868b;
    --glass-border: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(252, 252, 252, 0.8);
    --primary-glow: rgba(94, 92, 230, 0.2);
    --shadow-color: rgba(0,0,0,0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Header & Nav */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

/* Controls (Theme & Lang) */
.control-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.control-btn:hover {
    color: var(--text-main);
    background: var(--card-bg);
}

.lang-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    width: 36px;
    height: 36px;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

button.btn {
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--card-hover);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 4rem;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.version-tag {
    font-size: 0.9rem;
    color: var(--text-dim);
    opacity: 0.8;
}

.hero-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 30px 60px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
}

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

/* Features */
.use-cases {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.section-kicker {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-align: center;
    text-transform: uppercase;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.use-case-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.5rem;
    min-height: 230px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.use-case-card:hover {
    background: var(--card-hover);
    border-color: rgba(94, 92, 230, 0.5);
    transform: translateY(-3px);
}

.use-case-label {
    color: var(--primary);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.use-case-card h3 {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
}

.use-case-card p {
    color: var(--text-dim);
}

.features {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.feature-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
}

.feature-card p {
    color: var(--text-dim);
}

/* CTA Banner */
.cta-banner {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.cta-inner {
    background: var(--accent-gradient);
    padding: 4rem;
    border-radius: 32px;
    text-align: center;
    color: white;
}

.cta-inner h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-inner p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.code-box {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    padding-right: 3.5rem;
    margin: 0 auto 0.35rem auto;
    max-width: 750px;
    text-align: left;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.code-box code {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    color: #f8f9fa;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
    display: block;
}

.install-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0 auto 1.5rem auto;
    max-width: 820px;
    text-align: left;
}

.install-note {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 1rem;
}

.install-note strong,
.install-note span {
    display: block;
}

.install-note strong {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.install-note span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    line-height: 1.45;
}

.cta-inner p.install-hint {
    max-width: 750px;
    margin: 0 auto 2rem auto;
    text-align: left;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    opacity: 1;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #34c759;
    border-color: #34c759;
}



/* Changelog Layout */
.changelog-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 4rem;
    align-items: start;
    padding-bottom: 8rem;
}

.changelog-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    text-align: left; /* Force left align */
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Force children to left */
    gap: 0.85rem;
    padding: 0;
    margin: 0;
    text-align: left;
}

.sidebar-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    display: block;
    padding: 0;
    margin: 0;
    text-align: left;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary);
}

/* Changelog Timeline */
.changelog-hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.timeline {
    position: relative;
    max-width: 800px;
}

/* Continuous Line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3rem; 
    width: 2px;
    height: 100%;
    background: var(--glass-border);
    z-index: 1;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 6rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 3.2rem; /* Aligned with version-header text line */
    width: 14px;
    height: 14px;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px var(--shadow-color);
}

.timeline-item:hover .timeline-content {
    border-color: var(--primary);
    transform: translateX(8px);
}

.version-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.version-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
}

.version-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dim);
    background: var(--card-hover);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.badge-latest {
    background: var(--accent-gradient);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.badge-latest {
    background: var(--accent-gradient);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.change-list {
    list-style: none;
    padding: 0;
}

.change-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.change-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.change-list b {
    color: var(--text-main);
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 1.5rem;
        max-width: 100%;
    }
    .timeline-dot {
        left: -1.5rem;
    }
    .timeline-content {
        padding: 1.5rem;
    }
}


@media (max-width: 1024px) {
    .changelog-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .changelog-sidebar {
        display: none;
    }

    .timeline {
        padding-left: 0; /* No padding needed without dots */
    }

    .timeline-item {
        padding-left: 0; /* Cards take full width */
        padding-bottom: 3rem;
    }

    .timeline-dot,
    .timeline-item::before {
        display: none; /* Hide timeline visual elements on mobile */
    }
}

@media (max-width: 768px) {
    .changelog-hero {
        padding-top: 4rem;
        padding-bottom: 2.5rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .version-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-dot {
        top: 2.4rem; /* Precise alignment for mobile header */
    }

    .timeline-item::before {
        top: 2.4rem;
    }
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--text-main);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .hero h1 { 
        font-size: 2.2rem; 
    }
    
    .lead { 
        margin: 0 auto 2.5rem; 
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .use-cases {
        padding-top: 2rem;
        padding-bottom: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .use-case-grid,
    .install-notes {
        grid-template-columns: 1fr;
    }

    .use-case-card {
        min-height: auto;
    }
    
    .hero-btns { 
        justify-content: center; 
        flex-direction: column; 
        width: 100%;
    }
    
    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }
    
    .hero-image { 
        order: -1; 
        margin-bottom: 2rem;
    }
    
    .cta-inner {
        padding: 2.5rem 1.5rem; /* Drastically reduce padding on mobile to prevent overflow */
    }
    
    .cta-inner h2 {
        font-size: 1.8rem;
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 1.5rem; 
        text-align: center; 
    }
    
    .nav-links { 
        gap: 0.8rem; 
    }
}
