/*
 * GitHub Wrapped 2025 - Refined Editorial
 * Dark, modern, trustworthy
 */

:root {
    /* Premium Dark Palette */
    --bg: #0B0E14;
    --bg-elevated: #12151c;
    --surface: #1a1d26;
    --card: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);

    /* Accent - Warm Pink/Rose (harmonizes with purple bg) */
    --accent: #f472b6;
    --accent-muted: rgba(244, 114, 182, 0.15);
    --accent-glow: rgba(244, 114, 182, 0.25);

    /* Text hierarchy */
    --text: #fafafa;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);

    /* Fonts */
    --font-display: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Poster */
    --poster-w: 1080px;
    --poster-h: 1350px;
    --scale: 0.4;
}

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

/* Export-safe mode: disable effects that break png rendering */
.exporting,
.exporting *,
.exporting *::before,
.exporting *::after {
    backdrop-filter: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Layout */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Beautiful animated dark gradient with purple/magenta tones */
.app-bg {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 50% 40% at 30% 20%, rgba(139, 38, 113, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 40% 35% at 70% 30%, rgba(88, 28, 135, 0.25) 0%, transparent 45%),
        radial-gradient(ellipse 45% 40% at 20% 70%, rgba(157, 23, 77, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 50% 45% at 80% 80%, rgba(76, 29, 149, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 35% 30% at 50% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
        linear-gradient(180deg, #0a0a0f 0%, #0d0715 50%, #0a0a0f 100%);
    pointer-events: none;
    z-index: -2;
    animation: bgMove 20s ease-in-out infinite;
}

@keyframes bgMove {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-5%, -3%) scale(1.02);
    }

    50% {
        transform: translate(3%, 5%) scale(1);
    }

    75% {
        transform: translate(-3%, 2%) scale(1.01);
    }
}

/* Animated glow layer */
.app-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 40% 30% at 70% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 35% 25% at 30% 80%, rgba(236, 72, 153, 0.06) 0%, transparent 50%);
    animation: glowPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Film grain texture */
.app-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
}

/* Floating gradient orbs */
.gradient-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: floatOrb 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.25), rgba(168, 85, 247, 0.15));
    top: -15%;
    left: -10%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 38, 113, 0.15));
    bottom: -10%;
    right: -10%;
    animation-delay: -12s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.95);
    }

    75% {
        transform: translate(30px, 20px) scale(1.02);
    }
}

/* Particles */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4), 0 0 12px rgba(52, 10, 87, 0.3);
    animation: particleRise 20s linear infinite;
}

@keyframes particleRise {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }

    5% {
        opacity: 0.8;
        transform: translateY(90vh) scale(1);
    }

    95% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-20vh) scale(0.8);
        opacity: 0;
    }
}

/* Header - Refined Aesthetic */
.header {
    width: 100%;
    max-width: 800px;
    padding: 28px 0;
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-brand:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-muted);
}

.header-logo {
    width: 24px;
    height: 24px;
    color: #ffffff;
    filter: drop-shadow(0 0 10px rgba(52, 10, 87, 0.5));
    transition: all 0.3s ease;
}

.header-brand:hover .header-logo {
    filter: drop-shadow(0 0 16px rgba(52, 10, 87, 0.7));
    transform: scale(1.05);
}

.header-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}

.header-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    padding: 4px 10px;
    border: 1px solid var(--accent-muted);
    border-radius: 20px;
    background: var(--accent-muted);
}

/* Site Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(to top, var(--bg), transparent);
    z-index: 100;
}

.footer-brand {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-divider {
    color: var(--text-muted);
    opacity: 0.4;
}

.footer-author {
    font-size: 12px;
    color: var(--text-muted);
}

/* Landing Page */
.landing {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 60px;
}

.landing-content {
    text-align: center;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
    text-shadow: 0 0 40px rgba(52, 10, 87, 0.5), 0 0 80px rgba(52, 10, 87, 0.3);
}

.accent {
    background: linear-gradient(135deg, #ffffff 0%, #340a57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 380px;
    margin: 0 auto;
}

/* Creator Badge with Socials */
.creator-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
}

.creator-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.creator-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.creator-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 16px;
    height: 16px;
}

/* Form */
.form {
    display: flex;
    gap: 8px;
}

.input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Trust Signal */
.trust-signal {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -12px;
}

