/*
 * Demo Landing Page Styles - NetYogi
 * Created: 2026-01-25
 * Purpose: Conversion-optimized landing page for backlink outreach
 * 
 * Design System:
 * - Uses CSS variables from output.css (Tailwind/DaisyUI)
 * - Mobile-first responsive design
 * - Focus on readability and conversion
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.demo-page {
    position: relative;
    min-height: 100vh;
    background: hsl(var(--background, 0 0% 100%));
    color: hsl(var(--foreground, 222 47% 11%));
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grid background - covers entire page */
.demo-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(hsl(var(--foreground, 222 47% 11%) / 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--foreground, 222 47% 11%) / 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* Gradient glow overlay at top */
.demo-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 50%;
    background: radial-gradient(
        ellipse 50% 80% at 50% 0%,
        hsl(var(--primary, 262 83% 58%) / 0.12) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.demo-hero {
    position: relative;
    z-index: 1;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
}

.demo-hero-content {
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* Badge */
.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--primary, 262 83% 58%));
    background: hsl(var(--primary, 262 83% 58%) / 0.1);
    border: 1px solid hsl(var(--primary, 262 83% 58%) / 0.2);
    border-radius: 9999px;
}

.demo-badge svg {
    width: 16px;
    height: 16px;
}

/* Headline */
.demo-headline {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-headline-sub {
    display: block;
    color: hsl(var(--primary, 262 83% 58%));
}

/* Subheadline */
.demo-subheadline {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Trust Badges */
.demo-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.demo-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    background: hsl(var(--secondary, 210 40% 96%));
    border-radius: 0.5rem;
}

.demo-trust-badge svg {
    width: 14px;
    height: 14px;
    color: hsl(142 76% 36%);
}

/* ==========================================================================
   LIVE TOOL CONTAINER
   ========================================================================== */

.demo-tool-container {
    max-width: 900px;
    margin: 0 auto 2rem;
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 1rem;
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.demo-tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--secondary, 210 40% 96%));
    border-bottom: 1px solid hsl(var(--border, 214 32% 91%));
}

.demo-tool-dots {
    display: flex;
    gap: 0.375rem;
}

.demo-tool-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: hsl(var(--border, 214 32% 91%));
}

.demo-tool-dots span:nth-child(1) {
    background: #ff5f57;
}

.demo-tool-dots span:nth-child(2) {
    background: #febc2e;
}

.demo-tool-dots span:nth-child(3) {
    background: #28c840;
}

.demo-tool-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-tool-frame {
    padding: 1rem;
}

.demo-tool-frame .netyogi-embed {
    margin: 0;
    transition: height 0.3s ease;
}

/* ==========================================================================
   CTA BUTTONS
   ========================================================================== */

.demo-cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.demo-cta-primary,
.demo-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.demo-cta-primary {
    color: hsl(var(--primary-foreground, 0 0% 100%));
    background: hsl(var(--primary, 262 83% 58%));
    border: none;
}

.demo-cta-primary:hover {
    background: hsl(var(--primary, 262 83% 58%) / 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsl(var(--primary, 262 83% 58%) / 0.3);
}

.demo-cta-secondary {
    color: hsl(var(--foreground, 222 47% 11%));
    background: hsl(var(--secondary, 210 40% 96%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
}

.demo-cta-secondary:hover {
    background: hsl(var(--secondary, 210 40% 96%) / 0.8);
    border-color: hsl(var(--primary, 262 83% 58%) / 0.3);
}

.demo-cta-primary svg,
.demo-cta-secondary svg {
    width: 18px;
    height: 18px;
}

.demo-cta-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   SECTION STYLING
   ========================================================================== */

.demo-section-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2.5rem;
}

.demo-section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-section-header p {
    font-size: 1rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    margin: 0;
}

/* ==========================================================================
   BENEFITS SECTION
   ========================================================================== */

.demo-benefits {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    background: hsl(var(--secondary, 210 40% 96%) / 0.5);
}

.demo-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.demo-benefit-card {
    padding: 1.5rem;
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 0.75rem;
    text-align: center;
}

.demo-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: hsl(var(--primary, 262 83% 58%) / 0.1);
    border-radius: 0.75rem;
}

.demo-benefit-icon svg {
    width: 24px;
    height: 24px;
    color: hsl(var(--primary, 262 83% 58%));
}

.demo-benefit-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-benefit-card p {
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   IMPLEMENTATION SECTION
   ========================================================================== */

.demo-implementation {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
}

.demo-code-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 1rem;
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.05);
}

