:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --blue: #58a6ff;
    --blue-dark: #388bfd;
    --gray: #30363d;
    --border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

body[dir="rtl"] .container { direction: rtl; text-align: right; }
body[dir="rtl"] .buttons { flex-direction: row-reverse; }
body[dir="rtl"] .code-comparison { flex-direction: row-reverse; }
body[dir="rtl"] .grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); direction: rtl; }
body[dir="rtl"] table { direction: rtl; }
body[dir="rtl"] .timeline { direction: rtl; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 4rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%,
            rgba(88, 166, 255, 0.09) 0%,
            transparent 55%);
    pointer-events: none;
}

.logo {
    font-size: 5.2rem;
    font-weight: 800;
    letter-spacing: -0.09em;
    background: linear-gradient(90deg, #58a6ff, #a5d6ff, #58a6ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradient 10s ease infinite;
    display: inline-block;
    margin-bottom: 1rem;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.tagline {
    font-size: 1.6rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 2.8rem;
}

.buttons {
    display: flex;
    gap: 1.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--blue);
    color: white;
    border: 1px solid var(--blue-dark);
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.3);
}

.btn-outline {
    border: 1px solid var(--gray);
    color: var(--blue);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--blue);
}

main {
    padding-bottom: 8rem;
}

section {
    padding: 7rem 0;
    border-top: 1px solid var(--border);
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--blue);
}

h3 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--blue);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.2rem;
}

.feature-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.2rem;
    transition: all 0.35s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.feature-card h3 {
    color: var(--blue);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
}

/* Code Comparison Styles */
.code-comparison {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 2.5rem 0;
    flex-wrap: nowrap;
}

.code-panel {
    flex: 1;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.code-panel:hover,
.code-panel:focus-within {
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.2);
    transform: translateY(-4px);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray);
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blue);
}

pre {
    margin: 0;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) var(--bg-soft);
}

pre::-webkit-scrollbar {
    width: 8px;
}

pre::-webkit-scrollbar-track {
    background: var(--bg-soft);
}

pre::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 4px;
}

.comparison-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .code-comparison {
        flex-direction: column;
        gap: 2rem;
    }
}

/* New Sections Styles */
.about p {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.1rem;
}

.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.use-case-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.8rem;
    text-align: center;
}

.use-case-card h3 {
    color: var(--blue);
    margin-bottom: 1rem;
}

.benchmarks table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.benchmarks th,
.benchmarks td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.benchmarks th {
    background: var(--gray);
    color: var(--blue);
}

.getting-started ol {
    max-width: 800px;
    margin: 0 auto;
    list-style-type: decimal;
    padding-left: 2rem;
}

.getting-started li {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.faq details {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--blue);
}

.community {
    text-align: center;
}

.community .buttons {
    margin-top: 2rem;
}

footer {
    text-align: center;
    padding: 5rem 0 7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    font-size: 0.98rem;
}

footer a {
    color: var(--blue);
}

@media (max-width: 768px) {
    .logo {
        font-size: 4rem;
    }

    header {
        padding: 3.5rem 0 5rem;
    }

    h2 {
        font-size: 2.4rem;
    }
}

.extension-section {
    background: linear-gradient(to bottom, var(--bg), var(--bg-soft));
    border-radius: 16px;
    padding: 4rem 2rem;
    margin: 4rem 0;
    border: 1px solid var(--border);
}

.extension-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin: 2.5rem 0;
}

.lead {
    font-size: 1.3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text);
}

.center {
    text-align: center;
}

.markdown-block pre {
    max-height: 300px;
    background: #0d1117;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.note {
    font-size: 0.95rem;
    font-style: italic;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.positive h3 {
    color: #4ade80;
}

.negative h3 {
    color: #f87171;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-soft);
    border: 1px solid var(--border);

    overflow: hidden;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--gray);
    color: var(--blue);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--bg-soft);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--blue);
}

.lang-toggle-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 101;
    background: #58a6ff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.lang-toggle-btn:hover {
    background: #cecdd5;
}

.lang-container {
    position: relative;
}

.sticky-lang {
    position: fixed;
    top: 4rem;
    /* Exactly below button */
    right: 1rem;
    z-index: 100;
    width: fit-content;
    /* Fixed width for nav */
    background: white;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.sticky-lang.open {
    min-width: 300px;
    max-height: 400px;
    /* Adjust based on content */
    opacity: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sticky-lang ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sticky-lang ul>li>ul {
    list-style: none;
    padding: 0;
    margin-left: 15px;
}

.sticky-lang a {
    color: inherit;
    text-decoration: none;
    padding: 0.5rem 0;
    color: #3140af;
}

.sticky-lang a:hover {
    color: #3140af;
}