/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* === АКЦЕНТ (меняется через data-accent) === */
    --primary: #7C3AED;
    --primary-dark: #6D28D9;
    --primary-light: #A78BFA;
    --primary-glow: rgba(124, 58, 237, 0.15);
    --primary-shadow: rgba(124, 58, 237, 0.25);

    /* === ПОВЕРХНОСТИ (меняются через data-theme) === */
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-active: rgba(255, 255, 255, 0.1);
    --overlay: rgba(0, 0, 0, 0.3);
    --overlay-heavy: rgba(0, 0, 0, 0.5);

    /* === ФОНЫ (автоматически тонируются от --primary) === */
    --bg-dark: #0f0f15;
    --bg-darker: color-mix(in srgb, var(--primary) 8%, #161620);
    --bg-accent: color-mix(in srgb, var(--primary) 15%, #1e1e2e);

    /* === ТЕКСТ (меняется через data-theme) === */
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);

    /* === БРЕНДЫ (не меняются) === */
    --discord: #5865F2;
    --boosty: #f15f2c;
    --modrinth: #00af5c;
    --curseforge: #f16436;
    --youtube: #fa0332;
    --telegram: #258aed;

    /* === СЕМАНТИЧЕСКИЕ (не меняются) === */
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --info: #2196f3;

    /* === КОД === */
    --code-bg: #1e1e2e;
    --code-border: rgba(255, 255, 255, 0.05);

    /* Browser native controls (select dropdowns, scrollbars) */
    color-scheme: dark;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 50%, var(--bg-accent) 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: var(--overlay);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    flex: 1;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

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

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

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-hover);
    border-radius: 25px;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border: 1px solid var(--border);
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.25rem;
    border-radius: 20px;
    transition: background 0.2s;
}

