html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --accent-gradient: #FFC400;
    --subtle-border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-md: 1.5rem;
    --radius-sm: 1rem;
    --section-heading-size: clamp(3.5rem, 7vw, 5rem);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
    color-scheme: light dark;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    padding-top: 120px;
}

a,
a:hover {
    text-decoration: none;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* --- Layout --- */
html {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
}

.container {
    width: min(100%, 1200px);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    transition: all 0.3s ease;
    background: transparent;
    backdrop-filter: none;
    z-index: 1000;
    margin-bottom: 0;
    border-bottom: none;
    box-shadow: none;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    /* Optional: shrink slightly on scroll for a nice effect */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Add subtle shadow only when scrolled */
}

body.roadmap {
    background-color: #f6f8ff;
    overflow-y: hidden;
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
}

body.roadmap nav {
    background: rgba(246, 248, 255, 0.9);
    border-bottom: none;
    box-shadow: none;
}

@media (prefers-color-scheme: dark) {
    body.roadmap {
        background-color: var(--bg-color);
    }

    body.roadmap nav {
        background: transparent;
    }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

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

.logo-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFC400;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-btn {
    background: var(--surface-color);
    border: 1px solid var(--subtle-border);
    padding: 0.9rem 1.4rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}



/* --- Hamburger & Drawer --- */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

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

    .container {
        width: 100%;
        padding: 0 1rem;
    }

    .nav-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.8rem;
    }

    .hamburger-btn {
        display: flex;
    }
}

.nav-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-color);
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.nav-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4rem;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
}

.drawer-content {
    flex: 1;
}

.drawer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drawer-links li a {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
    display: block;
}

.drawer-links li a:hover {
    opacity: 0.7;
}

/* H2 Section Header Link Effect */
h2.section-header-link {
    display: block;
    position: relative;
    font-size: var(--section-heading-size);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, var(--text-primary) 30%, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}



/* Enforce no borders on main sections */
.gallery-section,
.ai-personalities-section,
.pcpdm-section,
.modes-section,
.curriculum-section,
.study-tools-section,
.collaboration-section,
.reviews-section {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

h2.section-header-link::after {
    display: none;
}

h2.section-header-link:hover::after {
    width: 100%;
}

/* For section headers within .section-header divs */
.section-header h2.section-header-link {
    margin-bottom: 1rem;
}

/* Optional: Add different variations */
h2.section-header-link.center {
    text-align: center;
}

h2.section-header-link.center::after {
    left: 50%;
    transform: translateX(-50%);
    width: 0;
}

h2.section-header-link.center:hover::after {
    width: 80%;
    left: 10%;
}

h2.section-header-link.thin::after {
    height: 2px;
}

h2.section-header-link.thick::after {
    height: 4px;
}

/* Optional animation for page load */
@keyframes underlineReveal {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

h2.section-header-link.active::after {
    animation: underlineReveal 0.5s ease forwards;
}

/* --- Hero --- */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 4rem;
}

/* --- Preview Section --- */
.preview-section {
    padding: 10rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.preview-image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--subtle-border);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
}

.preview-image-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent;
}

@media (max-width: 768px) {
    .preview-section {
        padding: 3rem 1rem;
    }

    .preview-image-wrapper {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

.hero-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.05);
    color: #2563eb;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
    animation: fadeInDown 1s ease forwards;
    opacity: 0;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #000, #444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 1s 0.2s ease forwards;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s 0.4s ease forwards;
}

.cta-group {
    opacity: 0;
    animation: fadeInUp 1s 0.6s ease forwards;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 1rem 2.5rem;
    border-radius: 99px;
    font-family: var(--font-heading);
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* --- Final CTA Section --- */
.final-cta-section {
    padding: 8rem 2rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 3rem;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.btn-secondary {
    background: var(--text-primary);
    border: 1.5px solid var(--bg-color);
    color: var(--bg-color);
    padding: 1.2rem 3rem;
    border-radius: 99px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    transform: scale(1.05);
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.15);
}

.btn-secondary svg {
    transition: transform 0.3s ease;
}

.btn-secondary:hover svg {
    transform: translate(2px, -2px);
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: var(--section-heading-size);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, var(--text-primary) 30%, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Features Grid --- */
.features {
    padding: 4rem 0 6rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--subtle-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    opacity: 0;
    /* JS reveals this */
    transform: translateY(20px);
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.08);
    background: #fff;
}

@media (prefers-color-scheme: dark) {
    .card:hover {
        background: rgba(15, 18, 29, 0.92);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #f8f8f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #000;
}

@media (prefers-color-scheme: dark) {
    .icon-box {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-primary);
    }
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Modes Section --- */
.modes-section {
    padding: 6rem 0;
    position: relative;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.mode-card {
    background: #fff;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .mode-card {
        background: rgba(15, 18, 29, 0.92);
    }
}

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

.mode-card:hover {
    border-color: #000;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent, rgba(0, 0, 0, 0.02));
    border-radius: 0 0 0 100%;
}

.mode-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 1rem;
    font-weight: 600;
}

.mode-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.mode-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mode-icon {
    align-self: flex-end;
    margin-top: 1.5rem;
    opacity: 0.2;
    transition: opacity 0.3s;
}

.mode-card:hover .mode-icon {
    opacity: 1;
}

/* --- Curriculum Section --- */
.curriculum-section {
    padding: 6rem 0;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.curriculum-category {
    margin-bottom: 4rem;
}

.category-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid #FFC400;
}

.curriculum-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--subtle-border);
    border-radius: 99px;
    /* Pill shape */
    padding: 1.5rem 2.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
}

@media (prefers-color-scheme: dark) {
    .curriculum-card {
        background: rgba(15, 18, 29, 0.92);
    }
}

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

.curriculum-card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-color: #000;
}