/* Theme Selector - Button Style */
.demo-theme-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.demo-theme-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-theme-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: hsl(var(--secondary, 210 40% 96%));
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.demo-theme-btn:hover {
    background: hsl(var(--secondary, 210 40% 96%) / 0.8);
    border-color: hsl(var(--border, 214 32% 91%));
}

.demo-theme-btn.active {
    background: hsl(var(--primary, 262 83% 58%) / 0.1);
    border-color: hsl(var(--primary, 262 83% 58%));
}

.demo-theme-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.demo-theme-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground, 222 47% 11%));
}

/* Code Block */
.demo-code-block {
    margin-bottom: 1rem;
    background: hsl(222 47% 11%);
    border-radius: 0.75rem;
    overflow: hidden;
}

.demo-code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.demo-code-block code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

.demo-code-block #code-theme {
    color: #fbbf24;
}

/* Copy Button */
.demo-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--primary-foreground, 0 0% 100%));
    background: hsl(var(--primary, 262 83% 58%));
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-copy-btn:hover {
    background: hsl(var(--primary, 262 83% 58%) / 0.9);
    transform: translateY(-1px);
}

.demo-copy-btn.copied {
    background: hsl(142 76% 36%);
}

.demo-copy-btn svg {
    width: 18px;
    height: 18px;
}

/* Platform Badges */
.demo-platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid hsl(var(--border, 214 32% 91%));
}

.demo-platforms-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground, 215 16% 47%));
}

.demo-platform-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.demo-platform-badge {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    background: hsl(var(--secondary, 210 40% 96%));
    border-radius: 0.375rem;
}

/* ==========================================================================
   BLOG PREVIEW SECTION
   ========================================================================== */

.demo-blog-preview {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    background: hsl(var(--secondary, 210 40% 96%) / 0.5);
}

.demo-blog-frame {
    max-width: 1100px;
    max-height: calc(100dvh - 50px); /* Fit complete window in viewport */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 1rem;
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Fallback for browsers without dvh */
@supports not (max-height: 100dvh) {
    .demo-blog-frame {
        max-height: calc(100vh - 50px);
    }
}

/* Browser Chrome */
.demo-browser-chrome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: hsl(var(--secondary, 210 40% 96%));
    border-bottom: 1px solid hsl(var(--border, 214 32% 91%));
}

.demo-browser-dots {
    display: flex;
    gap: 0.375rem;
}

.demo-browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.demo-browser-dots span:nth-child(1) {
    background: #ff5f57;
}

.demo-browser-dots span:nth-child(2) {
    background: #febc2e;
}

.demo-browser-dots span:nth-child(3) {
    background: #28c840;
}

.demo-browser-url {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    background: hsl(var(--background, 0 0% 100%));
    border-radius: 0.375rem;
}

.demo-browser-url svg {
    width: 12px;
    height: 12px;
    color: hsl(142 76% 36%);
}

/* Blog Content - scrolls within the frame */
.demo-blog-content {
    flex: 1;
    min-height: 300px;
    overflow-y: auto;
}

/* Expanded state - remove frame constraint */
.demo-blog-frame.expanded {
    max-height: none;
}

.demo-blog-frame.expanded .demo-blog-content {
    overflow: visible;
}

/* Fade gradient at bottom to indicate more content */
.demo-blog-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    height: 60px;
    margin-top: -60px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        hsl(var(--card, 0 0% 100%)) 100%
    );
    pointer-events: none;
}

/* Hide gradient when expanded */
.demo-blog-frame.expanded .demo-blog-content::after {
    display: none;
}