/* Preview Teaser */
.preview-teaser {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.preview-card {
    display: flex;
    gap: 24px;
    padding: 20px 32px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    opacity: 0.7;
}

.preview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.preview-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Demo Link */
.demo-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.demo-link:hover {
    color: var(--accent);
}

/* Old landing styles - kept for compatibility */
.landing-box {
    text-align: center;
    max-width: 420px;
}

.landing-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.landing-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Form */
.form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* Form - Glassmorphism Input */
.input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

.input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(52, 10, 87, 0.25);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Color Picker */
.color-picker-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.color-label,
.color-label-sm {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.color-input {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

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

.color-picker-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid var(--card-border);
    margin-right: 4px;
}

/* Buttons - Glassmorphism */
.btn-primary {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(52, 10, 87, 0.2);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 10, 87, 0.35);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary:disabled .btn-label {
    opacity: 0;
}

.btn-spinner {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
}

.btn-primary:disabled .btn-spinner {
    display: grid;
}

.btn-spinner::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.form-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Loading */
.loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loading-bar {
    width: 100px;
    height: 2px;
    background: var(--card-border);
    border-radius: 1px;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--text);
    animation: loading 1s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

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

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

/* Error */
.error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.error-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.error-msg {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-link:hover {
    color: var(--text);
}

/* Gradient Customization Controls */
.gradient-controls {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.gradient-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.control-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Template Selector */
.template-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.template-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.template-buttons {
    display: flex;
    gap: 8px;
}

.template-btn {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.template-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--text);
}

/* ========================
   SWEETALERT2 GLASSMORPHISM
   ======================== */
.swal2-popup.swal-glass {
    background: rgba(15, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.swal2-popup.swal-glass .swal2-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.swal2-popup.swal-glass .swal2-html-container {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 1rem 0 1.5rem;
}

.swal2-popup.swal-glass .swal2-icon {
    border: none;
    margin: 0 auto 1rem;
}

.swal2-popup.swal-glass .swal2-icon.swal2-success {
    border-color: rgba(168, 85, 247, 0.3);
}

.swal2-popup.swal-glass .swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #a855f7;
}

.swal2-popup.swal-glass .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(168, 85, 247, 0.3);
}

.swal2-popup.swal-glass .swal2-confirm {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.swal2-popup.swal-glass .swal2-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}

.swal2-popup.swal-glass .swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
}

/* Stats card inside SweetAlert */
.swal-stats {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    margin: 1.5rem 0;
}

.swal-stat {
    flex: 1;
    text-align: center;
}

.swal-stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: #a855f7;
    margin-bottom: 4px;
}

.swal-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toast glassmorphism - Centered */
.swal2-popup.swal-glass-toast {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.swal2-popup.swal-glass-toast .swal2-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.swal2-popup.swal-glass-toast .swal2-html-container {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.swal2-popup.swal-glass-toast .swal-stats {
    margin: 1.25rem 0 0.5rem;
    padding: 16px 20px;
    gap: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.swal2-popup.swal-glass-toast .swal-stat-value {
    font-size: 1.25rem;
}

.swal2-popup.swal-glass-toast .swal-stat-label {
    font-size: 0.7rem;
}

/* Timer progress bar */
.swal2-popup.swal-glass-toast .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #a855f7, #7c3aed);
}

/* No backdrop for toast */
.swal2-container.swal2-center {
    background: transparent !important;
}

/* Fade animations */
.swal2-show-fade {
    animation: swalFadeIn 0.3s ease-out;
}

.swal2-hide-fade {
    animation: swalFadeOut 0.2s ease-in;
}

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

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

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

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Result */
.result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-top: 60px;
    padding-bottom: 48px;
}

.poster-frame {
    transform: scale(var(--scale));
    transform-origin: top center;
    margin-bottom: calc(-1 * var(--poster-h) * (1 - var(--scale)));
}

/* ========================
   THE POSTER - EDITORIAL
   ======================== */
.poster {
    width: var(--poster-w);
    height: var(--poster-h);
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    /* Gradient custom properties */
    --gradient-primary: #1a1035;
    --gradient-secondary: #0f1729;
    --gradient-accent: #2d1f4e;
    --poster-accent: #f472b6;
}

/* Gradient background */
.poster-bg-img {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, var(--gradient-accent) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(244, 114, 182, 0.1) 0%, transparent 50%),
        linear-gradient(180deg,
            var(--gradient-primary) 0%,
            var(--gradient-secondary) 50%,
            #0a0a12 100%);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.05) 30%,
            rgba(0, 0, 0, 0.15) 70%,
            rgba(0, 0, 0, 0.3) 100%);
}

/* Grain texture on poster */
.poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    z-index: 10;
}

/* Content */
.poster-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 56px 64px;
}

/* Poster Header */
.poster-header {
    text-align: left;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--card-border);
}

