/* style.css */
:root {
    --bg-body: #09090b;
    --bg-sidebar: #121214;
    --bg-pane: #18181b;
    --bg-input: #000000;
    --bg-drawer: #121214;
    --border: #27272a;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.2);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --success: #10b981;
    --error: #ef4444;
    --diff-add: rgba(16, 185, 129, 0.2);
    --diff-add-text: #34d399;
    --diff-rem: rgba(239, 68, 68, 0.2);
    --diff-rem-text: #f87171;
    --font-ui: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --sidebar-w: 260px;
    --header-h: 60px;
}

html.light {
    --bg-body: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-pane: #ffffff;
    --bg-input: #f1f5f9;
    --bg-drawer: #ffffff;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --diff-add: rgba(16, 185, 129, 0.15);
    --diff-add-text: #059669;
    --diff-rem: rgba(239, 68, 68, 0.15);
    --diff-rem-text: #dc2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

p a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-ui);
    height: 100vh;
    display: flex;
    overflow: hidden;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

aside {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

aside.collapsed {
    width: 0;
    border-right: none;
}

.brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand i {
    color: var(--primary);
    margin-right: 10px;
}

a.brand-logo,
a.brand-logo:visited,
a.brand-logo:hover,
a.brand-logo:active {
    color: #fff;
    text-decoration: none;
}

html.light a.brand-logo,
html.light a.brand-logo:visited,
html.light a.brand-logo:hover,
html.light a.brand-logo:active {
    color: #0a0a0a;
}

.search-container {
    padding: 15px;
}

.search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.menu {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.nav-group-title {
    padding: 15px 20px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: 0.15s;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(125, 125, 125, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: #3b82f638;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.nav-item i {
    width: 18px;
    text-align: center;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

header {
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: var(--bg-sidebar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 40;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle-btn {
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 4px;
}

.menu-toggle-btn:hover {
    color: var(--primary);
    background: rgba(125, 125, 125, 0.1);
}

.tool-info h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.tool-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: none;
}

@media(min-width: 768px) {
    .tool-info p {
        display: block;
    }
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
    cursor: pointer;
}

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

.theme-btn {
    background: var(--bg-pane);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
}

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

.workspace {
    flex: 1;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    overflow: hidden;
    background: var(--bg-body);
    position: relative;
}

.pane {
    background: var(--bg-pane);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease;
}

.pane.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    border-radius: 0;
    border: none;
}

.pane-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-title {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.pane-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-icon {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: 0.2s;
}

.action-icon:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.editor-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

textarea {
    width: 100%;
    height: 100%;
    background: var(--bg-input);
    border: none;
    color: var(--text-main);
    padding: 15px;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.6;
    resize: none;
}

.editor-stats {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-top-left-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    pointer-events: none;
}

#visualOutput,
#iframePreview,
#mockControls,
#socialControls,
#shadowControls,
#imageControls,
#imagePreview {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    display: none;
    overflow: auto;
    padding: 20px;
}

#glassControls {
    display: unset !important;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.footer {
    height: 60px;
    background: var(--bg-sidebar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-top: 1px solid var(--border);
}

.footer-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    font-family: var(--font-code);
    color: var(--text-muted);
    white-space: nowrap;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    user-select: none;
    font-family: var(--font-code);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sec {
    background: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-sec:hover {
    border-color: var(--text-muted);
    background: rgba(125, 125, 125, 0.05);
}

.btn-pri {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-pri:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.footer-links {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.2s;
}

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

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#overlay.show {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 900px) {
    .workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        padding: 10px;
        gap: 10px;
    }

    aside {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }

    aside.open {
        transform: translateX(0);
    }

    .footer {
        padding: 15px;
        height: auto;
        flex-direction: column-reverse;
        gap: 15px;
    }

    .footer-actions {
        width: 100%;
    }

    .btn {
        flex: 1;
        justify-content: center;
        white-space: nowrap;
    }

    .footer-links {
        justify-content: center;
        width: 100%;
        padding-top: 10px;
    }

    .footer-stats {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    header {
        padding: 0 15px;
    }
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-pane);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: 0.4s;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: var(--error);
}

.toast.error i {
    color: var(--error);
}

.json-key {
    color: #d2a8ff;
}

.json-string {
    color: #a5d6ff;
}

.json-number {
    color: #ff9f89;
}

.json-boolean {
    color: #569cd6;
    font-weight: bold;
}

.light .json-key {
    color: #a31515;
}

.light .json-string {
    color: #0451a5;
}

.diff-added {
    background-color: var(--diff-add);
    color: var(--diff-add-text);
    display: block;
    width: 100%;
}

.diff-removed {
    background-color: var(--diff-rem);
    color: var(--diff-rem-text);
    display: block;
    width: 100%;
}

pre {
    font-family: var(--font-code);
    white-space: pre-wrap;
    font-size: 13px;
}

.tool-group {
    padding: 15px;
    background: var(--bg-sidebar);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

.tool-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.tool-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px;
    border-radius: 4px;
    font-family: var(--font-code);
    margin-bottom: 10px;
}

.checkbox-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    cursor: pointer;
}

.glass-slider {
    width: 100%;
    -webkit-appearance: none;
    background: var(--border);
    height: 4px;
    border-radius: 2px;
}

.glass-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-glow);
    color: var(--primary);
}

.img-preview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.img-card {
    background: var(--bg-sidebar);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.img-card img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: none;
}

.img-placeholder-icon {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 10px;
}

.img-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.badge-save {
    background: var(--diff-add) !important;
    color: var(--diff-add-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* --- PREMIUM BLOG / SEO CONTENT STYLES (From index.html) --- */
.content-container {
    margin: 20px auto 40px auto;
    padding: 0 20px;
    position: relative;
    max-width: 90%;
}

#toolTitle {
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 3px;
}

.clean-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Glass effect behind content */
.clean-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 75%;
    height: 400px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.prose {
    position: relative;
    z-index: 1;
}

.prose h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 20px 0;
    background: linear-gradient(180deg, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.light .prose h1 {
    background: linear-gradient(180deg, #0f172a, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.prose h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 40px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.prose h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 35px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.prose p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

html.light .prose p {
    color: #475569;
}

.prose strong {
    color: var(--text-main);
    font-weight: 700;
}

.prose ul {
    margin-bottom: 24px;
    padding-left: 20px;
    list-style: none;
}

.prose li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.prose li::before {
    content: "→";
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    position: absolute;
    left: 0;
    top: 0;
}

.prose ol {
    counter-reset: list-counter;
    margin-bottom: 24px;
    padding-left: 20px;
    list-style: none;
}

.prose ol li {
    counter-increment: list-counter;
    padding-left: 35px;
}

.prose ol li::before {
    content: counter(list-counter) ".";
    color: var(--primary);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* FAQ Cards */
.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 25px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

html.light .faq-item {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e2e8f0;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
}

html.light .faq-item:hover {
    background: rgba(79, 70, 229, 0.05);
}

.faq-item:hover::before {
    height: 100%;
}

/* Main Scroll Wrapper (For Layouts with SEO Content) */
#scrollable-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 80px;
    /* Space for absolute/fixed footer */
}

#scrollable-wrapper::-webkit-scrollbar {
    width: 6px;
}

#scrollable-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

#scrollable-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.faq-item h3 {
    margin: 0 0 8px 0 !important;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
}

.faq-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* --- FIXED FOOTER LAYOUT (Matches Glassmorphism Generator) --- */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 5px;
    font-size: 0.8rem;
    transition: color 0.2s;
}

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

/* Ensure Visual Output has Height for inner content */
#visualOutput {
    height: 100%;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Fix for Glass Controls Visibility */
.glass-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

/* ============================================
   MOBILE & TABLET RESPONSIVE STYLES
   ============================================ */

/* Tablet Portrait (768px - 900px) */
@media (max-width: 900px) and (min-width: 769px) {
    .workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        padding: 15px;
        gap: 15px;
    }

    .pane {
        min-height: 300px;
    }

    .content-container {
        padding: 0 15px;
    }

    .clean-card {
        padding: 30px;
    }

    .prose h1 {
        font-size: 1.8rem;
    }

    .prose h2 {
        font-size: 1.4rem;
    }
}

/* Large Mobile (480px - 768px) */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .workspace {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(250px, 1fr) minmax(250px, 1fr);
        padding: 10px;
        gap: 10px;
    }

    .pane {
        min-height: 250px;
    }

    header {
        padding: 0 10px;
        height: 55px;
    }

    #toolTitle {
        font-size: 1rem;
    }

    .tool-info p {
        display: none;
    }

    .content-container {
        padding: 0 10px;
        max-width: 100%;
    }

    .clean-card {
        padding: 20px;
        border-radius: 8px;
    }

    .prose h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .prose h2 {
        font-size: 1.25rem;
        margin-top: 30px;
    }

    .prose h3 {
        font-size: 1.1rem;
    }

    .prose p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .prose li {
        padding-left: 20px;
        margin-bottom: 8px;
    }

    .faq-item {
        padding: 15px;
        margin-bottom: 12px;
    }

    .faq-item strong {
        font-size: 0.95rem;
    }

    .faq-item p {
        font-size: 0.85rem;
    }

    .footer {
        padding: 12px;
        height: auto;
        flex-direction: column;
        gap: 12px;
    }

    .footer-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .btn {
        flex: 1;
        min-width: 45%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.75rem;
    }

    .footer-links {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
        text-align: center;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .footer-stats {
        display: none;
    }

    textarea {
        font-size: 12px;
        padding: 12px;
    }

    .pane-header {
        padding: 8px 12px;
    }

    .pane-title {
        font-size: 0.7rem;
    }

    .action-icon {
        font-size: 1rem;
        padding: 5px;
    }

    .tool-group {
        padding: 12px;
    }

    .drop-zone {
        padding: 25px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    :root {
        --header-h: 50px;
    }

    .workspace {
        padding: 8px;
        gap: 8px;
        grid-template-rows: minmax(200px, 1fr) minmax(200px, 1fr);
    }

    .pane {
        min-height: 200px;
        border-radius: 6px;
    }

    header {
        height: 50px;
        padding: 0 8px;
    }

    #toolTitle {
        font-size: 0.9rem;
    }

    .menu-toggle-btn {
        font-size: 1.2rem;
        padding: 10px;
    }

    .theme-btn {
        width: 32px;
        height: 32px;
    }

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

    .header-right {
        gap: 10px;
    }

    .content-container {
        padding: 0 8px;
        margin: 15px auto 30px auto;
    }

    .clean-card {
        padding: 15px;
        border-radius: 6px;
    }

    .prose h1 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .prose h2 {
        font-size: 1.15rem;
        margin-top: 25px;
        padding-bottom: 8px;
    }

    .prose h2::before {
        display: none;
    }

    .prose h3 {
        font-size: 1rem;
        margin-top: 20px;
    }

    .prose p {
        font-size: 0.9rem;
        line-height: 1.65;
        margin-bottom: 15px;
    }

    .prose ul,
    .prose ol {
        padding-left: 10px;
    }

    .prose li {
        padding-left: 18px;
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .prose li::before {
        font-size: 0.9rem;
    }

    .faq-item {
        padding: 12px;
        margin-bottom: 10px;
        border-radius: 6px;
    }

    .faq-item strong {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .faq-item p {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .footer {
        padding: 10px;
        gap: 10px;
    }

    .footer-actions {
        gap: 8px;
    }

    .btn {
        padding: 10px 12px;
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }

    .btn i {
        font-size: 0.8rem;
    }

    .footer-links {
        font-size: 0.75rem;
        gap: 10px;
    }

    .footer-links a {
        font-size: 0.75rem;
    }

    textarea {
        font-size: 11px;
        padding: 10px;
        line-height: 1.5;
    }

    .pane-header {
        padding: 6px 10px;
    }

    .pane-title {
        font-size: 0.65rem;
    }

    .pane-actions {
        gap: 8px;
    }

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

    .editor-stats {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .tool-group {
        padding: 10px;
        margin-bottom: 10px;
    }

    .tool-title {
        font-size: 0.8rem;
    }

    .tool-input {
        padding: 6px;
        font-size: 0.85rem;
    }

    .checkbox-group {
        gap: 10px;
    }

    .checkbox-group label {
        font-size: 0.8rem;
    }

    .drop-zone {
        padding: 20px;
    }

    .drop-zone p {
        font-size: 0.85rem;
    }

    .slider-row {
        font-size: 0.75rem;
    }

    .toast {
        bottom: 15px;
        right: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Sidebar mobile adjustments */
    aside {
        width: 85vw;
        max-width: 300px;
    }

    .brand {
        height: 50px;
        font-size: 1rem;
        padding: 0 15px;
    }

    .search-container {
        padding: 10px;
    }

    .search-input {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .nav-group-title {
        padding: 12px 15px 6px;
        font-size: 0.7rem;
    }

    .nav-item {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements for all mobile */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }

    .action-icon {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item {
        min-height: 44px;
    }

    .theme-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .workspace {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }

    .pane {
        min-height: 200px;
    }

    .footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-actions {
        width: auto;
    }

    .btn {
        flex: none;
    }
}

/* Print styles */
@media print {

    aside,
    header,
    .footer,
    .pane:first-child {
        display: none !important;
    }

    .workspace {
        display: block;
    }

    .pane {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .content-container {
        max-width: 100%;
    }
}