/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Humanized Resets & Colors */
    --bg-deep: #0f111a;
    /* Softer, less "void-like" black */
    --bg-mid: #0b1120;
    --bg-card: #181b24;
    /* Solid card rather than hyper-translucent glass */
    --bg-card-hov: #1e222d;
    --border: #2a2e3a;
    /* Noticeable but subtle border */
    --border-glow: rgba(59, 130, 246, 0.4);

    --accent: #3b82f6;
    /* Classic blue rather than pure cyan */
    --accent2: #818cf8;
    --accent3: #f97316;
    --accent-dim: rgba(59, 130, 246, 0.12);

    --text-primary: #e5e7eb;
    --text-muted: #9ca3af;
    --text-dim: #94a3b8;
    --success: #4ade80;
    --warn: #fbbf24;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Slightly broken symmetry for a modern brutalist/human touch */
    --radius-sm: 6px;
    --radius-md: 15px;
    --radius-lg: 12px;
    --radius-xl: 28px;

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
    --glow: 0 0 36px rgba(56, 189, 248, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    padding-bottom: 60px;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-particles::before,
.bg-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.1;
    animation: drift 14s ease-in-out infinite alternate;
}

.bg-particles::before {
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, var(--accent), transparent 65%);
    top: -280px;
    left: -220px;
}

.bg-particles::after {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--accent2), transparent 65%);
    bottom: -180px;
    right: -180px;
    animation-delay: -7s;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(55px, 35px) scale(1.08);
    }
}

/* Star particles (created by JS) */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: twinkle var(--dur, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* ===== HERO ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 44vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(175deg, transparent 55%, var(--bg-deep) 100%);
}

.hero-content {
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 15px;
    border-radius: 100px;
    margin-bottom: 26px;
    animation: fadeInDown 0.55s ease both;
}

.hero-title {
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 18px;
    animation: fadeInDown 0.55s 0.08s ease both;
}

.gradient-text {
    background: linear-gradient(130deg, var(--accent) 0%, var(--accent2) 48%, var(--accent3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 220%;
    animation: gradientShift 5s ease infinite alternate;
}

@keyframes gradientShift {
    from {
        background-position: 0% 50%;
    }

    to {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    margin-bottom: 36px;
    line-height: 1.75;
    animation: fadeInDown 0.55s 0.16s ease both;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* 3-step flow strip */
.hero-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    animation: fadeInDown 0.55s 0.26s ease both;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    min-width: 110px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.step-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
}

.step-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    opacity: 0.6;
}

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

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

.scroll-hint {
    position: absolute;
    bottom: 26px;
    color: var(--text-muted);
    font-size: 0.77rem;
    letter-spacing: 0.1em;
    animation: bounce 2.2s ease infinite;
}

@keyframes bounce {

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

    50% {
        transform: translateY(7px);
    }
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

/* Redesigned Card Layout (No more glowing glassmorphism, just clean software design) */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

/* ===== LAYOUT GRID ===== */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    /* Wider gap */
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 960px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== FORM PANEL ===== */
.form-panel {
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}

.panel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.panel-dot.red {
    background: #ff5f57;
}

.panel-dot.yellow {
    background: #febc2e;
}

.panel-dot.green {
    background: #28c840;
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 6px;
}

/* Organic Spacing on Forms */
.form {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    /* Naturally spacious */
}

/* Staggered entrance per form-group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: riseIn 0.5s ease both;
}

.form-group:nth-child(1) {
    animation-delay: 0.05s;
}

.form-group:nth-child(2) {
    animation-delay: 0.10s;
}

.form-group:nth-child(3) {
    animation-delay: 0.15s;
}

.form-group:nth-child(4) {
    animation-delay: 0.20s;
}

.form-group:nth-child(5) {
    animation-delay: 0.25s;
}

.form-group:nth-child(6) {
    animation-delay: 0.30s;
}

.form-group:nth-child(7) {
    animation-delay: 0.35s;
}

.form-group:nth-child(8) {
    animation-delay: 0.40s;
}

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

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

.form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

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

.required {
    color: #f87171;
    margin-left: 1px;
}

.hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.optional-tag {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 1px 7px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.field-hint {
    font-size: 0.73rem;
    color: var(--accent);
    opacity: 0.75;
    margin-top: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: #0f111a;
    border: 1px solid #374151;
    border-radius: var(--radius-sm);
    color: #f3f4f6;
    padding: 12px 14px;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
    resize: vertical;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    background: #0f111a;
    outline: none;
    box-shadow: 0 0 0 1px var(--accent);
    /* Crisp focus ring, not blurry glow */
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2338bdf8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 10px auto;
    padding-right: 36px;
}

.form-group select option {
    background: #060a12;
    color: #e2e8f0;
}

/* Input with prefix */
.input-prefix {
    display: flex;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, border-left-color 0.2s;
}

.input-prefix:focus-within {
    border-color: var(--accent);
    border-left-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.prefix {
    background: rgba(56, 189, 248, 0.07);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 10px 11px;
    white-space: nowrap;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.input-prefix input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
    background: #0f111a !important;
    border-left: none !important;
}

.input-prefix input:focus {
    box-shadow: none !important;
}

/* Social link sub-grid */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
}

.social-full {
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .social-grid {
        grid-template-columns: 1fr;
    }

    .social-full {
        grid-column: auto;
    }
}

/* ===== CHIP CONTAINER ===== */
.chip-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.chip-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.chip-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 100px;
    font-size: 0.7rem;
    font-family: var(--font-main);
    font-weight: 600;
    padding: 5px 11px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.chip-tab:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.3);
}