@media (prefers-color-scheme: dark) {
    .curriculum-card:hover {
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.c-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.c-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.c-arrow {
    width: 24px;
    height: 24px;
    color: #000;
    transform: translateX(0);
    transition: transform 0.3s;
}

.curriculum-card:hover .c-arrow {
    transform: translateX(5px);
}

/* --- Study Tools Section --- */
.study-tools-section {
    padding: 6rem 0;

}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: #fff;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 2rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .tool-card {
        background: rgba(15, 18, 29, 0.92);
    }
}

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

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #000;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFC400, #8e6d02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tool-image-wrapper {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid var(--subtle-border);
    position: relative;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-image-wrapper {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tool-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tool-card:hover .tool-image {
    transform: scale(1.05);
}

@media (prefers-color-scheme: dark) {
    .tool-image-wrapper {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
        border-color: rgba(255, 255, 255, 0.08);
    }

    .tool-card:hover .tool-image-wrapper {
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.tool-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 6rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1920 / 952;
    background: #f8f8f8;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid var(--subtle-border);
    box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
    .gallery-item {
        background: rgba(15, 18, 29, 0.5);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .gallery-item:hover {
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    }

    .preview-image-wrapper {
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    }

    .preview-image-wrapper:hover {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    }
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.95;
    line-height: 1.5;
}

/* --- Changelog Section --- */
.changelog-section {
    padding: 6rem 0;
    border-top: 1px solid var(--subtle-border);
}

.changelog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.changelog-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

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

.changelog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.version-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.changelog-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.changelog-features {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.changelog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.changelog-link:hover {
    gap: 0.75rem;
}

.changelog-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

.changelog-link:hover::after {
    transform: translateX(4px);
}

/* --- About Page --- */
.about-main {
    padding-bottom: 6rem;
}

.about-hero {
    text-align: center;
    padding-bottom: 0;
}

.about-hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.btn-text-link {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.about-metrics {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: space-between;
    align-items: stretch;
    /* Ensure cards are same height */
}

.metric-card {
    flex: 1;
    /* Ensure cards are same width */
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

.metric-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0.25rem 0 0.5rem;
}

.metric-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.metric-note {
    font-size: 0.95rem;
}

.about-section {
    padding: 4rem 0 5rem;
}

.about-highlight-grid,
.story-grid,
.team-grid,
.value-grid,
.journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.about-highlight-card ul,
.story-card ul,
.team-card ul,
.global-card ul {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.team-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
}

.team-card h3 {
    margin: 0.5rem 0 0.75rem;
}

.value-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.value-card h3 {
    margin-bottom: 0.5rem;
}

.journey-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.journey-step {
    border-left: 3px solid #2563eb;
}

.journey-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.global-presence {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.global-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.global-tags span {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 0.85rem;
}

.about-cta {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.about-cta h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .about-cta {
        flex-direction: column;
        text-align: center;
    }

    .about-metrics {
        flex-direction: column;
    }
}

/* --- Help Center --- */
.help-main {
    padding-bottom: 6rem;
}

.help-hero {
    padding-bottom: 2rem;
}

.help-search {
    margin-top: 2rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.help-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 0.75rem 0.5rem;
}

.help-search input:focus {
    outline: none;
}

.help-section {
    padding: 4rem 0 5rem;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.help-card ul {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
}

.contact-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.contact-copy {
    padding: 0.5rem 0;
}

.contact-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .contact-card {
        flex-direction: column;
        text-align: center;
        align-items: flex-start;
    }
}

/* --- Policy Page --- */
.policy-main {
    padding-bottom: 6rem;
}

.policy-hero {
    padding-bottom: 2rem;
    text-align: center;
}

.policy-hero-content {
    margin-left: auto;
    margin-right: auto;
}

.policy-hero-content h1 {
    margin-bottom: 1rem;
}

.policy-meta {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.policy-meta article {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.meta-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.policy-hero-visual {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.privacy-signal {
    background: linear-gradient(135deg, #111, #333);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    color: white;
}

.privacy-signal span {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    opacity: 0.8;
}

.policy-hero-visual ul {
    list-style: none;
    padding-left: 0;
    color: var(--text-secondary);
}

.policy-hero-visual li {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.policy-section {
    margin-top: 2rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.policy-section h2 {
    margin-bottom: 1rem;
}

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

.policy-grid article h3 {
    margin-bottom: 0.5rem;
}

.policy-grid ul,
.policy-list {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    line-height: 1.8;
}

.policy-list li+li {
    margin-top: 0.5rem;
}

/* --- Terms Page --- */
.terms-main {
    padding-bottom: 6rem;
}

.terms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.terms-tags span {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 0.85rem;
}

.terms-section {
    margin-top: 2rem;
    padding: 2.5rem;
}

.terms-section ul {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.terms-section ul li+li {
    margin-top: 0.5rem;
}

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


.feature-metrics {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    align-items: stretch;
    /* Ensure equal height */
}

.feature-metrics .metric-card {
    flex: 1;
    /* Ensure equal width */
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.features-section {
    padding: 4rem 0 5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-list {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.pillar-card {
    text-align: left;
}

.pillar-label {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2563eb;
}

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

/* --- Engines Page --- */
.engines-main {
    padding-bottom: 6rem;
}

.engines-section {
    padding: 4rem 0 5rem;
}

.engine-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.engine-card ul {
    margin-top: 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.engine-card {
    padding: 1.5rem;
}

.engine-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.engine-card-content h3 {
    margin: 0 0 0.4rem 0;
}

.engine-card-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

.engine-card ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.engine-icon.teach {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.engine-icon.learn {
    background: linear-gradient(135deg, #f97316, #fb7185);
}

.engine-icon.memorize {
    background: linear-gradient(135deg, #22c55e, #84cc16);
}

.engine-icon.test {
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
}

.engine-icon.study {
    background: linear-gradient(135deg, #9333ea, #6366f1);
}

.engine-icon.chat {
    background: linear-gradient(135deg, #facc15, #f97316);
}

.engine-icon.report {
    background: linear-gradient(135deg, #64748b, #0f172a);
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.flow-card h3 {
    margin-bottom: 0.5rem;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.visual-card .visual {
    height: 160px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px dashed rgba(0, 0, 0, 0.06);
}

.brain-section {
    padding: 2rem 0 3rem;
}

.brain-band {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.brain-card {
    flex: 1 1 160px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.brain-icon {
    font-size: 2rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.brain-card h3 {
    margin-bottom: 0.3rem;
}

.brain-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Contact Page --- */
.contact-main {
    padding-bottom: 6rem;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 3rem 0;
}

.contact-option h3 {
    margin-bottom: 0.5rem;
}

.contact-form-section {
    margin: 3rem 0;
    padding: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form label {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid var(--subtle-border);
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {

    .contact-form input,
    .contact-form textarea {
        background: rgba(12, 14, 22, 0.95);
        color: var(--text-primary);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.contact-faq .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

/* --- Curriculum Page --- */
.curriculum-main {
    padding-bottom: 6rem;
}

.curriculum-section {
    padding: 4rem 0 5rem;
}

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.curriculum-card {
    display: block;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.curriculum-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.curriculum-card.pill {
    border-radius: 24px;
    color: white;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.curriculum-card.pill::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6), transparent 40%);
}

.curriculum-card.pill h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.curriculum-card.pill p {
    margin: 0;
    font-size: 0.95rem;
}

.curriculum-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.curriculum-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.curriculum-card.igcse {
    background: #3b82f6;
}

.curriculum-card.ecz {
    background: #10b981;
}

.curriculum-card.cbse {
    background: #f97316;
}

.curriculum-card.ib {
    background: #8b5cf6;
}

.curriculum-card.alevel {
    background: #1e40af;
}

.curriculum-card.sat {
    background: #4b5563;
}

.curriculum-card.act {
    background: #3b82f6;
}

.curriculum-card.ap {
    background: #ea580c;
}

.curriculum-card.pearson {
    background: #007ba1;
    /* Edexcel vibe */
}

.curriculum-card.myp {
    background: #0d9488;
}

.curriculum-card.jee {
    background: #dc2626;
    /* Engineering vibe */
}

.curriculum-card.neet {
    background: #16a34a;
    /* Medical vibe */
}

.curriculum-card.mdcat {
    background: #059669;
}

.curriculum-card.ecat {
    background: #0284c7;
}

.curriculum-card.fbise {
    background: #14532d;
    /* Federal board vibe */
}

.curriculum-card.punjab {
    background: #15803d;
}

.curriculum-roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.roadmap-step {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.step-label {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.curriculum-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* --- Roadmap Page --- */
.progress-section {
    text-align: center;
    padding: 0 20px 50px;
    background: transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.progress-section h2 {
    font-size: 2.2rem;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.progress-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.progress-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-ring {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 10px solid var(--ring-color, var(--col-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.progress-ring span {
    width: 60px;
    height: 60px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2c3d;
    background: #f7fbff;
}

@media (prefers-color-scheme: dark) {
    .progress-ring {
        background: rgba(15, 18, 29, 0.95);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .progress-ring span {
        color: var(--text-primary);
        background: rgba(6, 8, 14, 0.8);
    }
}

.progress-card .progress-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--label-color, var(--text-secondary));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-card.teal {
    --ring-color: #25b6c6;
    --label-color: #1aa6bb;
}

.progress-card.orange {
    --ring-color: #f7a321;
    --label-color: #f39c12;
}

.progress-card.pink {
    --ring-color: #e9839a;
    --label-color: #e26a8c;
}

.progress-card.blue {
    --ring-color: #7ec8d6;
    --label-color: #3ba1c4;
}

.progress-card.green {
    --ring-color: #7cc7a4;
    --label-color: #3d996c;
}

.progress-card.magenta {
    --ring-color: #f21b90;
    --label-color: #d50776;
}

.progress-card.navy {
    --ring-color: #3c4f73;
    --label-color: #25334d;
}

.timeline {
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: transparent;
    box-sizing: border-box;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 10px;
    transform: translateX(-50%);
    border-radius: 999px;
    z-index: 0;
}

.timeline-line::before,
.timeline-line::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 26px;
    height: 26px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #f4f7f9;
    border: 6px solid;
}

@media (prefers-color-scheme: dark) {

    .timeline-line::before,
    .timeline-line::after {
        background: rgba(15, 18, 29, 0.95);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.timeline-line::before {
    top: 0;
}

.timeline-line::after {
    bottom: 0;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-in-out;
    z-index: 1;
    --accent-color: var(--text-primary);
    min-height: 140px;
    display: flex;
    align-items: center;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    text-align: right;
    justify-content: flex-end;
    padding-right: 120px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 120px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background-color: white;
    border: 4px solid var(--accent-color);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 2;
}

@media (prefers-color-scheme: dark) {
    .timeline-item::after {
        background-color: rgba(15, 18, 29, 0.95);
    }
}

.timeline-item.left::after {
    right: -13px;
}

.timeline-item.right::after {
    left: -13px;
}

.content-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    height: 100%;
}

.content-wrapper .connector {
    flex-grow: 1;
    border-top: 3px dashed #c5c5c5;
    margin: 0 20px;
    min-width: 50px;
    flex-shrink: 0;
}

.timeline-item.left .content-wrapper {
    flex-direction: row;
    justify-content: flex-end;
    width: calc(100% - 120px);
    margin-left: 120px;
}

.timeline-item.right .content-wrapper {
    flex-direction: row;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    z-index: 2;
}

.timeline-item.left::before {
    right: 32px;
    border-right: 12px solid var(--accent-color);
}

.timeline-item.right::before {
    left: 32px;
    border-left: 12px solid var(--accent-color);
}

.text-content {
    min-width: 150px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-item.left .text-content {
    text-align: left;
}

.date-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.logs {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.logs span {
    display: block;
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 0.85rem;
}

.logs span.video-log-link {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 2px 0;
}

.logs span.video-log-link:hover {
    color: var(--text-primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.video-modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--subtle-border);
    background: var(--bg-color);
}

.video-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.video-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.video-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

.video-modal-body {
    padding: 0;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 1.5rem 2rem;
    background: var(--bg-color);
}

.video-info p {
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
}

.video-duration {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Manage Videos Link Button */
.manage-videos-link {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.manage-videos-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

/* Responsive Video Modal */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .video-modal-header {
        padding: 1rem 1.5rem;
    }

    .video-modal-header h3 {
        font-size: 1.25rem;
    }

    .video-info {
        padding: 1rem 1.5rem;
    }

    /* PDF Viewer mobile styles */
    .video-player-wrapper {
        padding-bottom: 100%;
        min-height: 400px;
        max-height: 70vh;
    }

    #pdfViewer {
        min-height: 400px;
        max-height: 70vh;
    }
}

.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    border: 6px solid var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.community-main {
    padding-bottom: 6rem;
}

.community-section {
    padding: 4rem 0 5rem;
}

.community-grid,
.events-grid,
.leader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.community-card,
.event-card,
.leader-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-sm);
    border: 1px solid var(--subtle-border);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* --- Logs Page --- */
.logs-main {
    padding-bottom: 6rem;
}

.logs-section {
    padding: 3rem 0;
}

.log-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.log-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.log-archive {
    list-style: none;
    margin-top: 1rem;
    padding-left: 0;
    color: var(--text-secondary);
}

.log-archive li {
    margin-bottom: 0.35rem;
}

.log-archive span {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* --- Blog Page --- */
.blog-main {
    padding-bottom: 6rem;
}

.blog-section {
    padding: 3rem 0 4rem;
}

.blog-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.blog-card h3 {
    margin-bottom: 0.5rem;
}

.blog-card p {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subscribe-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.subscribe-form input {
    border: 1px solid var(--subtle-border);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    min-width: 220px;
}

.subscribe-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

@media (prefers-color-scheme: dark) {
    .icon-box {
        background: rgba(15, 18, 29, 0.95);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    }
}

.icon-box:hover {
    transform: scale(1.1);
}

/* PDF Icon Styling */
.pdf-icon {
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-icon:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1)) !important;
}

.pdf-icon i {
    color: #dc2626;
    transition: color 0.3s ease;
}

.pdf-icon:hover i {
    color: #ef4444;
}

@media (prefers-color-scheme: dark) {
    .pdf-icon i {
        color: #f87171;
    }

    .pdf-icon:hover i {
        color: #fca5a5;
    }

    .pdf-icon:hover {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2)) !important;
    }
}

/* PDF Viewer Modal */
#pdfViewer {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

#pdfDownload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-item.teal {
    --accent-color: #29aebb;
}

.timeline-item.orange {
    --accent-color: #f39c12;
}

.timeline-item.pink {
    --accent-color: #d97b80;
}

.timeline-item.navy {
    --accent-color: #34495e;
}

.timeline-item.lblue {
    --accent-color: #8ab6c9;
}

.timeline-item.green {
    --accent-color: #4caf50;
}

@media screen and (max-width: 768px) {
    .timeline-line {
        left: 31px;
        transform: none;
    }

    .timeline {
        min-height: auto;
        display: block;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
    }

    .timeline-item::after {
        left: 21px !important;
        right: auto;
    }

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

    .content-wrapper .connector {
        display: none;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-left: 15px;
        margin-right: 0;
    }

    /* Make left side exactly like right side on mobile */
    .timeline-item.left,
    .timeline-item.right {
        text-align: left !important;
        justify-content: flex-start !important;
        padding-right: 0 !important;
        padding-left: 70px !important;
    }

    .timeline-item.left .content-wrapper,
    .timeline-item.right .content-wrapper {
        flex-direction: column !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin-left: 0 !important;
        align-items: flex-start !important;
    }

    .timeline-item.left .text-content,
    .timeline-item.right .text-content {
        text-align: left !important;
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 15px;
        width: 100%;
    }

    /* Reorder left side to match right side HTML structure */
    .timeline-item.left .text-content {
        order: 1 !important;
    }

    .timeline-item.left .icon-box {
        order: 2 !important;
    }

    .timeline-item.left .icon-box,
    .timeline-item.right .icon-box {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--subtle-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: #999;
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Dark Theme (prefers-color-scheme) --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #04060b;
        --surface-color: #0b0e16;
        --text-primary: #f7f9ff;
        --text-secondary: #c2c6d8;
        --subtle-border: rgba(255, 255, 255, 0.08);
        --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.65);
        --shadow-lg: 0 35px 70px -20px rgba(0, 0, 0, 0.75);
    }

    body {
        background-color: var(--bg-color);
        color-scheme: dark;
    }

    body.roadmap {
        background-color: var(--bg-color);
    }

    nav,
    body.roadmap nav {
        background: transparent;
        border-bottom: none;
        box-shadow: 0;
        border: 0;
    }

    .nav-btn {
        background: rgba(20, 24, 37, 0.95);
        color: var(--text-primary);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55);
    }

    .nav-btn:hover {
        background: rgba(30, 36, 55, 0.95);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .hero-pill {
        background: rgba(96, 165, 250, 0.2);
        color: #93c5fd;
        border-color: rgba(96, 165, 250, 0.4);
    }

    .nav-links a,
    footer a {
        color: var(--text-secondary);
    }

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

    input,
    textarea,
    select {
        background: rgba(12, 14, 22, 0.95);
        color: var(--text-primary);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .docs-warning {
        background: rgba(86, 64, 14, 0.55);
        border-left-color: #f9c74f;
    }

    .docs-info {
        background: rgba(23, 63, 92, 0.65);
        border-left-color: #38bdf8;
    }

    .docs-tip {
        background: rgba(16, 66, 53, 0.6);
        border-left-color: #34d399;
    }

    /* Hero and Typography */
    h1 {
        background: linear-gradient(to bottom, #f7f9ff, #c2c6d8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

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

    /* Reduce canvas visibility in dark mode */
    canvas {
        opacity: 0.3;
    }

    /* Cards and Surfaces */
    .card {
        background: rgba(15, 18, 29, 0.6);
        backdrop-filter: blur(20px);
    }

    .card:hover {
        background: rgba(15, 18, 29, 0.92);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .icon-box {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-primary);
    }

    /* Mode Cards */
    .mode-card:hover {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .mode-card::before {
        background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.03));
    }

    .mode-tag {
        color: var(--text-secondary);
    }

    /* Curriculum Cards */
    .curriculum-card {
        background: rgba(15, 18, 29, 0.92);
    }

    .curriculum-card:hover {
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .c-arrow {
        color: var(--text-primary);
    }

    /* Tool Cards */
    .tool-card:hover {
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    /* Gallery */
    .gallery-item {
        background: rgba(15, 18, 29, 0.5);
    }

    /* Code Blocks */
    .docs-section code {
        background: rgba(255, 255, 255, 0.08);
        color: #f472b6;
    }

    .docs-section pre {
        background: rgba(15, 18, 29, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .docs-section pre code {
        color: var(--text-primary);
    }

    /* Links and Accents */
    a {
        color: var(--text-secondary);
    }

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

    /* Footer */
    .footer-bottom {
        color: var(--text-secondary);
    }

    /* Decoration Blobs */
    .blob-1 {
        background: rgba(96, 165, 250, 0.15);
    }

    .blob-2 {
        background: rgba(192, 132, 252, 0.15);
    }

    .blob-3 {
        background: rgba(96, 165, 250, 0.1);
    }

    /* Search Input */
    .subscribe-form input,
    input[type="search"],
    input[type="text"],
    input[type="email"] {
        background: rgba(12, 14, 22, 0.95);
        color: var(--text-primary);
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .subscribe-form input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
    }

    /* Section Borders */
    .curriculum-section,
    .study-tools-section,
    .gallery-section,
    .changelog-section {
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .policy-meta article {
        background: rgba(15, 18, 29, 0.92);
    }

    .policy-hero-visual li {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Feature Metrics */
    .feature-metrics .metric-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Engine Cards */
    .engine-card-content {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Brain Cards */
    .brain-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Contact Form */
    .contact-form input,
    .contact-form textarea {
        background: rgba(12, 14, 22, 0.95);
        color: var(--text-primary);
    }

    /* Subscribe Card */
    .subscribe-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Log Cards */
    .log-card {
        background: rgba(15, 18, 29, 0.92);
    }

    .log-meta {
        color: var(--text-secondary);
    }

    /* Blog Cards */
    .blog-card {
        background: rgba(15, 18, 29, 0.92);
    }

    .blog-meta {
        color: var(--text-secondary);
    }

    /* Community Cards */
    .community-card,
    .event-card,
    .leader-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Help Cards */
    .help-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Policy Cards */
    .policy-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Cookie Cards */
    .cookie-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Docs Highlight Cards */
    .docs-highlight-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Links with specific colors */
    .nav-links a::after {
        background: #FFC400;
    }

    /* Section Headers */
    .section-header h2 {
        color: var(--text-primary);
    }

    /* Mode Icon Opacity */
    .mode-icon {
        opacity: 0.3;
    }

    .mode-card:hover .mode-icon {
        opacity: 0.6;
    }

    /* Changelog Section */
    .changelog-card {
        background: rgba(15, 18, 29, 0.6);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .changelog-card:hover {
        background: rgba(15, 18, 29, 0.92);
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: var(--shadow-lg);
    }

    .version-badge {
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-secondary);
    }

    /* Changelog Links */
    .changelog-link {
        color: #fb923c;
    }

    .changelog-link:hover {
        color: #fdba74;
    }

    /* Team and Journey */
    .team-role {
        color: #60a5fa;
    }

    .journey-step {
        border-left-color: #60a5fa;
    }

    /* About Highlight Cards */
    .about-highlight-card,
    .story-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Login Page */
    .login-form {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Help Search */
    .help-search input {
        background: rgba(12, 14, 22, 0.95);
        color: var(--text-primary);
    }

    /* Feature Cards */
    .feature-card h3 {
        color: var(--text-primary);
    }

    /* Pillar Cards */
    .pillar-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Visual Cards */
    .visual-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Flow Cards */
    .flow-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Roadmap Timeline */
    .timeline-line {
        background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0.1),
                rgba(255, 255, 255, 0.1));
    }

    .timeline-item {
        color: var(--text-primary);
    }

    .timeline-dot {
        background: var(--bg-color);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Progress Reports */
    .progress-reports {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Curriculum Pill Cards */
    .curriculum-card.pill {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Roadmap Progress Rings */
    .progress-ring {
        background: rgba(15, 18, 29, 0.95);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .progress-ring span {
        color: var(--text-primary);
        background: rgba(6, 8, 14, 0.8);
    }

    /* Timeline */
    .timeline-line::before,
    .timeline-line::after {
        background: rgba(15, 18, 29, 0.95);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .timeline-item::after {
        background-color: rgba(15, 18, 29, 0.95);
        border-color: var(--accent-color);
    }

    .content-wrapper .connector {
        border-top-color: rgba(255, 255, 255, 0.2);
    }

    /* Curriculum Roadmap */
    .curriculum-roadmap {
        background: rgba(15, 18, 29, 0.92);
    }

    .roadmap-step {
        background: rgba(15, 18, 29, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    /* Curriculum Page Cards */
    .curriculum-card {
        background: rgba(15, 18, 29, 0.92);
    }

    .curriculum-tag {
        background: rgba(255, 255, 255, 0.15);
    }

    /* Feature Cards */
    .feature-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Contact Card */
    .contact-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Team, Value, and Global Cards */
    .team-card,
    .value-card,
    .global-card {
        background: rgba(15, 18, 29, 0.92);
    }

    /* FAQ Items */
    .faq-item {
        background: rgba(15, 18, 29, 0.92);
    }

    /* Contact Options */
    .contact-option {
        background: transparent !important;
    }

    /* Step Label */
    .step-label {
        background: rgba(96, 165, 250, 0.15);
        color: #60a5fa;
    }

    /* Engine Card */
    .engine-card {
        background: rgba(15, 18, 29, 0.92);
    }
}

/* Floating Element Decoration */
.decoration {
    position: absolute;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #e0e7ff;
    top: 20%;
    left: 10%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #f3e8ff;
    bottom: 20%;
    right: 10%;
    animation-delay: -5s;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #dbeafe;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: -2s;
    border-radius: 50%;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .decoration {
        display: none;
    }

    h1 {
        font-size: 3.5rem;
    }

    .curriculum-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        border-radius: 1.5rem;
    }

    .c-arrow {
        align-self: flex-end;
    }


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

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

/* Dark Mode for Video Modal */
@media (prefers-color-scheme: dark) {
    .video-modal {
        background-color: rgba(0, 0, 0, 0.92);
    }

    .video-duration {
        background: rgba(37, 99, 235, 0.2);
        color: #60a5fa;
    }

    .logs span.video-log-link:hover {
        background: rgba(37, 99, 235, 0.15);
    }
}

/* --- AI Personalities Section --- */
.ai-personalities-section {
    padding: 6rem 0;
    border-top: 1px solid var(--subtle-border);
}

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

.personality-card {
    position: relative;
    text-align: center;
    padding: 3rem 2rem;
}

.personality-card.featured {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border-color: rgba(37, 99, 235, 0.2);
}

.personality-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.personality-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.personality-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.personality-features {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    text-align: left;
}

.personality-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.personality-features li::before {
    content: '✓';
    color: #2563eb;
    font-weight: bold;
    margin-right: 0.75rem;
}

/* --- PCPDM Section --- */
.pcpdm-section {
    padding: 6rem 0;
    border-top: 1px solid var(--subtle-border);
}

.pcpdm-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 2rem;
}

.pcpdm-step {
    background: #fff;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    min-width: 150px;
    flex: 1;
    max-width: 160px;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .pcpdm-step {
        background: rgba(15, 18, 29, 0.92);
    }
}

.pcpdm-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #FFC400;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFC400, #ffc400bd);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
    font-size: 1.1rem;
}

.pcpdm-step h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.pcpdm-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pcpdm-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

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

.pcpdm-feature-card {
    padding: 2rem;
    text-align: center;
}

.pcpdm-feature-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* --- Collaboration Section --- */
.collaboration-section {
    padding: 6rem 0;
    border-top: 1px solid var(--subtle-border);
}

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

.collab-card {
    padding: 2.5rem;
    text-align: center;
}

.collab-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.collab-features {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    text-align: center;
}

.collab-features li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.collab-features li::before {
    content: '→';
    color: #2563eb;
    font-weight: bold;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    /* Precise alignment with the first line */
}

/* --- Final Closing Section --- */
.final-closing-section {
    padding: 5rem 0 10rem;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(255, 196, 0, 0.05) 0%, transparent 70%);
}

.final-closing-section .section-header-link {
    font-size: clamp(3.5rem, 10vw, 7rem);
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(255, 196, 0, 0.2));
}

.closing-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .final-closing-section {
        padding: 5rem 1rem 8rem;
    }

    .closing-subtitle {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {

    .personality-grid,
    .collab-grid {
        grid-template-columns: 1fr;
    }

    .pcpdm-flow {
        flex-direction: column;
        gap: 1.5rem;
    }

    .pcpdm-arrow {
        transform: rotate(90deg);
    }

    .pcpdm-step {
        max-width: 100%;
    }
}


/* ==================== CONTACT PAGE STYLES ==================== */

/* Contact Hero */
.contact-main .hero {
    min-height: 60vh;
    padding: 6rem 2rem;
    text-align: center;
}

.contact-hero .hero-pill {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Contact Options */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem auto;
    max-width: 1200px;
    padding: 0 2rem;
}

.contact-option {
    background: transparent;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-option:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.3);
}

.contact-option h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-option .btn-text-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.contact-option .btn-text-link:hover {
    gap: 0.75rem;
}

/* Contact Form Section */
.contact-form-section {
    background: var(--surface-color);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-md);
    padding: 3rem;
    margin: 4rem auto;
    box-shadow: var(--shadow-sm);
}

.contact-form-section:hover {
    box-shadow: var(--shadow-lg);
}

.contact-form-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-form-section>div:first-child p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.error {
    color: #ef4444;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.5;
}

.checkbox-group a {
    color: #2563eb;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Submit Button */
.form-submit-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-submit-btn.loading .btn-text {
    display: none;
}

.form-submit-btn.loading .spinner {
    display: block;
}

/* Form Footer Note */
.form-footer-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--subtle-border);
}

.form-footer-note a {
    color: #2563eb;
    text-decoration: none;
}

.form-footer-note a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.contact-faq {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.contact-faq .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--surface-color);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(37, 99, 235, 0.2);
}

.faq-item h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Toast Notification System */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background: var(--surface-color);
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    backdrop-filter: blur(10px);
}

.toast-notification.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(21, 128, 61, 0.9));
    border-color: rgba(34, 197, 94, 0.3);
    color: white;
}

.toast-notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.9));
    border-color: rgba(239, 68, 68, 0.3);
    color: white;
}

.toast-notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(29, 78, 216, 0.9));
    border-color: rgba(59, 130, 246, 0.3);
    color: white;
}

.toast-icon {
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

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

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-notification.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* Form Messages */
.form-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(21, 128, 61, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #166534;
}

.form-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(185, 28, 28, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-main .hero {
        padding: 4rem 1rem;
        min-height: 50vh;
    }

    .contact-options {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .contact-form-section {
        padding: 2rem;
        margin: 3rem 1rem;
    }

    .contact-form-section h2 {
        font-size: 2rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #toastContainer {
        left: 20px;
        right: 20px;
        top: 10px;
    }

    .toast-notification {
        max-width: none;
    }

    @keyframes toastSlideIn {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes toastSlideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }

        to {
            transform: translateY(-100%);
            opacity: 0;
        }
    }
}

@media (max-width: 480px) {
    .contact-form-section {
        padding: 1.5rem;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        padding: 0.875rem;
    }

    .form-submit-btn {
        padding: 0.875rem 1.5rem;
        width: 100%;
    }

    .contact-option {
        padding: 2rem;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .contact-option:hover {
        border-color: rgba(96, 165, 250, 0.3);
        background: rgba(15, 18, 29, 0.95);
    }

    .contact-form-section {
        background: rgba(15, 18, 29, 0.9);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        background: rgba(12, 14, 22, 0.95);
        border-color: rgba(255, 255, 255, 0.12);
        color: var(--text-primary);
    }

    .contact-form input:focus,
    .contact-form textarea:focus,
    .contact-form select:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }

    .contact-option .btn-text-link {
        color: #60a5fa;
    }

    .faq-item {
        background: rgba(15, 18, 29, 0.9);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .faq-item:hover {
        border-color: rgba(96, 165, 250, 0.3);
    }

    .form-footer-note a,
    .checkbox-group a {
        color: #60a5fa;
    }

    .form-submit-btn {
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    }

    .toast-notification {
        background: rgba(15, 18, 29, 0.95);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .form-message.success {
        background: rgba(34, 197, 94, 0.15);
        border-color: rgba(34, 197, 94, 0.3);
        color: #86efac;
    }

    .form-message.error {
        background: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.3);
        color: #fca5a5;
    }
}

/* Corner "SOON" ribbon */
.tool-card.coming-soon .soon-badge {
    position: absolute;
    top: 14px;
    right: -44px;
    transform: rotate(45deg);
    width: 140px;
    text-align: center;

    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: #fff;
    background: linear-gradient(135deg, #ff0505, #3b2d2d);

    /* 3D / raised look */
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.35),
        0 3px 0 rgba(255, 255, 255, 0.12) inset;

    z-index: 5;
    pointer-events: none;
}

/* Small folded ends for extra 3D feel */
.tool-card.coming-soon .soon-badge::before,
.tool-card.coming-soon .soon-badge::after {
    content: "";
    position: absolute;
    top: 100%;
    width: 10px;
    height: 10px;
    background: #4c0000;
    filter: brightness(0.75);
}

.tool-card.coming-soon .soon-badge::before {
    left: 0;
    transform: skewX(-20deg);
}

.tool-card.coming-soon .soon-badge::after {
    right: 0;
    transform: skewX(20deg);
}

/* Optional: slightly "disabled" feel while still readable */
.tool-card.coming-soon {
    opacity: 0.95;
}

.tool-card.coming-soon:hover {
    transform: translateY(-4px);
}

/* ==================== WISHLIST MODAL STYLES ==================== */

/* Modal Overlay */
.wishlist-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

/* Modal Content */
.wishlist-modal-content {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 196, 0, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (prefers-color-scheme: dark) {
    .wishlist-modal-content {
        background: #111111;
        border: 1px solid rgba(255, 196, 0, 0.2);
    }
}

/* Close Button */
.wishlist-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    color: #999;
    transition: color 0.3s;
}

.wishlist-close:hover {
    color: #FFC400;
}

/* Header */
.wishlist-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {
    .wishlist-header h3 {
        color: #fff;
    }
}

.wishlist-header p {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 1rem;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .wishlist-header p {
        color: #aaa;
    }
}

/* Input Field */
.wishlist-body input {
    width: 100%;
    padding: 15px;
    margin-bottom: 8px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
    background: #f9f9f9;
}

@media (prefers-color-scheme: dark) {
    .wishlist-body input {
        background: #1a1a1a;
        border-color: #333;
        color: #fff;
    }
}

.wishlist-body input:focus {
    border-color: #FFC400;
    box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.1);
    background: #fff;
}

@media (prefers-color-scheme: dark) {
    .wishlist-body input:focus {
        background: #222;
    }
}

/* Submit Button */
.wishlist-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FFC400, #ffb300);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
    box-shadow: 0 4px 15px rgba(255, 196, 0, 0.3);
}

.wishlist-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 196, 0, 0.4);
}

.wishlist-submit-btn:active {
    transform: translateY(1px);
}

.wishlist-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secure Text */
.secure-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Messages */
.wishlist-message {
    min-height: 20px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 5px;
}

.wishlist-message.error {
    color: #ff4444;
}

.wishlist-message.success {
    color: #00c851;
}

/* ==================== SUCCESS POPUP ==================== */
.wishlist-success-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    text-align: center;
    flex-direction: column;
    align-items: center;
    animation: popupPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@media (prefers-color-scheme: dark) {
    .wishlist-success-popup {
        background: #1a1a1a;
        border: 2px solid #FFC400;
        color: #fff;
    }
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.wishlist-success-popup h4 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #333;
}

@media (prefers-color-scheme: dark) {
    .wishlist-success-popup h4 {
        color: #FFC400;
    }
}

.wishlist-success-popup p {
    margin: 0;
    color: #666;
}

@media (prefers-color-scheme: dark) {
    .wishlist-success-popup p {
        color: #ccc;
    }
}

/* ==================== SPARKLES ANIMATION ==================== */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10002;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 6px;
    /* Dynamically set in JS but defaults here */
    height: 6px;
    background: #FFC400;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    /* Custom properties set in JS: --tx, --ty, --end-tx, --end-ty */
    animation: sparkleAnim 1s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }

    30% {
        transform: translate(var(--tx), var(--ty)) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(var(--end-tx), var(--end-ty)) scale(0);
        opacity: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popupPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ==================== REVIEWS SECTION ==================== */

.reviews-section {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.reviews-container {
    position: relative;
    width: 100vw;
    margin-left: -50vw;
    left: 50%;
    height: 550px;
    /* Reduced height */
    overflow: hidden;
    margin-top: 2rem;
}

/* ==================== MINIMAL GLASS CARDS ==================== */
.review-card {
    flex: 0 0 380px;
    /* Smaller width */
    height: 200px;
    /* Smaller height */
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Simple border */
.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

/* Subtle hover effect only */
.review-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.review-card:hover::before {
    border-color: rgba(255, 196, 0, 0.3);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .review-card {
        background: rgba(30, 33, 44, 0.224);
        border: 1px solid rgba(255, 255, 255, 0);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.598);
    }

    .review-card:hover {
        background: rgba(30, 33, 44, 0);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    .review-card::before {
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* ==================== SMOOTH SLIDING ==================== */
.reviews-slider {
    position: absolute;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    left: 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Top slider */
.slider-left {
    top: 30px;
    animation: slideLeftSeamless 25s linear infinite;
}

/* Bottom slider */
.slider-right {
    bottom: 30px;
    animation: slideRightSeamless 25s linear infinite;
}

/* Smooth infinite animations */
@keyframes slideLeftSeamless {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes slideRightSeamless {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Slider Track */
.slider-track {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 0 40px;
    transform: translate3d(0, 0, 0);
}

/* Hover stop effect */
.reviews-slider:hover .slider-track {
    animation-play-state: paused;
}

/* Pause animation when hovered */
.reviews-slider:hover {
    animation-play-state: paused;
}

/* ==================== CARD CONTENT - MINIMAL ==================== */
.review-header {
    margin-bottom: 0.75rem;
}

.reviewer-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.review-content {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.3;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .review-footer {
        border-top: 1px solid rgba(255, 255, 255, 0);
    }
}

.reviewer-occupation {
    font-style: italic;
    color: #FFC400;
    font-weight: 500;
}

.reviewer-age {
    opacity: 0.7;
    background: rgba(255, 196, 0, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: 500;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Large Desktops (1440px+) */
@media (min-width: 1440px) {
    .reviews-container {
        height: 600px;
    }

    .review-card {
        flex: 0 0 420px;
        height: 220px;
        padding: 1.75rem;
    }

    .slider-track {
        gap: 35px;
        padding: 0 60px;
    }

    .slider-left {
        top: 80px;
    }

    .slider-right {
        bottom: 80px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 40s;
    }

    .review-content {
        font-size: 1rem;
        -webkit-line-clamp: 4;
    }
}

/* Desktop (1025px - 1439px) */
@media (min-width: 1025px) and (max-width: 1439px) {
    .reviews-container {
        height: 550px;
    }

    .review-card {
        flex: 0 0 380px;
        height: 200px;
    }

    .slider-track {
        gap: 30px;
        padding: 0 50px;
    }

    .slider-left {
        top: 60px;
    }

    .slider-right {
        bottom: 60px;
    }
}

/* Tablets (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .reviews-section {
        padding: 3rem 0;
    }

    .reviews-container {
        height: 500px;
        margin-top: 1.5rem;
    }

    .reviews-slider {
        height: 180px;
    }

    .review-card {
        flex: 0 0 340px;
        height: 180px;
        padding: 1.25rem;
        border-radius: 14px;
    }

    .review-card::before {
        border-radius: 14px;
    }

    .slider-left {
        top: 50px;
    }

    .slider-right {
        bottom: 50px;
    }

    .slider-track {
        gap: 25px;
        padding: 0 40px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 20s;
    }

    .reviewer-name {
        font-size: 1rem;
    }

    .review-content {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }

    .review-footer {
        font-size: 0.8rem;
    }

    .reviewer-age {
        padding: 0.25rem 0.7rem;
    }
}

/* Large Phones & Small Tablets (481px - 768px) */
@media (max-width: 768px) {
    .reviews-section {
        padding: 2.5rem 0;
    }

    .reviews-container {
        height: 450px;
        margin-top: 1.5rem;
    }

    .reviews-slider {
        height: 160px;
    }

    /* Maintain vertical spacing */
    .slider-left {
        top: 40px;
    }

    .slider-right {
        bottom: 40px;
    }

    .review-card {
        flex: 0 0 300px;
        height: 200px;
        padding: 1.25rem;
        border-radius: 14px;
    }

    .review-card::before {
        border-radius: 14px;
    }

    .slider-track {
        gap: 20px;
        padding: 0 30px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 25s;
    }

    .reviewer-name {
        font-size: 1rem;
    }

    .review-content {
        font-size: 0.88rem;
        line-height: 1.4;
        -webkit-line-clamp: 3;
        margin-bottom: 0.75rem;
    }

    .review-footer {
        font-size: 0.8rem;
        padding-top: 0.5rem;
    }

    .reviewer-occupation,
    .reviewer-age {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Phones (375px - 480px) */
@media (max-width: 480px) {
    .reviews-section {
        padding: 2rem 0;
    }

    .reviews-section .section-header h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    .reviews-section .section-header p {
        font-size: 0.95rem;
        text-align: center;
        max-width: 90%;
        margin: 0 auto;
    }

    .reviews-container {
        height: 410px;
        margin-top: 1.0rem;
    }

    .reviews-slider {
        height: 140px;
    }

    /* Ensure proper vertical separation */
    .slider-left {
        top: 30px;
    }

    .slider-right {
        bottom: 30px;
    }

    .review-card {
        flex: 0 0 260px;
        height: 200px;
        padding: 0.5rem;
        border-radius: 12px;
        backdrop-filter: blur(6px);
    }

    .review-card::before {
        border-radius: 12px;
    }

    .slider-track {
        gap: 15px;
        padding: 0 25px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 22s;
    }

    .reviewer-name {
        font-size: 0.95rem;
    }

    .review-content {
        font-size: 0.85rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        margin-bottom: 0.5rem;
    }

    .review-footer {
        font-size: 0.75rem;
        padding-top: 0.5rem;
        flex-direction: column;
        gap: 0.4rem;
        align-items: flex-start;
    }

    .reviewer-occupation,
    .reviewer-age {
        padding: 0.15rem 0.5rem;
        font-size: 0.75rem;
        width: fit-content;
    }

    /* Reduce transparency for better readability */
    .review-card {
        background: rgba(255, 255, 255, 0);
    }

    @media (prefers-color-scheme: dark) {
        .review-card {
            background: rgba(0, 0, 0, 0.253);
        }
    }
}

/* Small Phones (320px - 374px) */
@media (max-width: 374px) {
    .reviews-section {
        padding: 1.5rem 0;
    }

    .reviews-section .section-header h2 {
        font-size: 1.4rem;
    }

    .reviews-section .section-header p {
        font-size: 0.85rem;
    }

    .reviews-container {
        height: 350px;
        margin-top: 1rem;
    }

    .reviews-slider {
        height: 130px;
    }

    .slider-left {
        top: 25px;
    }

    .slider-right {
        bottom: 25px;
    }

    .review-card {
        flex: 0 0 230px;
        height: 130px;
        padding: 0.875rem;
        border-radius: 10px;
    }

    .review-card::before {
        border-radius: 10px;
    }

    .slider-track {
        gap: 12px;
        padding: 0 20px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 20s;
    }

    .reviewer-name {
        font-size: 0.9rem;
    }

    .review-content {
        font-size: 0.8rem;
        line-height: 1.2;
        -webkit-line-clamp: 2;
        margin-bottom: 0.5rem;
    }

    .review-footer {
        font-size: 0.7rem;
        padding-top: 0.4rem;
    }

    .reviewer-occupation,
    .reviewer-age {
        padding: 0.1rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .reviews-section {
        padding: 1.5rem 0;
    }

    .reviews-container {
        height: 300px;
        margin-top: 1rem;
    }

    .reviews-slider {
        height: 120px;
    }

    .slider-left {
        top: 25px;
    }

    .slider-right {
        bottom: 25px;
    }

    .review-card {
        flex: 0 0 280px;
        height: 120px;
        padding: 0.875rem;
    }

    .slider-track {
        gap: 15px;
        padding: 0 25px;
    }

    .slider-left,
    .slider-right {
        animation-duration: 18s;
    }

    .review-content {
        font-size: 0.8rem;
        line-height: 1.2;
        -webkit-line-clamp: 2;
    }

    .review-footer {
        font-size: 0.7rem;
        padding-top: 0.3rem;
    }
}

/* Performance optimization for animations */
@media (prefers-reduced-motion: reduce) {

    .slider-left,
    .slider-right {
        animation-duration: 30s !important;
        animation-timing-function: linear !important;
    }

    .review-card:hover {
        transform: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .review-card:hover {
        transform: none;
    }

    .review-card:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.95);
    }

    @media (prefers-color-scheme: dark) {
        .review-card:active {
            background: rgba(30, 33, 44, 0.95);
        }
    }

    /* Don't pause on hover for touch devices */
    .reviews-slider:hover {
        animation-play-state: running;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .review-card {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #000;
    }

    @media (prefers-color-scheme: dark) {
        .review-card {
            background: rgba(0, 0, 0, 0.98);
            border: 1px solid #fff;
        }
    }

    .review-card::before {
        display: none;
    }
}

/* Ensure sliders never overlap */
.reviews-slider {
    z-index: 1;
}

.slider-left {
    z-index: 2;
}

.slider-right {
    z-index: 1;
}

/* Smoother animation on lower-end devices */
.reviews-slider {
    animation-timing-function: linear;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize for 60fps */
.slider-track {
    will-change: transform;
    backface-visibility: hidden;
}

/* ==================== PERFORMANCE & VISIBILITY ENHANCEMENTS ==================== */

/* Ensure maximum visibility */
.reviews-slider,
.slider-track,
.review-card {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hardware acceleration for smooth animations */
.reviews-slider {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}



/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .review-card:hover {
        transform: none;
        animation: none;
    }

    .review-card:active {
        transform: scale(0.98);
        animation: borderGlow 0.5s ease;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .slider-left,
    .slider-right {
        animation-duration: 60s;
    }

    .review-card:hover {
        transform: none;
        animation: none;
    }
}

/* ==========================================================================
   AI Personalities Section Redesign
   ========================================================================== */

.ai-personalities-section {
    padding: 4rem 0;
    position: relative;
    background: transparent;
    border-top: 1px solid var(--subtle-border);
}

.ai-personalities-section .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.personality-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Personality Card */
.personality-card {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    text-align: center;
    padding: 2.5rem 2rem;
    border: 1px solid var(--subtle-border);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.personality-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 196, 0, 0.3);
    background: rgba(255, 255, 255, 0.98);
}

@media (prefers-color-scheme: dark) {
    .personality-card {
        background: rgba(15, 18, 29, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .personality-card:hover {
        background: rgba(15, 18, 29, 0.98);
        border-color: rgba(255, 196, 0, 0.3);
    }
}

/* Featured Card (Teach Me) - Gold Theme */
/* Featured Card */
.personality-card.featured {
    border: 2px solid rgba(255, 196, 0, 0.16);
    background: linear-gradient(135deg,
            rgba(255, 196, 0, 0.05),
            rgba(255, 196, 0, 0.02));
    position: relative;
}

.personality-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFC400, #ff9500);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 196, 0, 0.3);
    z-index: 2;
}

/* Icons */
/* Personality Icon */
.personality-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            rgba(255, 196, 0, 0.1),
            rgba(255, 196, 0, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.personality-card:hover .personality-icon {
    transform: scale(1.1);
}

.personality-icon img {
    width: 70px;
    height: 75px;
    object-fit: contain;
}

/* Content Styling */
.personality-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.personality-label {
    display: block;
    font-size: 0.9rem;
    color: #FFC400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.personality-card>p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Feature Lists */
/* Features List */
.personality-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    text-align: left;
    width: 100%;
}

.personality-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    padding-left: 2rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.personality-features li:last-child {
    border-bottom: none;
}

@media (prefers-color-scheme: dark) {
    .personality-features li {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
}

.personality-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #FFC400;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ==================== RESPONSIVE VERSIONS ==================== */

/* Large Desktop (1440px and above) */
@media (min-width: 1440px) {
    .ai-personalities-section {
        padding: 5rem 0;
    }

    .personality-grid {
        gap: 3rem;
        padding: 0 2rem;
    }

    .personality-card {
        padding: 3rem 2.5rem;
        max-width: 420px;
    }

    .personality-card h3 {
        font-size: 1.7rem;
    }

    .personality-label {
        font-size: 1rem;
    }

    .personality-card>p {
        font-size: 1.05rem;
    }

    .personality-features li {
        font-size: 1rem;
        padding: 0.9rem 0;
        padding-left: 2.5rem;
    }

    .personality-icon {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .personality-icon img {
        width: 85px;
        height: 90px;
    }
}

/* Desktop (1025px - 1439px) */
@media (min-width: 1025px) and (max-width: 1439px) {
    .ai-personalities-section {
        padding: 4rem 0;
    }

    .personality-grid {
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .personality-card {
        padding: 2.5rem 2rem;
        max-width: 380px;
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .ai-personalities-section {
        padding: 3.5rem 0;
    }

    .personality-grid {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .personality-card {
        padding: 2rem 1.5rem;
        min-width: 240px;
        max-width: 340px;
    }

    .personality-card h3 {
        font-size: 1.4rem;
    }

    .personality-icon {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
        margin-bottom: 1.25rem;
    }

    .personality-icon img {
        width: 60px;
        height: 65px;
    }

    .personality-label {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .personality-card>p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .personality-features {
        margin-top: 1.5rem;
    }

    .personality-features li {
        font-size: 0.9rem;
        padding: 0.6rem 0;
        padding-left: 1.75rem;
    }
}

/* Tablet Portrait & Large Phones (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .ai-personalities-section {
        padding: 3rem 0;
    }

    .ai-personalities-section .section-header {
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }

    .personality-grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .personality-card {
        flex: 0 1 calc(50% - 1rem);
        min-width: 280px;
        max-width: 340px;
        padding: 2rem 1.5rem;
    }

    .personality-card.featured {
        order: -1;
        /* Move featured card to top */
        flex: 0 1 100%;
        max-width: 400px;
        margin-bottom: 1rem;
    }

    .personality-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .personality-icon img {
        width: 60px;
        height: 65px;
    }

    .personality-card h3 {
        font-size: 1.4rem;
    }

    .personality-card>p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .personality-features li {
        font-size: 0.9rem;
        padding: 0.6rem 0;
        padding-left: 1.75rem;
    }

    .personality-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1.25rem;
    }
}

/* Small Phones (320px - 480px) */
@media (max-width: 480px) {
    .ai-personalities-section {
        padding: 2.5rem 0;
    }

    .ai-personalities-section .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .ai-personalities-section .section-header h2 {
        font-size: 1.8rem;
    }

    .ai-personalities-section .section-header p {
        font-size: 1rem;
    }

    .personality-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .personality-card {
        width: 100%;
        max-width: 320px;
        padding: 2rem 1.5rem;
        min-width: unset;
    }

    .personality-card.featured {
        border-width: 2px;
        background: linear-gradient(135deg,
                rgba(255, 196, 0, 0.08),
                rgba(255, 196, 0, 0.03));
    }

    .personality-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .personality-icon img {
        width: 55px;
        height: 60px;
    }

    .personality-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .personality-label {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .personality-card>p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .personality-features {
        margin-top: 1.5rem;
    }

    .personality-features li {
        font-size: 0.85rem;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
    }

    .personality-badge {
        font-size: 0.7rem;
        padding: 0.35rem 1rem;
        top: -10px;
    }

    /* Adjust hover effects for touch devices */
    .personality-card:hover {
        transform: none;
    }

    .personality-card:active {
        transform: scale(0.98);
    }
}

/* Extra Small Phones (under 320px) */
@media (max-width: 320px) {
    .ai-personalities-section {
        padding: 2rem 0;
    }

    .ai-personalities-section .section-header h2 {
        font-size: 1.6rem;
    }

    .ai-personalities-section .section-header p {
        font-size: 0.95rem;
    }

    .personality-card {
        padding: 1.5rem 1.25rem;
        max-width: 280px;
    }

    .personality-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .personality-icon img {
        width: 50px;
        height: 55px;
    }

    .personality-card h3 {
        font-size: 1.2rem;
    }

    .personality-card>p {
        font-size: 0.85rem;
    }

    .personality-features li {
        font-size: 0.8rem;
        padding: 0.4rem 0;
        padding-left: 1.25rem;
    }
}

/* Landscape Mode for Phones */
@media (max-height: 500px) and (orientation: landscape) {
    .ai-personalities-section {
        padding: 1.5rem 0;
    }

    .personality-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .personality-card {
        padding: 1.5rem 1rem;
        min-width: 200px;
    }

    .personality-card h3 {
        font-size: 1.2rem;
    }

    .personality-card>p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .personality-features {
        margin-top: 1rem;
    }

    .personality-features li {
        font-size: 0.8rem;
        padding: 0.3rem 0;
        padding-left: 1.25rem;
    }
}

/* Dark Mode Adjustments for All Sizes */
@media (prefers-color-scheme: dark) {
    .personality-card.featured {
        background: linear-gradient(135deg,
                rgba(255, 196, 0, 0.1),
                rgba(255, 196, 0, 0.05));
    }

    .personality-badge {
        box-shadow: 0 4px 12px rgba(255, 196, 0, 0.4);
    }

    .personality-icon {
        background: linear-gradient(135deg,
                rgba(255, 196, 0, 0.15),
                rgba(255, 196, 0, 0.08));
    }
}

/* Print Media Support */
@media print {
    .ai-personalities-section {
        padding: 2rem 0;
        break-inside: avoid;
    }

    .personality-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .personality-card {
        break-inside: avoid;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #ddd;
    }

    .personality-card.featured {
        border: 2px solid #FFC400;
    }

    .personality-badge {
        background: #FFC400;
        color: #000;
        box-shadow: none;
    }
}

/* ==========================================================================
   Mobile Spacing Optimization
   ========================================================================== */
@media (max-width: 768px) {

    .gallery-section,
    .ai-personalities-section,
    .pcpdm-section,
    .modes-section,
    .curriculum-section,
    .study-tools-section,
    .collaboration-section,
    .reviews-section,
    .features,
    .about-section {
        padding: 2rem 0 !important;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (prefers-color-scheme: dark) {
    nav.scrolled {
        background: rgba(4, 6, 11, 0.8);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Mobile Text Centering for Cards */
/* Mobile Text Centering for Cards */
/* Mobile Text Centering for Cards */
@media (max-width: 768px) {

    .card,
    .tool-card,
    .mode-card,
    .personality-card,
    .personality-label {
        text-align: center;
    }

    /* Fix flex paragraph centering */
    .personality-card p {
        text-align: center;
        justify-content: center;
    }

    .personality-card h3 {
        text-align: center;
        width: 100%;
    }

    /* Ensure lists stay left */
    .personality-features {
        text-align: center;
        width: 100%;
    }

    .personality-features li {
        text-align: center;
        padding-left: 2rem;
        display: block;
        position: relative;
    }

    .personality-features li::before {
        position: absolute;
        content: '✓';
        left: 0;
    }
}

/* --- Hero Carousel --- */
.hero-carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 3rem 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.hero-carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scrollHeroCarousel 40s linear infinite;
}

.carousel-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .carousel-item {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.carousel-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFC400;
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.item-icon {
    font-size: 1.2rem;
}

.carousel-item.featured {
    background-color: #FFC400;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 196, 0, 0.3);
}

.carousel-item.featured:hover {
    background-color: #FFD54F;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 196, 0, 0.4);
    color: white;
}

@keyframes scrollHeroCarousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 1rem));
    }
}

/* Pause on hover */
.hero-carousel-container:hover .hero-carousel-track {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .hero-carousel-container {
        padding: 1.5rem 0 3rem;
    }

    .carousel-item {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

.side-nav {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
}

.side-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.side-nav-item {
    position: relative;
}

.side-nav-link {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    opacity: 0.3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav-link:hover {
    opacity: 0.7;
    transform: translateX(4px);
}

.side-nav-link.active {
    opacity: 1;
    color: var(--text-primary);
    transform: scale(1.15) translateX(8px);
}

/* Hide on smaller screens */
@media (max-width: 1400px) {
    .side-nav {
        display: none;
    }
}