.demo-article {
    padding: 2.5rem 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.demo-article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border, 214 32% 91%));
}

.demo-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
}

.demo-article-category {
    padding: 0.25rem 0.625rem;
    font-weight: 500;
    color: hsl(var(--primary, 262 83% 58%));
    background: hsl(var(--primary, 262 83% 58%) / 0.1);
    border-radius: 0.375rem;
}

.demo-article h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-article-excerpt {
    font-size: 1rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    margin: 0;
    line-height: 1.6;
}

.demo-article-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-article-body p {
    margin-bottom: 1rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-article-body ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.demo-article-body li {
    margin-bottom: 0.5rem;
}

.demo-article-embed {
    margin: 1.5rem 0;
    padding: 1rem;
    background: hsl(var(--primary, 262 83% 58%) / 0.05);
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 0.75rem;
}

.demo-article-callout {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: hsl(45 93% 47% / 0.1);
    border-left: 4px solid hsl(45 93% 47%);
    border-radius: 0 0.5rem 0.5rem 0;
}

.demo-article-callout p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Expand Button for Blog Preview */
.demo-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: -40px;
    position: relative;
    z-index: 5;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--primary, 262 83% 58%));
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-expand-btn:hover {
    background: hsl(var(--primary, 262 83% 58%) / 0.05);
}

.demo-expand-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.demo-expand-btn.expanded svg {
    transform: rotate(180deg);
}

.demo-expand-btn.hidden {
    display: none;
}

/* Preview CTA */
.demo-preview-cta {
    text-align: center;
    margin-top: 2rem;
}

.demo-preview-cta p {
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    margin: 0 0 1rem;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.demo-faq {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
}

.demo-faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.demo-faq-item {
    margin-bottom: 0.75rem;
    background: hsl(var(--card, 0 0% 100%));
    border: 1px solid hsl(var(--border, 214 32% 91%));
    border-radius: 0.75rem;
    overflow: hidden;
}

.demo-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground, 222 47% 11%));
    cursor: pointer;
    list-style: none;
    transition: background 0.2s ease;
}

.demo-faq-item summary::-webkit-details-marker {
    display: none;
}

.demo-faq-item summary:hover {
    background: hsl(var(--secondary, 210 40% 96%) / 0.5);
}

.demo-faq-item summary svg {
    width: 18px;
    height: 18px;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    transition: transform 0.2s ease;
}

.demo-faq-item[open] summary svg {
    transform: rotate(180deg);
}

.demo-faq-answer {
    padding: 0 1.25rem 1rem;
}

.demo-faq-answer p {
    margin: 0;
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    line-height: 1.6;
}

.demo-faq-answer code {
    padding: 0.125rem 0.375rem;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.8125rem;
    color: hsl(var(--primary, 262 83% 58%));
    background: hsl(var(--primary, 262 83% 58%) / 0.1);
    border-radius: 0.25rem;
}

/* ==========================================================================
   FINAL CTA SECTION
   ========================================================================== */

.demo-final-cta {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    background: linear-gradient(
        135deg,
        hsl(var(--primary, 262 83% 58%) / 0.05) 0%,
        hsl(var(--primary, 262 83% 58%) / 0.1) 100%
    );
    text-align: center;
}

.demo-final-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.demo-final-cta h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: hsl(var(--foreground, 222 47% 11%));
}

.demo-final-cta p {
    font-size: 1rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
    margin: 0 0 1.5rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.demo-footer {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    border-top: 1px solid hsl(var(--border, 214 32% 91%));
    text-align: center;
}

.demo-footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.demo-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground, 222 47% 11%));
    text-decoration: none;
}

.demo-footer-logo svg {
    width: 24px;
    height: 24px;
    color: hsl(var(--primary, 262 83% 58%));
}

.demo-footer p {
    margin: 0.5rem 0 1rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 215 16% 47%));
}

.demo-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.demo-footer-links a {
    color: hsl(var(--primary, 262 83% 58%));
    text-decoration: none;
}