.user-profile-link:hover {
    background: var(--surface-active);
    color: var(--text);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-info .username {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info .btn-logout {
    background: transparent;
    color: var(--text-muted);
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 15px;
    transition: background 0.2s, color 0.2s;
}

.user-info .btn-logout:hover {
    background: var(--primary-glow);
    color: var(--primary);
    transform: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    box-shadow: 0 4px 20px var(--primary-shadow);
    color: white;
}

.btn-discord {
    background: var(--discord);
    color: white;
}

.btn-discord:hover {
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    color: white;
}

.btn-boosty {
    background: var(--boosty);
    color: white;
}

.btn-boosty:hover {
    box-shadow: 0 4px 20px rgba(241, 95, 44, 0.4);
    color: white;
}

.btn-modrinth {
    background: var(--modrinth);
    color: white;
}

.btn-modrinth:hover {
    box-shadow: 0 4px 20px rgba(0, 175, 92, 0.4);
    color: white;
}

.btn-curseforge {
    background: var(--curseforge);
    color: white;
}

.btn-curseforge:hover {
    box-shadow: 0 4px 20px rgba(241, 100, 54, 0.4);
    color: white;
}

.btn-youtube {
    background: var(--youtube);
    color: white;
}

.btn-youtube:hover {
    box-shadow: 0 4px 20px rgba(250, 3, 50, 0.4);
    color: white;
}

.btn-telegram {
    background: var(--telegram);
    color: white;
}

.btn-telegram:hover {
    box-shadow: 0 4px 20px rgba(37, 138, 237, 0.4);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero .description {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
}

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

/* Sections */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Modpack Card */
.modpack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.modpack-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--primary-shadow);
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modpack-image {
    background: var(--overlay);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modpack-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.modpack-info {
    padding: 2rem;
}

.modpack-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modpack-info .version {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.modpack-description {
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.features-list li::before {
    content: "✓ ";
    color: var(--primary);
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--overlay-heavy);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 1rem;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Profile Page */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.profile-info h1 {
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--text-muted);
}

.profile-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-section h2 {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Hero Small */
.hero-small {
    padding: 3rem 2rem;
}

.hero-small h1 {
    font-size: 2.5rem;
}

/* Lectures Page */
.lectures-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.lectures-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tier-legend {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tier-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.free, .tier-badge.tier-free {
    background: #4caf50;
    color: white;
}

.tier-badge.junior_dev, .tier-badge.tier-junior {
    background: #2196f3;
    color: white;
}

.tier-badge.middle_dev, .tier-badge.tier-middle {
    background: #9c27b0;
    color: white;
}

.tier-badge.senior_dev, .tier-badge.tier-senior {
    background: #ff9800;
    color: white;
}

.tier-badge.architect_dev, .tier-badge.tier-architect {
    background: #f44336;
    color: white;
}

.user-tier-info {
    color: var(--text-muted);
}

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

.lecture-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.lecture-card.accessible:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-shadow);
}

.lecture-card.locked {
    opacity: 0.7;
}

.lecture-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    opacity: 0.5;
}

.lecture-content {
    flex: 1;
}

.lecture-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.lecture-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lock-icon-big {
    font-size: 2rem;
    opacity: 0.5;
}

.lock-icon {
    font-size: 0.9rem;
}

/* Access Page Steps */
.access-steps-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

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

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.step-content {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.step-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Pricing Section */
.pricing-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

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

.pricing-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.promo-badge {
    display: inline-block;
    background: #34D399;
    color: #000;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.pricing-header {
    padding: 2rem;
    text-align: center;
    background: var(--overlay);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary);
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-body {
    padding: 2rem;
    flex: 1;
}

.pricing-features {
    list-style: none;
}

.pricing-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li.included::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

.pricing-features li.excluded {
    color: var(--text-muted);
    opacity: 0.6;
}

.pricing-features li.excluded::before {
    content: "✗";
    color: var(--error);
}

.pricing-footer {
    padding: 1.5rem 2rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
}

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

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

/* === Minecraft Accent Presets === */
[data-accent="redstone"] {
    --primary: #EF4444;
    --primary-dark: #DC2626;
    --primary-light: #F87171;
    --primary-glow: rgba(239, 68, 68, 0.15);
    --primary-shadow: rgba(239, 68, 68, 0.25);
}

[data-accent="emerald"] {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --primary-glow: rgba(16, 185, 129, 0.15);
    --primary-shadow: rgba(16, 185, 129, 0.25);
}

[data-accent="gold"] {
    --primary: #F59E0B;
    --primary-dark: #D97706;
    --primary-light: #FCD34D;
    --primary-glow: rgba(245, 158, 11, 0.15);
    --primary-shadow: rgba(245, 158, 11, 0.25);
}

[data-accent="diamond"] {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --primary-shadow: rgba(59, 130, 246, 0.25);
}

[data-accent="amethyst"] {
    --primary: #A855F7;
    --primary-dark: #9333EA;
    --primary-light: #C084FC;
    --primary-glow: rgba(168, 85, 247, 0.15);
    --primary-shadow: rgba(168, 85, 247, 0.25);
}

/* === Light Theme === */
[data-theme="light"] {
    --bg-dark: #f7f7fa;
    --bg-darker: #efeff3;
    --bg-accent: #e7e7ee;
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --border: rgba(0, 0, 0, 0.15);
    --surface: rgba(0, 0, 0, 0.05);
    --surface-hover: rgba(0, 0, 0, 0.08);
    --surface-active: rgba(0, 0, 0, 0.12);
    --overlay: rgba(255, 255, 255, 0.85);
    --overlay-heavy: rgba(0, 0, 0, 0.06);

    --code-bg: #f6f8fa;
    --code-border: rgba(0, 0, 0, 0.12);

    color-scheme: light;
}

/* Prism syntax colors for light theme (GitHub-inspired) */
[data-theme="light"] code[class*="language-"],
[data-theme="light"] pre[class*="language-"] {
    color: #24292e;
}
[data-theme="light"] .token.comment,
[data-theme="light"] .token.prolog,
[data-theme="light"] .token.doctype,
[data-theme="light"] .token.cdata {
    color: #6a737d;
}
[data-theme="light"] .token.punctuation {
    color: #24292e;
}
[data-theme="light"] .token.property,
[data-theme="light"] .token.tag,
[data-theme="light"] .token.boolean,
[data-theme="light"] .token.number,
[data-theme="light"] .token.constant,
[data-theme="light"] .token.symbol,
[data-theme="light"] .token.deleted {
    color: #d73a49;
}
[data-theme="light"] .token.selector,
[data-theme="light"] .token.attr-name,
[data-theme="light"] .token.string,
[data-theme="light"] .token.char,
[data-theme="light"] .token.builtin,
[data-theme="light"] .token.inserted {
    color: #22863a;
}
[data-theme="light"] .token.operator,
[data-theme="light"] .token.entity,
[data-theme="light"] .token.url,
[data-theme="light"] .language-css .token.string,
[data-theme="light"] .style .token.string {
    color: #e36209;
}
[data-theme="light"] .token.atrule,
[data-theme="light"] .token.attr-value,
[data-theme="light"] .token.keyword {
    color: #d73a49;
}
[data-theme="light"] .token.function,
[data-theme="light"] .token.class-name {
    color: #6f42c1;
}
[data-theme="light"] .token.regex,
[data-theme="light"] .token.important,
[data-theme="light"] .token.variable {
    color: #e36209;
}
[data-theme="light"] .token.namespace {
    color: #6f42c1;
    opacity: 0.7;
}

/* === Theme Controls === */
.theme-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
    width: 34px;
    height: 34px;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

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

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

.accent-picker-wrapper {
    position: relative;
}

.accent-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
    width: 34px;
    height: 34px;
}

.accent-toggle:hover {
    border-color: var(--primary);
}

.accent-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
}

.accent-picker {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    gap: 0.5rem;
    z-index: 200;
    flex-wrap: wrap;
    width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.accent-picker.open {
    display: flex;
}

.accent-picker button {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.accent-picker button:hover {
    transform: scale(1.15);
}

.accent-picker button.active {
    border-color: var(--text);
}

.accent-picker button span {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* Profile subscriptions grid */
.profile-subscriptions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-subscriptions .profile-section {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-right {
        justify-content: center;
    }

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

    .hero-small h1 {
        font-size: 2rem;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .profile-subscriptions {
        grid-template-columns: 1fr;
    }

    .theme-controls {
        order: -1;
    }

    .lectures-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== Lecture Prose (markdown content) ==================== */
.lecture-prose {
    line-height: 1.8;
    font-size: 1.1rem;
}
.lecture-prose > *:first-child {
    margin-top: 0;
}
.lecture-prose p {
    margin-bottom: 1.2rem;
}
.lecture-prose h1 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.lecture-prose > :first-child {
    margin-top: 0;
}
.lecture-prose h2 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 0;
    color: var(--text);
    scroll-margin-top: 2rem;
}
.lecture-prose h3 {
    font-size: 1.3rem;
    margin-top: 2.5rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    scroll-margin-top: 2rem;
}
.lecture-prose hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 3rem 0;
}
.lecture-prose pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
}
.lecture-prose pre.has-lang-label {
    padding-top: 2.2rem;
}
.lecture-prose code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
}
.lecture-prose p code {
    background: var(--surface-active);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--text);
}
.lecture-prose blockquote {
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    padding: 1.2rem 1.5rem;
    background: var(--primary-glow);
    border-radius: 0 8px 8px 0;
}
.lecture-prose blockquote p:last-child {
    margin-bottom: 0;
}
.lecture-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}
.lecture-prose th, .lecture-prose td {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
}
.lecture-prose th {
    background: var(--surface-hover);
}
.lecture-prose ul, .lecture-prose ol {
    margin: 1.2rem 0;
    padding-left: 2rem;
}
.lecture-prose li {
    margin: 0.5rem 0;
}
.lecture-prose li > p {
    margin-bottom: 0.5rem;
}
.lecture-prose img {
    max-width: 100%;
    border-radius: 8px;
    margin: 0.5rem 0;
    cursor: pointer;
}
/* Paragraphs that contain only an image — tighten spacing */
.lecture-prose p > img:only-child {
    display: block;
    margin: 0.5rem 0;
}
.lecture-prose p:has(> img:only-child) {
    margin-bottom: 0.4rem;
}

/* Copy code button — always on dark code-bg, so use fixed light colors */
.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}
.lecture-prose pre:hover .copy-code-btn {
    opacity: 1;
}
.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* Code language label */
.code-lang-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0 0 6px 0;
    pointer-events: none;
}
[data-theme="light"] .code-lang-label {
    color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .copy-code-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .copy-code-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
}

/* Reading time badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.reading-time::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Heading highlight on anchor navigation */
@keyframes heading-highlight {
    0% { background-color: var(--primary-glow); }
    100% { background-color: transparent; }
}
.lecture-prose h2:target,
.lecture-prose h3:target {
    animation: heading-highlight 1.5s ease-out;
    border-radius: 4px;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

/* Image lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}
.image-lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@media (max-width: 600px) {
    .lecture-prose {
        font-size: 1rem;
    }
}
