/* ========================================================================
   PASTE MANAGER — DESIGN SYSTEM
   Target: Code-editor aesthetic, developer-focused, dark-first
   Languages: DE / EN / RO
   ======================================================================== */

/* 1. VARIABLES & THEME =================================================== */
:root {
    /* Colors - Light theme */
    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    --bg-surface: #f6f8fa;
    --text-primary: #1f2328;
    --text-secondary: #656d76;
    --text-muted: #8b949e;
    --accent: #238636;
    --accent-hover: #1a7f2b;
    --accent-light: #2ea04330;
    --warm: #d97706;
    --success: #238636;
    --error: #cf222e;
    --border: #d0d7de;
    --shadow-sm: 0 1px 3px rgba(31,35,40,0.08);
    --shadow-md: 0 4px 12px rgba(31,35,40,0.12);
    --focus-ring: 0 0 0 3px rgba(35,134,54,0.3);
    /* Code editor colors (used in both themes for code areas) */
    --code-bg: #0d1117;
    --code-text: #c9d1d9;
    --code-keyword: #ff7b72;
    --code-string: #a5d6ff;
    --code-comment: #8b949e;
    --code-number: #79c0ff;
    --code-function: #d2a8ff;
    --code-tag: #7ee787;
    --code-attribute: #79c0ff;
    --code-line-num: #484f58;
    --code-gutter-bg: #161b22;
    --code-border: #30363d;
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    /* Layout */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --max-width: 1200px;
    --header-height: 64px;
    /* Typography */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
    --text-base: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    --text-lg: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
    --text-xl: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.25rem);
    /* Motion */
    --ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-slow: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #0d1117;
        --bg-card: #161b22;
        --bg-surface: #21262d;
        --text-primary: #e6edf3;
        --text-secondary: #8b949e;
        --text-muted: #656d76;
        --border: #30363d;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    }
}

html.theme-dark {
    --bg-page: #0d1117;
    --bg-card: #161b22;
    --bg-surface: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #656d76;
    --border: #30363d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* 2. BASE & RESET ======================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}
body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 48px;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent-light); color: var(--text-primary); }

/* 3. LAYOUT & CONTAINERS ================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: var(--space-lg);
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    font-size: var(--text-lg);
    line-height: 1.2;
    transition: opacity var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
    border-radius: var(--radius-sm);
}
.logo strong { font-weight: 700; letter-spacing: -0.02em; }
main { flex: 1; padding-block: var(--space-2xl); }

/* 4. TYPOGRAPHY & UTILITY =============================================== */
h1, h2, h3, h4 {
    text-wrap: balance;
    line-height: 1.2;
    font-weight: 600;
}
h1 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-lg); }
h3 { font-size: var(--text-xl); }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 5. COMPONENTS ========================================================= */

/* ── Language Switcher ── */
.lang-switch {
    display: inline-flex;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: 999px;
    gap: 4px;
    align-items: center;
    width: auto;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active {
    background: var(--bg-card);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

/* ── Theme Toggle ── */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    display: grid; place-items: center;
    font-size: 1.1rem;
    transition: var(--ease);
}
.theme-toggle:hover { background: var(--bg-card); }

/* ── Sub-site Banner ── */
.subsite-banner {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.3px;
    position: sticky;
    top: var(--header-height);
    z-index: 49;
}
.subsite-banner a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
}

/* ── Tool Card ── */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* ── Paste Header ── */
.paste-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    transition: var(--ease);
    white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}
.btn--outline:hover { background: var(--bg-surface); }
.btn--create {
    background: #238636;
    color: #fff;
    font-weight: 600;
}
.btn--create:hover { background: #1a7f2b; }
.btn--sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}

/* ── Form Elements ── */
.form-group { margin-bottom: var(--space-md); }
.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}
.form-input, .form-textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: var(--ease);
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    box-shadow: var(--focus-ring);
    border-color: var(--accent);
}
.form-input.is-error, .form-textarea.is-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(207,34,46,0.2);
}