.demo-footer-links a:hover {
    text-decoration: underline;
}

.demo-footer-links span {
    color: hsl(var(--muted-foreground, 215 16% 47%));
}

/* ==========================================================================
   EMBED ATTRIBUTION (Inside Page)
   ========================================================================== */

.embed-attribution {
    display: block;
    text-align: center;
    padding: 6px 0;
    font-size: 11px;
    color: #9ca3af;
    text-decoration: none;
    font-family: system-ui, -apple-system, sans-serif;
    opacity: 0.8;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.embed-attribution:hover {
    color: hsl(var(--primary, 262 83% 58%));
    opacity: 1;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .demo-hero {
        padding: 2rem 1rem 3rem;
    }
    
    .demo-headline {
        font-size: 1.75rem;
    }
    
    .demo-subheadline {
        font-size: 1rem;
    }
    
    .demo-trust-badges {
        gap: 0.5rem;
    }
    
    .demo-trust-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .demo-cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .demo-cta-primary,
    .demo-cta-secondary {
        width: 100%;
    }
    
    .demo-benefits,
    .demo-implementation,
    .demo-blog-preview,
    .demo-faq,
    .demo-final-cta {
        padding: 3rem 1rem;
    }
    
    .demo-section-header h2 {
        font-size: 1.5rem;
    }
    
    .demo-article {
        padding: 1.5rem;
    }
    
    .demo-article h1 {
        font-size: 1.25rem;
    }
    
    .demo-blog-frame {
        max-height: calc(100dvh - 50px);
    }
    
    .demo-code-block code {
        font-size: 0.75rem;
    }
    
    .demo-theme-options {
        gap: 0.375rem;
    }
    
    .demo-theme-btn {
        padding: 0.375rem 0.625rem;
    }
    
    .demo-theme-preview {
        width: 16px;
        height: 16px;
    }
    
    .demo-theme-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .demo-tool-container {
        border-radius: 0.75rem;
    }
    
    .demo-tool-header {
        padding: 0.5rem 0.75rem;
    }
    
    .demo-tool-dots span {
        width: 10px;
        height: 10px;
    }
    
    .demo-tool-frame {
        padding: 0.75rem;
    }
    
    .demo-browser-chrome {
        padding: 0.5rem 0.75rem;
    }
    
    .demo-browser-dots span {
        width: 8px;
        height: 8px;
    }
    
    .demo-browser-url {
        font-size: 0.6875rem;
    }
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

[data-theme="dark"] .demo-page,
.dark .demo-page {
    --background: 222 47% 11%;
    --foreground: 210 40% 98%;
    --card: 222 47% 11%;
    --muted-foreground: 215 20% 65%;
    --secondary: 217 33% 17%;
    --border: 217 33% 17%;
}

[data-theme="dark"] .demo-page::before,
.dark .demo-page::before {
    background-image: 
        linear-gradient(hsl(210 40% 98% / 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsl(210 40% 98% / 0.03) 1px, transparent 1px);
}

[data-theme="dark"] .demo-code-block,
.dark .demo-code-block {
    background: hsl(222 47% 8%);
}

[data-theme="dark"] .demo-theme-btn,
.dark .demo-theme-btn {
    background: hsl(217 33% 20%);
}

[data-theme="dark"] .demo-theme-btn:hover,
.dark .demo-theme-btn:hover {
    background: hsl(217 33% 25%);
    border-color: hsl(217 33% 30%);
}

[data-theme="dark"] .demo-theme-label,
.dark .demo-theme-label {
    color: hsl(210 40% 98%);
}

[data-theme="dark"] .demo-blog-content::after,
.dark .demo-blog-content::after {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        hsl(222 47% 11%) 100%
    );
}

[data-theme="dark"] .demo-expand-btn,
.dark .demo-expand-btn {
    background: hsl(222 47% 11%);
    border-color: hsl(217 33% 20%);
}

[data-theme="dark"] .demo-expand-btn:hover,
.dark .demo-expand-btn:hover {
    background: hsl(217 33% 15%);
}