.chip-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(56, 189, 248, 0.28);
}

.chip-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 132px;
    overflow-y: auto;
    padding-right: 4px;
}

.chip-panel::-webkit-scrollbar {
    width: 4px;
}

.chip-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chip {
    background: rgba(56, 189, 248, 0.07);
    border: 1px solid rgba(56, 189, 248, 0.18);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.71rem;
    font-family: var(--font-main);
    font-weight: 500;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
}

.chip:hover {
    background: rgba(56, 189, 248, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.chip:active {
    transform: translateY(0);
}

/* ===== GITHUB EXTRAS COLLAPSIBLE ===== */
.extras-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    user-select: none;
    transition: background 0.2s;
}

.extras-toggle:hover {
    background: rgba(56, 189, 248, 0.11);
    color: var(--accent);
}

.extras-arrow {
    font-size: 0.7rem;
    transition: transform 0.25s;
    color: var(--accent);
}

.extras-arrow.open {
    transform: rotate(180deg);
}

.extras-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}

.extras-panel.open {
    max-height: 200px;
    padding: 14px 16px;
}

/* single-column variant for input fields */
.extras-panel.stack {
    grid-template-columns: 1fr;
}

.extras-panel.stack.open {
    max-height: 320px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s;
}

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

.check-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== DIVIDER ===== */
.divider-line {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-top: 4px;
}

.divider-line::before,
.divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== GENERATE BUTTON ===== */
.btn-generate {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(130deg, var(--accent) 0%, var(--accent2) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 6px;
}

.btn-generate:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 38px rgba(56, 189, 248, 0.38), 0 4px 16px rgba(129, 140, 248, 0.28);
}

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

.btn-generate.loading {
    pointer-events: none;
    opacity: 0.78;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, transparent 35%, rgba(255, 255, 255, 0.2) 55%, transparent 75%);
    transform: translateX(-110%);
    animation: btnShine 3.2s ease infinite;
}