/* ── Editor Toolbar ── */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    flex-wrap: wrap;
}
.toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    flex: 1;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.toolbar-input {
    padding: 6px 10px;
    font-size: var(--text-sm);
    max-width: 180px;
}
.toolbar-select-wrap {
    position: relative;
}
.toolbar-select {
    padding: 6px 10px;
    font-size: var(--text-sm);
    min-width: 110px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}
.password-input { max-width: 150px; }

/* ── Split Editor/Preview ── */
.editor-split {
    display: flex;
    height: 420px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    overflow: hidden;
}
.editor-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--code-bg);
    border-right: 1px solid var(--code-border);
}
.editor-divider {
    width: 4px;
    background: var(--code-border);
    cursor: col-resize;
    flex-shrink: 0;
}
.preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--code-bg);
}
.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: var(--code-gutter-bg);
    border-bottom: 1px solid var(--code-border);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--code-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.char-count {
    color: var(--code-comment);
    font-weight: 400;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}

/* ── Code Editor (textarea) ── */
.code-editor {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--code-bg);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 16px;
    resize: none;
    outline: none;
    tab-size: 4;
    -moz-tab-size: 4;
}
.code-editor::placeholder {
    color: var(--code-comment);
}
.code-editor::-webkit-scrollbar { width: 8px; height: 8px; }
.code-editor::-webkit-scrollbar-track { background: var(--code-bg); }
.code-editor::-webkit-scrollbar-thumb { background: var(--code-border); border-radius: 4px; }

/* ── Code Preview ── */
.code-preview {
    flex: 1;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--code-text);
    padding: 0;
}
.code-preview::-webkit-scrollbar { width: 8px; height: 8px; }
.code-preview::-webkit-scrollbar-track { background: var(--code-bg); }
.code-preview::-webkit-scrollbar-thumb { background: var(--code-border); border-radius: 4px; }
.code-line-empty {
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 13px;
}

/* ── Code container with line numbers ── */
.code-container-inline,
.code-container {
    display: flex;
    min-height: 100%;
}
.code-container {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: auto;
    max-height: 600px;
}
.code-container::-webkit-scrollbar { width: 8px; height: 8px; }
.code-container::-webkit-scrollbar-track { background: var(--code-bg); }
.code-container::-webkit-scrollbar-thumb { background: var(--code-border); border-radius: 4px; }
.line-numbers {
    padding: 12px 0;
    background: var(--code-gutter-bg);
    color: var(--code-line-num);
    text-align: right;
    user-select: none;
    min-width: 48px;
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    border-right: 1px solid var(--code-border);
}
.line-num {
    padding: 0 10px;
}
.code-highlighted {
    flex: 1;
    padding: 12px 16px;
    overflow-x: auto;
    min-width: 0;
}
.code-line {
    min-height: 1.6em;
    white-space: pre;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
}

/* ── Syntax Highlighting Colors ── */
.hl-keyword  { color: var(--code-keyword); font-weight: 500; }
.hl-string   { color: var(--code-string); }
.hl-comment  { color: var(--code-comment); font-style: italic; }
.hl-number   { color: var(--code-number); }
.hl-function { color: var(--code-function); }
.hl-tag      { color: var(--code-tag); }
.hl-attribute { color: var(--code-attribute); }

/* ── Mobile Tabs ── */
.mobile-tabs {
    display: none;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    overflow: hidden;
}
.mobile-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-surface);
    border: none;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--ease);
}
.mobile-tab.active {
    background: var(--code-bg);
    color: var(--code-text);
}

/* 6. TOOL-SPECIFIC ======================================================= */

/* ── Paste View ── */
.paste-view { margin-top: var(--space-md); }
.paste-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.paste-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}
.paste-meta-left { flex: 1; min-width: 200px; }
.paste-meta-right { flex-shrink: 0; }
.paste-badges {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}
.paste-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 500;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.paste-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ── Expiration ── */
.paste-expiry {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    border-left: 3px solid var(--accent);
}

/* ── Share Link ── */
.share-link-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.share-link-input {
    flex: 1;
    min-width: 200px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    padding: 6px 10px;
}

