*, *::before, *::after { box-sizing: border-box; }

:root {
    --navbar-height: 80px;
    --bg: #000000;
    --text: #ffffff;
    --navbar-bg: rgba(0, 0, 0, 0.62);
    --subtitle: #8B28FF;
    --card-bg: #8c28ffe0;
    --footer-bg: #1a0a2d;
    --link: #ffffff;
    --toggle-bg: rgba(255, 255, 255, 0.1);
    --toggle-border: rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] {
    --bg: #f5f7fb;
    --text: #111320;
    --navbar-bg: rgba(255, 255, 255, 0.382);
    --subtitle: #5f19bc;
    --card-bg: #d9c4ff;
    --footer-bg: #e8e2f7;
    --link: #111320;
    --toggle-bg: rgba(17, 19, 32, 0.08);
    --toggle-border: rgba(17, 19, 32, 0.2);
}


html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--navbar-height);
}


.hero,
.learn-description {
    width: min(1200px, calc(100% - 2rem));
    margin-inline: auto;
}

.navbar,
.footer {
    width: 100%;
    border-radius: 0;
}


.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    color: var(--text);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6rem;
    padding: 0.75rem 5rem;
}

.nav-left a {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: auto;
    height: clamp(28px, 4vw, 42px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 2rem);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.nav-links a img {
    width: 20px;
    height: 20px;
}


.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--toggle-border);
    border-radius: 999px;
    background: var(--toggle-bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover { transform: translateY(-1px); }

.theme-toggle svg { width: 20px; height: 20px; }

.theme-toggle .icon-sun { display: none; }

html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }


.hero {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    margin: 0.5rem 0;
}

.hero h2 {
    text-align: left;
    padding-left: 2.5%;
}

.subtitle {
    color: var(--subtitle);
    font-weight: 600;
}

.left-text {
    text-align: left;
    padding-left: 2.5%;
}


.card,
.learn-description {
    width: fit-content;
    max-width: min(100%, 900px);
    background-color: var(--card-bg);
    border-radius: 20px;
    margin: 1.5rem auto;
    color: var(--text);
    padding: 1rem 1.25rem;
}

.learn-text h1 { margin: 0 0 1rem 0; }

.home-intro-row {
    width: min(100%, 1100px);
    margin: 1.5rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.home-banner-wrap {
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
}

.home-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.learn-description.home-cover-box {
    width: 100%;
    max-width: none;
    margin: 0;
}

.step {
    background: var(--card-bg);
    padding: 10px;
    border-left: 4px solid rgb(0, 0, 0);
    border-right: 4px solid rgb(0, 0, 0);
    margin: 10px 0;
    border-radius: 10px;
}


.footer {
    margin-top: auto;
    background-color: var(--footer-bg);
    color: var(--text);
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.5rem 5rem;
}

.footer-column {
    flex: 1 1 220px;
    min-width: 200px;
}

.footer-column h3 { margin: 0 0 0.5rem 0; }

.footer-column p,
.footer-column a {
    margin: 0.3rem 0;
    color: var(--link);
    text-decoration: none;
    display: block;
    overflow-wrap: anywhere;
}

.footer-column img {
    width: 40px;
    height: 40px;
}
.card.quiz-question {
        width: 100%;
        max-width: 700px;
        margin: 20px auto;
    }
.algo-dropdown {
  max-width: min(100%, 900px);
  margin: 1rem auto;
  background: var(--card-bg);
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.algo-dropdown summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  font-weight: 700;
  user-select: none;
}

.algo-dropdown summary::-webkit-details-marker {
  display: none;
}

.algo-dropdown summary::after {
  content: "▾";
  float: right;
  transition: transform 0.2s ease;
}

.algo-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.algo-dropdown > *:not(summary) {
  padding-left: 1rem;
  padding-right: 1rem;
}


.comparison-card {
    width: min(900px, 100%);
    max-width: 100%;
}

.card a {
    color: var(--text);
    text-decoration: none;
    font-weight: bolder;
}

.comparison-card table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.comparison-card thead tr {
    border-bottom: 2px solid var(--text);
}

.comparison-card th,
.comparison-card td {
    padding: 8px 12px;
}

.comparison-card tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.comparison-card tbody tr:last-child {
    border-bottom: none;
}


.learnbox {
    width: fit-content;
    max-width: min(100%, 900px);
    background-color: var(--card-bg);
    border-radius: 20px;
    margin: 1.5rem auto;
    color: var(--text);
    padding: 1rem 1.25rem;
}

.learn-button {
    background-color: var(--subtitle);
    color: white;
    display: inline;
    padding: 1rem 1.25rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
}


@media (max-width: 1024px) {
    .navbar {
        padding: 0.75rem 2.5rem;
        gap: 2rem;
    }

    .footer {
        padding: 1.5rem 2.5rem;
    }
}

@media (max-width: 768px) {
    :root { --navbar-height: 120px; }

    .navbar {
        padding: 0.75rem 1.25rem;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .brand-logo { height: 30px; }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 0.75rem 1rem;
    }

    .theme-toggle { margin-left: auto; }

    .nav-links a { font-size: 0.95rem; }

    .hero { margin-top: 1.25rem; }

    .home-intro-row {
        grid-template-columns: 1fr;
    }

    .home-banner-wrap {
        min-height: 220px;
    }

    .card,
    .learn-description { border-radius: 14px; }

    .footer {
        padding: 1.25rem 1.25rem;
        flex-direction: column;
        gap: 1rem;
    }

    .footer-column {
        min-width: unset;
        flex: 1 1 auto;
    }
}
@media (max-width: 480px) {
    :root { --navbar-height: 130px; }

    .navbar { padding: 0.75rem 1rem; }

    .nav-links a { font-size: 0.875rem; }

    .card,
    .learn-description,
    .learnbox {
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }

    .footer { padding: 1rem; }
}