.poster-github-logo {
    width: 32px;
    height: 32px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.poster-github-logo svg {
    width: 100%;
    height: 100%;
}

.poster-title {
    margin-bottom: 12px;
}

.poster-username {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 16px;
    margin-top: 0;
}

.poster-wrapped {
    display: block;
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    margin-top: 0;
}

.poster-quote {
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    color: var(--text-secondary);
    max-width: 400px;
}

/* Hero Stat */
.hero-stat {
    margin-bottom: 40px;
    padding: 40px;
    background: var(--hero-box-bg, rgba(242, 242, 242, 0.15));
    border-radius: 12px;
    border-left: 3px solid var(--hero-box-accent, #f2f2f2);
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
}

.hero-stat-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.hero-stat-caption {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card.stat-featured {
    grid-column: span 2;
    display: none;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-number.stat-text {
    font-size: 28px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-tagline {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
}

/* Highlight Project */
.highlight-project {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.highlight-project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.highlight-project-name {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.highlight-project-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.highlight-project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.highlight-project-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Timeline Insight */
.timeline-insight {
    display: flex;
    gap: 40px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timeline-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

/* Personality Badge - Export Safe */
.personality-badge {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 18px;
    background: var(--badge-bg, rgba(242, 242, 242, 0.15));
    border: 1px solid rgba(242, 242, 242, 0.2);
    border-radius: 8px;
    margin-bottom: 24px;
    width: fit-content;
    min-height: 44px;
}

.personality-badge-icon {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.personality-badge-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--badge-color, #f2f2f2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    white-space: nowrap;
}

/* Poster Footer */
.poster-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 24px;
}

.poster-footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poster-year {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.poster-brand {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.6;
}

.poster-cta {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    font-style: italic;
}

.poster-github-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.github-url {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ========================================
   POSTER TEMPLATE: NEON CYBER
   Colors from implementation plan:
   - neon-purple: #a855f7
   - neon-blue: #3b82f6
   - neon-cyan: #06b6d4
   - dark-bg: #0a0a0f
   ======================================== */
.poster.template-neon {
    --gradient-primary: #0a0a0f;
    --gradient-secondary: #0f0f18;
    --poster-accent: #a855f7;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);
    --surface: rgba(255, 255, 255, 0.05);
    --card: rgba(255, 255, 255, 0.05);
    --card-border: rgba(168, 85, 247, 0.3);
    --accent: #a855f7;
    --accent-secondary: #3b82f6;
    --accent-tertiary: #06b6d4;
}

/* Gradient background with purple/blue/cyan glows */
.poster.template-neon .poster-bg-img {
    background:
        radial-gradient(ellipse 70% 50% at 80% 10%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 35% at 90% 90%, rgba(6, 182, 212, 0.1) 0%, transparent 45%),
        linear-gradient(160deg, #0a0a0f 0%, #0f0f18 50%, #0a0a0f 100%);
}

.poster.template-neon .poster-wrapped {
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.poster.template-neon .hero-stat {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #a855f7;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
    backdrop-filter: blur(10px);
}

.poster.template-neon .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.2);
    backdrop-filter: blur(8px);
}

.poster.template-neon .personality-badge {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.poster.template-neon .personality-badge-label {
    color: #a855f7;
}

.poster.template-neon .highlight-project {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(8px);
}

.poster.template-neon .highlight-project-label {
    color: #3b82f6;
}

/* Subtle gradient overlay */
.poster.template-neon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(168, 85, 247, 0.03) 0%,
            transparent 30%,
            transparent 70%,
            rgba(59, 130, 246, 0.03) 100%);
    pointer-events: none;
    z-index: 1;
}

/* NEON LAYOUT CHANGES - Cleaner Cyberpunk */
.poster.template-neon .poster-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 50px;
}

.poster.template-neon .poster-header {
    border-bottom: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.poster.template-neon .poster-github-logo {
    position: absolute;
    top: 50px;
    left: 50px;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
}

.poster.template-neon .poster-wrapped {
    font-size: 16px;
    letter-spacing: 0.3em;
    margin-top: 50px;
    background: linear-gradient(90deg, #00ffff 0%, #ff00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poster.template-neon .poster-username {
    font-size: 56px;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.poster.template-neon .poster-quote {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.poster.template-neon .hero-stat {
    position: absolute;
    bottom: 80px;
    right: 50px;
    padding: 0;
    background: transparent;
    border: none;
    text-align: right;
    box-shadow: none;
    margin: 0;
}

/* Glow backdrop */
.poster.template-neon .hero-stat::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
}

.poster.template-neon .hero-stat-value {
    font-size: 100px;
    font-weight: 800;
    color: #a855f7;
    text-shadow:
        0 0 20px rgba(168, 85, 247, 0.8),
        0 0 50px rgba(168, 85, 247, 0.4),
        0 0 80px rgba(168, 85, 247, 0.2);
    line-height: 1;
}

.poster.template-neon .hero-stat-label {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 12px;
}

.poster.template-neon .hero-stat-caption {
    display: none;
}

.poster.template-neon .stats-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 30px;
    padding: 0;
}

.poster.template-neon .stat-card {
    flex: 1;
    padding: 16px;
    text-align: center;
}

.poster.template-neon .stat-number {
    font-size: 32px;
    color: #00ffff;
}

.poster.template-neon .stat-tagline {
    display: none;
}

.poster.template-neon .highlight-project {
    margin: 0 0 30px 0;
    background: rgba(255, 0, 255, 0.05);
    border: 1px solid rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.1);
}

.poster.template-neon .highlight-project-label {
    color: #ff00ff;
}

.poster.template-neon .timeline-value {
    color: #00ffff;
}

.poster.template-neon .timeline-insight {
    display: none;
}

.poster.template-neon .personality-badge {
    position: absolute;
    top: 40px;
    right: 40px;
}

.poster.template-neon .poster-footer {
    position: absolute;
    bottom: 50px;
    left: 50px;
    padding: 0;
}

/* ========================================
   POSTER TEMPLATE: MINIMAL LIGHT
   Aesthetic: Swiss Design, Print-Ready
   ======================================== */
.poster.template-minimal {
    --gradient-primary: #fafafa;
    --gradient-secondary: #f0f0f0;
    --poster-accent: #0969da;
    --text: #1a1a1a;
    --text-secondary: rgba(0, 0, 0, 0.65);
    --text-muted: rgba(0, 0, 0, 0.45);
    --surface: #ffffff;
    --card: rgba(0, 0, 0, 0.02);
    --card-border: rgba(0, 0, 0, 0.08);
    --accent: #0969da;
}

/* Clean off-white background */
.poster.template-minimal .poster-bg-img {
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
}

.poster.template-minimal .poster-overlay {
    background: none;
}

.poster.template-minimal::after {
    display: none;
}

.poster.template-minimal .poster-wrapped {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.poster.template-minimal .poster-username {
    color: #000000;
}

.poster.template-minimal .poster-github-logo {
    color: #000000;
}

/* Hero stat with blue accent */
.poster.template-minimal .hero-stat {
    background: #ffffff;
    border-left: 4px solid #0969da;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.poster.template-minimal .hero-stat-value {
    color: #0969da;
}

.poster.template-minimal .stat-number {
    color: #1a1a1a;
}

.poster.template-minimal .stat-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.poster.template-minimal .personality-badge {
    background: #0969da;
    border: none;
}

.poster.template-minimal .personality-badge-icon {
    filter: grayscale(100%) brightness(10);
}

.poster.template-minimal .personality-badge-label {
    color: #ffffff;
}

.poster.template-minimal .highlight-project {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.poster.template-minimal .highlight-project-name {
    color: #0969da;
}

.poster.template-minimal .highlight-project-label {
    color: #0969da;
}

.poster.template-minimal .timeline-insight {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.poster.template-minimal .timeline-value {
    color: #000000;
}

.poster.template-minimal .poster-year,
.poster.template-minimal .poster-cta,
.poster.template-minimal .github-url {
    color: #666666;
}

/* MINIMAL LAYOUT CHANGES - Clean Vertical */
.poster.template-minimal .poster-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 60px;
}

.poster.template-minimal .poster-header {
    border-bottom: none;
    padding: 0;
    margin-bottom: 40px;
    text-align: center;
}

.poster.template-minimal .poster-github-logo {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
}

.poster.template-minimal .poster-wrapped {
    font-size: 16px;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.poster.template-minimal .poster-username {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
}

.poster.template-minimal .poster-quote {
    font-size: 18px;
    max-width: 100%;
}

/* Hero stat centered */
.poster.template-minimal .hero-stat {
    margin: 0 0 30px 0;
    padding: 40px;
    border-radius: 16px;
    border-left: none;
    text-align: center;
}

.poster.template-minimal .hero-stat-value {
    font-size: 72px;
}

.poster.template-minimal .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.poster.template-minimal .stat-card {
    padding: 20px;
}

.poster.template-minimal .stat-tagline {
    display: none;
}

.poster.template-minimal .highlight-project {
    margin-bottom: 30px;
    border-radius: 12px;
}

.poster.template-minimal .timeline-insight {
    display: none;
}

.poster.template-minimal .personality-badge {
    align-self: flex-start;
    margin-bottom: 30px;
    border-radius: 8px;
}

.poster.template-minimal .poster-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Actions */
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-secondary {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

/* Caption */
.caption-details {
    width: 100%;
    max-width: 400px;
}

.caption-details summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    padding: 12px 0;
}

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

.caption-details summary::before {
    content: '+ ';
}

.caption-details[open] summary::before {
    content: '− ';
}

.caption-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 16px;
    white-space: pre-wrap;
    margin-top: 8px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    background: var(--text);
    color: var(--bg);
    padding: 10px 20px;
    border-radius: 6px;
    animation: toast-in 0.2s ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --scale: 0.28;
    }

    .landing-title {
        font-size: 2.25rem;
    }

    .form {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --scale: 0.22;
    }

    .app {
        padding: 16px;
    }

    .landing-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   SITE FOOTER & SOCIAL LINKS
   ======================================== */

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    margin-top: auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.footer-divider {
    color: var(--text-muted);
}

.footer-author {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

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

/* Large desktop - default scale */
@media (min-width: 1200px) {
    :root {
        --scale: 0.45;
    }
}

/* Medium desktop / Small laptop */
@media (max-width: 1199px) {
    :root {
        --scale: 0.38;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    :root {
        --scale: 0.35;
    }

    .app {
        padding: 20px 16px;
    }

    .landing {
        padding: 20px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    :root {
        --scale: 0.32;
    }

    .app {
        padding: 16px 12px;
    }

    .landing {
        padding: 16px;
        max-width: 100%;
    }

    .landing-hero-title {
        font-size: 2.5rem;
    }

    .landing-tagline {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
        gap: 12px;
    }

    .input-group input {
        width: 100%;
        text-align: center;
    }

    .input-group button {
        width: 100%;
    }

    .result {
        padding-bottom: 32px;
    }

    .action-btns {
        flex-direction: column;
        gap: 10px;
    }

    .action-btns button {
        width: 100%;
    }

    .template-selector {
        flex-wrap: wrap;
        gap: 8px;
    }

    .template-buttons {
        width: 100%;
        justify-content: center;
    }

    .gradient-controls {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Mobile large */
@media (max-width: 600px) {
    :root {
        --scale: 0.28;
    }

    .app {
        padding: 12px 8px;
    }

    .landing {
        padding: 12px;
    }

    .landing-hero {
        padding: 24px 0 16px;
    }

    .landing-hero-title {
        font-size: 2rem;
    }

    .landing-tagline {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .nav-logo {
        font-size: 0.9rem;
    }

    .nav-link,
    .theme-toggle {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .site-footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
        text-align: center;
        padding: 16px 12px;
        font-size: 0.75rem;
    }

    .footer-socials {
        gap: 8px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }

    /* Caption section */
    .caption-box {
        padding: 16px;
    }

    .caption-text {
        font-size: 0.8rem;
    }
}

/* Mobile small */
@media (max-width: 480px) {
    :root {
        --scale: 0.24;
    }

    .landing-hero-title {
        font-size: 1.75rem;
    }

    .landing-hero-logo {
        width: 56px;
        height: 56px;
    }

    .input-group input {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .input-group button {
        padding: 14px 20px;
        font-size: 0.9rem;
    }

    .template-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .gradient-control label {
        font-size: 0.7rem;
    }

    .color-input {
        width: 36px;
        height: 36px;
    }

    /* Add space for footer on small screens */
    .landing {
        padding-bottom: 80px;
    }
}

/* Mobile extra small */
@media (max-width: 360px) {
    :root {
        --scale: 0.2;
    }

    .app {
        padding: 8px 4px;
    }

    .landing-hero-title {
        font-size: 1.5rem;
    }

    .nav {
        padding: 8px;
    }

    .nav-logo {
        font-size: 0.8rem;
    }
}

/* Height-based adjustments for landscape mobile */
@media (max-height: 700px) and (orientation: landscape) {
    :root {
        --scale: 0.25;
    }

    .landing-hero {
        padding: 12px 0;
    }

    .landing-hero-title {
        font-size: 1.5rem;
    }

    .landing-tagline {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
}

/* Ensure poster container doesn't overflow */
.poster-frame {
    max-width: 100%;
    overflow: hidden;
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {

    .template-btn,
    .nav-link,
    .theme-toggle,
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }

    .input-group input,
    .input-group button {
        min-height: 48px;
    }
}