/* ── Password Gate ── */
.password-gate {
    padding: var(--space-2xl);
    text-align: center;
}
.password-gate-inner {
    max-width: 400px;
    margin: 0 auto;
}
.password-gate-inner p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}
.password-gate-form {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}
.password-gate-form .form-input {
    max-width: 250px;
}
.inline-error {
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
    font-weight: 500;
}

/* ── Status Message ── */
.status-message {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
    margin: var(--space-md) 0;
}
.status-success {
    background: #2ea04315;
    color: var(--success);
    border: 1px solid #2ea04330;
}
.status-error {
    background: #cf222e15;
    color: var(--error);
    border: 1px solid #cf222e30;
}

/* ── Recent Pastes ── */
.recent-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}
.recent-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--ease);
    gap: var(--space-sm);
}
.recent-item:hover {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.recent-item-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}
.recent-item-title {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-item-meta {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}
.recent-item-meta .paste-badge {
    font-size: 11px;
    padding: 1px 6px;
}
.recent-item-views {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Legal Footer ── */
.subsite-legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 8px 16px;
    z-index: 9998;
    text-align: center;
    font-size: var(--text-sm);
}
.subsite-legal-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.footer-legal-link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 7. STICKY DONATE ======================================================= */
.sticky-donate-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--ease), transform var(--ease);
    pointer-events: none;
}
.sticky-donate-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.sticky-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #FFDD00;
    color: #111;
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    border: none;
    text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease);
}
.sticky-donate-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(255, 205, 0, 0.3);
}
.sticky-donate-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
.donate-icon { font-size: 1.2em; }

/* 8. MODAL =============================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.modal-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.modal-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}
.modal-content {
    padding: var(--space-2xl);
    overflow-y: auto;
    max-height: 80vh;
}
.modal-loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* 9. ANIMATIONS ========================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.status-message {
    animation: fadeIn 0.2s ease-out;
}

/* 10. RESPONSIVE ========================================================= */
@media (max-width: 640px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    .tool-card { padding: var(--space-md); }
    .paste-header { flex-direction: column; }
    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .toolbar-left {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    .toolbar-input { max-width: 100%; }
    .toolbar-select { min-width: 0; flex: 1; }
    .toolbar-right { justify-content: flex-end; }
    .password-input { max-width: 100%; flex: 1; }
    .editor-split {
        flex-direction: column;
        height: auto;
    }
    .editor-pane { height: 300px; border-right: none; }
    .editor-divider { display: none; }
    .preview-pane { height: 300px; }
    .mobile-tabs { display: flex; }
    .preview-pane.pane-hidden-mobile { display: none; }
    .editor-pane.pane-hidden-mobile { display: none; }
    .paste-meta { flex-direction: column; }
    .paste-actions { flex-wrap: wrap; }
    .share-link-row { flex-direction: column; align-items: flex-start; }
    .share-link-input { min-width: 0; }
    .lang-btn span:last-child { display: none; }
    .lang-btn { padding: 6px 8px; font-size: 1.2rem; }
    .sticky-donate-wrapper { bottom: 16px; right: 16px; }
    .sticky-dononate-btn { padding: 8px 14px; font-size: var(--text-xs); border-radius: 999px; }
    .recent-item { flex-direction: column; align-items: flex-start; }
    .password-gate-form { flex-direction: column; align-items: stretch; }
    .password-gate-form .form-input { max-width: 100%; }
}

/* 11. REDUCED MOTION ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .sticky-donate-wrapper { transition: none; }
}

/* 12. PRINT ============================================================= */
@media print {
    .site-header,
    .subsite-banner,
    .sticky-donate-wrapper,
    .subsite-legal-footer,
    .theme-toggle,
    .lang-switch,
    .editor-toolbar,
    .mobile-tabs,
    .btn,
    .status-message { display: none; }
    body { background: #fff; color: #000; padding: 0; }
    .tool-card { border: 1px solid #ccc; box-shadow: none; padding: 1rem; }
    .code-container { border: 1px solid #ccc; }
}