@keyframes btnShine {
    0% {
        transform: translateX(-110%);
    }

    38% {
        transform: translateX(110%);
    }

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

.btn-icon {
    font-size: 1.05rem;
}

/* ===== PREVIEW PANEL ===== */
.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Empty state */
.empty-state {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-height: 320px;
    justify-content: center;
    /* Soft glowing center instead of dashed border */
    background: radial-gradient(ellipse at 50% 50%, rgba(56, 189, 248, 0.04) 0%, var(--bg-card) 70%);
    box-shadow: inset 0 0 48px rgba(56, 189, 248, 0.04);
}

.empty-icon {
    font-size: 3.8rem;
    filter: grayscale(0.2);
    animation: float 3.2s ease-in-out infinite;
}

@keyframes float {

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

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

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 270px;
    line-height: 1.65;
}

/* Dot pulse */
.empty-animation {
    display: flex;
    gap: 7px;
    margin-top: 6px;
}

.dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.3;
    animation: pulse 1.5s ease-in-out infinite;
}

.dot-pulse.delay-1 {
    animation-delay: 0.22s;
}

.dot-pulse.delay-2 {
    animation-delay: 0.44s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.75);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-height: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(56, 189, 248, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

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

/* Result toolbar */
.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 15px;
    border-radius: var(--radius-md) !important;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-tabs {
    display: flex;
    gap: 3px;
    background: rgba(0, 0, 0, 0.32);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.81rem;
    font-weight: 600;
    font-family: var(--font-main);
    padding: 6px 14px;
    border-radius: calc(var(--radius-sm) - 3px);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.tab-btn.active {
    background: var(--accent);
    color: #070e1a;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-copy,
.btn-download {
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.81rem;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    transition: transform 0.14s, box-shadow 0.18s, background 0.18s;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.btn-download {
    background: linear-gradient(130deg, var(--accent), var(--accent2));
    color: #fff;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(56, 189, 248, 0.3);
}

/* Result state fills the sticky panel height */
.result-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    min-height: 0;
}

/* Code view */
.code-view {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    flex: 1;
    max-height: none;
    overflow-y: auto;
}

.code-view::-webkit-scrollbar {
    width: 5px;
}

.code-view::-webkit-scrollbar-track {
    background: transparent;
}

.code-view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.09);
    border-radius: 3px;
}

.code-view pre {
    font-family: var(--font-mono);
    font-size: 0.77rem;
    line-height: 1.7;
    color: #c9d1d9;
    padding: 22px 24px;
    white-space: pre;
    overflow-x: auto;
}

/* Preview view */
.preview-view {
    padding: 26px;
    max-height: 68vh;
    overflow-y: auto;
    border-radius: var(--radius-md) !important;
    line-height: 1.75;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.preview-note {
    margin-top: 22px;
    padding: 11px 15px;
    background: rgba(249, 115, 22, 0.09);
    border: 1px solid rgba(249, 115, 22, 0.24);
    border-radius: var(--radius-sm);
    color: var(--accent3);
    font-size: 0.77rem;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(70px);
    background: rgba(74, 222, 128, 0.13);
    border: 1px solid rgba(74, 222, 128, 0.38);
    color: var(--success);
    border-radius: 100px;
    padding: 11px 26px;
    font-size: 0.86rem;
    font-weight: 600;
    z-index: 999;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s;
    opacity: 0;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    /* Gradient fade instead of solid border */
    border-top: none;
    background: linear-gradient(to bottom, transparent 0%, rgba(56, 189, 248, 0.04) 100%);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 2.1;
}

.footer::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin-bottom: 40px;
}

.footer-sub {
    font-size: 0.74rem;
    opacity: 0.55;
}

/* ===== RENDERED PREVIEW STYLES ===== */
#renderedPreview h1,
#renderedPreview h2,
#renderedPreview h3 {
    margin: 18px 0 8px;
    color: var(--text-primary);
}

#renderedPreview pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.77rem;
    overflow-x: auto;
    margin: 12px 0;
}

#renderedPreview code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

#renderedPreview img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

#renderedPreview hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

#renderedPreview a {
    color: var(--accent);
    text-decoration: none;
}

#renderedPreview a:hover {
    text-decoration: underline;
}

#renderedPreview p {
    margin: 8px 0;
}

#renderedPreview ul,
#renderedPreview ol {
    margin: 8px 0;
    padding-left: 24px;
}