/**
 * maker.nlink.kr - Pieter Levels (@levelsio) style Minimalist Theme
 * Clean, ultra-fast, high signal-to-noise ratio, Dark/Light mode
 */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Dark Mode Defaults (Levelsio Vercel aesthetic) */
    --bg: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #151d2f;
    --bg-card-hover: #1c263d;
    --bg-subtle: #24304c;
    
    --border: #232f48;
    --border-hover: #334466;
    --border-focus: #38bdf8;

    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --primary-light: rgba(56, 189, 248, 0.12);

    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-orange: #f59e0b;
    --accent-orange-bg: rgba(245, 158, 11, 0.1);
    --accent-purple: #8b5cf6;
    --accent-purple-bg: rgba(139, 92, 246, 0.1);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.65);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* 2. Slate Theme (Linear / Charcoal) */
[data-theme="slate"] {
    --bg: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #293548;
    --bg-subtle: #334155;

    --border: #334155;
    --border-hover: #475569;
    --border-focus: #818cf8;

    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(129, 140, 248, 0.12);
}

/* 3. Light Theme (Soft Clean Offwhite) */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-subtle: #e2e8f0;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #0284c7;

    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;

    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: rgba(2, 132, 199, 0.1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* 4. Sepia Theme (Warm Paper / Book Reader) */
[data-theme="sepia"] {
    --bg: #fbf7ee;
    --bg-surface: #f4eee0;
    --bg-card: #ffffff;
    --bg-card-hover: #f7f2e7;
    --bg-subtle: #ebe2cf;

    --border: #e6dcbe;
    --border-hover: #d5c8a3;
    --border-focus: #b45309;

    --text: #292524;
    --text-muted: #78716c;
    --text-dim: #a8a29e;

    --primary: #b45309;
    --primary-hover: #92400e;
    --primary-light: rgba(180, 83, 9, 0.1);

    --shadow-sm: 0 1px 3px rgba(120, 113, 108, 0.08);
    --shadow-md: 0 4px 12px rgba(120, 113, 108, 0.1);
    --shadow-lg: 0 12px 28px rgba(120, 113, 108, 0.14);
}

/* 5. OLED Theme (Pure 100% Black / Battery Saver) */
[data-theme="oled"] {
    --bg: #000000;
    --bg-surface: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-subtle: #222222;

    --border: #222222;
    --border-hover: #333333;
    --border-focus: #10b981;

    --text: #ffffff;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;

    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: rgba(16, 185, 129, 0.15);

    --shadow-sm: 0 1px 2px rgba(255, 255, 255, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.95);
}

/* Native App Touch & Selection Rules (AGENTS.md) */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
}

input, textarea, [contenteditable="true"], .selectable, .selectable-text {
    -webkit-user-select: text;
    user-select: text;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.9);
}

.header-inner {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.3px;
    color: var(--text);
}

.brand-badge {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

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

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

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

/* Hero Section */
.hero-section {
    padding: 32px 0 20px;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 15.5px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 20px;
    line-height: 1.6;
    word-break: keep-all;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Navigation Tabs */
.tabs-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tabs-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: max-content;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-badge {
    background: var(--bg-subtle);
    color: var(--text-dim);
    font-size: 12px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.tab-btn.active .tab-badge {
    background: var(--primary-light);
    color: var(--primary);
}

/* Feed Control & Filter Bar */
.feed-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 16px;
    flex-wrap: wrap;
    width: 100%;
}

/* Filter Tag Pills */
.filter-pills-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.filter-pills-bar::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    padding: 6px 14px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.filter-pill:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.filter-pill:active {
    transform: scale(0.96);
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Feed Cards List */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

body.modal-open {
    overflow: hidden !important;
}

/* Maker Showcase Card (Levelsio style) */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    gap: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.project-card a,
.project-card button,
.project-card .vote-box {
    cursor: pointer;
}

.vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 56px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vote-box:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.vote-box:active {
    transform: scale(0.95);
}

.vote-box.voted {
    background: linear-gradient(135deg, var(--primary), #8b5cf6) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.vote-arrow {
    font-size: 11px;
    line-height: 1;
    margin-bottom: 3px;
    color: var(--primary);
    font-weight: 900;
    transition: transform 0.15s ease, color 0.15s ease;
}

.vote-box:hover .vote-arrow {
    transform: translateY(-1px);
}

.vote-box.voted .vote-arrow {
    color: #ffffff !important;
}

.vote-count {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
    line-height: 1;
}

.vote-box.voted .vote-count {
    color: #ffffff !important;
    font-weight: 900;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.card-title-group {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.card-title {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    word-break: keep-all;
}

.card-title a:hover {
    color: var(--primary);
}

.card-domain {
    font-size: 13px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.card-domain:hover {
    color: var(--primary);
}

.card-tagline {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.55;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-dim);
}

.ai-tool-pill {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.duration-pill {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.ai-badge-pill {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.card-badges-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.external-metric-pill {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* AI Review Card Box */
.ai-review-box {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 13px 15px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.ai-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 6px;
}

.ai-score-tag {
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
}

/* Toolkit Card */
.toolkit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: all 0.2s ease;
}

.toolkit-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.toolkit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.toolkit-icon {
    font-size: 22px;
}

.toolkit-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.toolkit-summary {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 12px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
    overscroll-behavior: contain;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Ensure forms inside modal-card inherit flex column & shrink properly */
.modal-card form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 0;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.btn-close-modal {
    color: var(--text-muted);
    font-size: 22px;
    padding: 6px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1;
    background: transparent;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-close-modal:hover,
.btn-close-modal:active {
    color: var(--text);
    background: var(--bg-card);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    background: var(--bg-card);
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-hint {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-size: 14.5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.tools-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tool-chip-label input[type="checkbox"] {
    accent-color: var(--primary);
}

.tool-chip-label:hover {
    border-color: var(--border-hover);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Live Floating App Update Banner (AGENTS.md) */
.update-banner {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 420px;
    background: rgba(17, 19, 26, 0.96);
    border: 1px solid var(--primary);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 3000;
    font-size: 13px;
    box-sizing: border-box;
    animation: slideDown 0.3s ease;
}

.update-banner span {
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.update-banner .btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
}

@keyframes slideDown {
    from { transform: translate(-50%, -16px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 24px 0;
    background: var(--bg-surface);
    font-size: 13px;
    color: var(--text-dim);
    text-align: center;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

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

/* ==========================================================================
   In-App Legal Modal Styles (Terms of Service & Privacy Policy)
   ========================================================================== */
.legal-modal-card {
    max-width: 640px;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.legal-tabs-nav {
    display: flex;
    gap: 8px;
}

.legal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.legal-tab-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.legal-tab-btn.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.legal-modal-close-btn {
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    padding: 4px;
    cursor: pointer;
}

.legal-modal-close-btn:hover {
    color: var(--text);
}

.legal-notice-box {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--primary);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.55;
}

.legal-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.legal-section h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.legal-section p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.highlight-clause {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.highlight-clause h4 {
    color: var(--accent-orange);
}

/* ==========================================================================
   Project Detail Modal & Component Styles
   ========================================================================== */
.detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-title-col {
    flex: 1;
    min-width: 0;
}

.detail-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.detail-tagline {
    font-size: 15px;
    color: var(--text-muted);
    word-break: keep-all;
    line-height: 1.5;
}

.detail-visit-btn {
    flex-shrink: 0;
    padding: 9px 18px;
    font-size: 14px;
}

.detail-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

/* Responsive Hide/Show Helpers */
.hide-desktop {
    display: none !important;
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
    .hide-desktop {
        display: inline-flex !important;
    }
}

/* ==========================================================================
   Mobile-First Responsive System (Galaxy S24 / iPhone / Small Viewports)
   ========================================================================== */
@media (max-width: 640px) {
    /* Base Container */
    .container {
        padding: 0 14px;
    }

    /* Header Compact Mode */
    .site-header {
        border-bottom-color: var(--border);
    }
    .header-inner {
        height: 54px;
        gap: 8px;
    }
    .brand-logo {
        font-size: 17px;
        gap: 6px;
    }
    .brand-badge {
        font-size: 10.5px;
        padding: 2px 5px;
    }
    .header-actions {
        gap: 6px;
    }
    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .header-actions .btn-sm {
        padding: 6px 11px;
        font-size: 13px;
        border-radius: var(--radius-sm);
    }

    /* Hero Section */
    .hero-section {
        padding: 22px 0 14px;
    }
    .hero-tag {
        font-size: 12px;
        padding: 4px 11px;
        margin-bottom: 10px;
    }
    .hero-title {
        font-size: 22px;
        line-height: 1.35;
        letter-spacing: -0.4px;
        word-break: keep-all;
        margin-bottom: 8px;
    }
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 14px;
        word-break: keep-all;
        padding: 0 4px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px !important;
        font-size: 14.5px !important;
    }

    /* Tabs & Filters */
    .tabs-container {
        margin-top: 8px;
        margin-bottom: 14px;
        width: 100%;
        overflow-x: hidden;
    }
    .tabs-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        min-width: 0;
        gap: 2px;
    }
    .tab-btn {
        justify-content: center;
        padding: 9px 2px;
        font-size: 13.5px;
        gap: 4px;
        white-space: nowrap;
        text-align: center;
        min-width: 0;
    }
    .tab-badge {
        font-size: 10.5px;
        padding: 1.5px 5px;
    }
    .filter-pills-bar {
        padding-bottom: 8px;
        margin-bottom: 14px;
        gap: 6px;
    }
    .filter-pill {
        padding: 5px 12px;
        font-size: 12.5px;
    }

    /* Feed List & Cards */
    .feed-list {
        gap: 12px;
        margin-bottom: 24px;
    }
    .project-card {
        padding: 14px;
        gap: 12px;
        border-radius: var(--radius-md);
    }
    .vote-box {
        min-width: 46px;
        height: 52px;
        border-radius: var(--radius-md);
    }
    .vote-arrow {
        font-size: 10.5px;
        margin-bottom: 2px;
    }
    .vote-count {
        font-size: 13.5px;
    }
    .card-header-row {
        gap: 6px;
        margin-bottom: 5px;
        align-items: center;
    }
    .card-title-group {
        gap: 6px;
        align-items: baseline;
    }
    .card-title {
        font-size: 15.5px;
        line-height: 1.35;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    .card-domain {
        font-size: 11.5px;
        white-space: nowrap;
    }
    .verified-maker-badge {
        font-size: 10.5px;
        padding: 2px 6.5px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .card-tagline {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 10px;
        word-break: keep-all;
    }
    .card-meta-row {
        gap: 6px;
        row-gap: 8px;
    }
    .ai-tool-pill, .duration-pill, .ai-badge-pill, .external-metric-pill {
        font-size: 11.5px;
        padding: 3px 6px;
    }
    .card-meta-row .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
    }
    .ai-review-box {
        padding: 12px 14px;
        margin-top: 10px;
        font-size: 13px;
        line-height: 1.55;
        border-radius: var(--radius-sm);
    }
    .ai-review-header {
        font-size: 12.5px;
        margin-bottom: 5px;
    }

    /* Detail Modal Mobile */
    .detail-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .detail-title {
        font-size: 20px;
    }
    .detail-tagline {
        font-size: 14px;
    }
    .detail-visit-btn {
        width: 100%;
        padding: 11px !important;
        font-size: 14.5px !important;
        justify-content: center;
    }
    .detail-card-box {
        padding: 14px;
    }

    /* Bottom-Sheet Style Modals for Mobile */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        background: rgba(0, 0, 0, 0.8);
        overscroll-behavior: contain;
    }
    .modal-card {
        border-radius: 20px 20px 0 0;
        max-height: 90dvh;
        max-height: 90vh;
        border-bottom: none;
        border-left: none;
        border-right: none;
        animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .modal-card form {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        margin: 0;
    }
    @keyframes sheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .modal-header {
        padding: 14px 16px;
        flex-shrink: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
        z-index: 10;
    }
    .modal-header h3 {
        font-size: 16px;
    }
    .modal-body {
        padding: 18px 16px 24px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
    .modal-body > .form-group:first-child {
        margin-top: 2px;
    }
    .modal-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        flex-direction: column-reverse;
        width: 100%;
        gap: 8px;
        flex-shrink: 0;
    }
    .modal-footer .btn {
        width: 100%;
        padding: 12px;
        font-size: 14.5px;
    }

    /* Prevent mobile auto-zoom on input focus */
    .form-control, input, select, textarea {
        font-size: 16px !important;
    }
    .tools-checkbox-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .tool-chip-label {
        padding: 7px 10px;
        font-size: 12.5px;
        justify-content: flex-start;
    }

    /* Footer */
    .site-footer {
        padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px));
        font-size: 12.5px;
    }
    .footer-links {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ==========================================================================
   Galaxy S24 (360px~384px) & Small Mobile Viewport Fine-Tuning
   ========================================================================== */
@media (max-width: 420px) {
    .container {
        padding: 0 10px;
    }
    .header-inner {
        height: 50px;
        gap: 6px;
    }
    .brand-logo {
        font-size: 15.5px;
        gap: 4px;
        min-width: 0;
    }
    .brand-logo span:nth-child(2) {
        font-size: 14.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .brand-badge {
        font-size: 9.5px;
        padding: 1.5px 4px;
    }
    .header-actions {
        gap: 5px;
        flex-shrink: 0;
    }
    .header-actions .btn-sm {
        padding: 5px 8px;
        font-size: 12px;
        gap: 3px;
    }
    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .hero-section {
        padding: 18px 0 12px;
    }
    .hero-title {
        font-size: 19px;
        line-height: 1.35;
        letter-spacing: -0.5px;
    }
    .hero-subtitle {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    .pwa-audit-box {
        padding: 5px !important;
        gap: 6px !important;
        border-radius: 10px !important;
    }
    .pwa-audit-box input {
        font-size: 13px !important;
    }
    .pwa-audit-box button {
        padding: 8px 12px !important;
        font-size: 12.5px !important;
    }
    .vote-box {
        min-width: 40px;
        height: 48px;
    }
    .project-card {
        padding: 12px;
        gap: 10px;
    }
    .tools-checkbox-group {
        grid-template-columns: 1fr;
    }
    .tab-btn {
        padding: 8px 1px;
        font-size: 12px;
        gap: 3px;
    }
    .tab-badge {
        font-size: 10px;
        padding: 1px 4px;
    }
    .feed-control-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .filter-pills-bar {
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 6px !important;
        margin-bottom: 0 !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    .sort-toggle-group {
        align-self: flex-end !important;
        margin-left: auto !important;
    }
        margin-left: 0 !important;
        align-self: flex-end;
    }
}

/* Domain Verification Badge & Site Audit Dashboard Styles */
.verified-maker-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 2.5px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.35;
    vertical-align: middle;
}

.tech-metric-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--accent-green);
    background: var(--accent-green-bg);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-family: var(--font-mono);
}

.audit-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 9px;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.audit-metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.audit-metric-label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 3px;
}

.audit-metric-value {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
}

.audit-metric-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Mobile Native Pull-to-Refresh & Touch Gesture Guard
   ========================================================================== */
html {
    overflow-x: hidden;
    max-width: 100vw;
    overscroll-behavior-y: none;
}
body {
    touch-action: pan-y;
}

.pull-refresh-indicator {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s ease;
    opacity: 0;
    transform: translateY(-20px);
}

.pull-refresh-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px var(--primary-light);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.15s ease;
}

.pull-refresh-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.1s ease;
}

.pull-refresh-indicator.refreshing .pull-refresh-icon {
    animation: spinRefresh 0.75s linear infinite;
    color: var(--primary);
}

@keyframes spinRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Directive Project Launch Center & Live Audit Layout */
.directive-register-section {
    padding: 16px 0 48px;
    animation: fadeInDirective 0.25s ease;
}

@keyframes fadeInDirective {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.directive-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-back-to-feed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-back-to-feed:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.directive-hero-card {
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 45%), var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.directive-hero-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.directive-hero-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.directive-hero-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}

.directive-hero-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

/* Container Wide Mode for Directive Launch View */
.container.directive-wide-mode {
    max-width: 1180px;
    transition: max-width 0.2s ease;
}

.directive-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
    align-items: start;
    width: 100%;
}

.directive-col-form,
.directive-col-audit {
    min-width: 0;
    width: 100%;
}

.directive-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    min-width: 0;
}

.directive-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Right Panel Live Audit Checklist */
.directive-audit-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
    width: 100%;
}

.directive-audit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    gap: 10px;
    min-width: 0;
    word-break: keep-all;
}

.directive-audit-item span:first-child {
    min-width: 0;
    flex: 1;
}

.directive-audit-item .step-status {
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 700;
}

.directive-audit-item.pass {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.06);
    color: var(--text);
}

.directive-audit-item.fail {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.06);
    color: var(--danger);
}

@keyframes stepPulse {
    0%, 100% { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.2); }
    50% { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35); }
}

.directive-audit-item.running {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    animation: stepPulse 1.2s infinite ease-in-out;
}

/* Toolkit Live Demo Banner */
.toolkit-demo-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(56, 189, 248, 0.08)), var(--bg-card);
    border: 1.5px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.toolkit-demo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.toolkit-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6366f1, #38bdf8);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.toolkit-demo-meta {
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.toolkit-demo-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.toolkit-demo-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .directive-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .directive-hero-card {
        padding: 16px;
    }
    .directive-hero-title {
        font-size: 19px;
    }
    .directive-panel {
        padding: 14px;
    }
    .toolkit-demo-banner {
        padding: 16px;
    }
    .toolkit-demo-title {
        font-size: 17px;
    }
}

/* Toolkit Markdown & Code Blocks */
.toolkit-markdown {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
}
.toolkit-markdown h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.toolkit-markdown h3 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.toolkit-markdown ul, .toolkit-markdown ol {
    padding-left: 22px;
    margin: 10px 0 16px 0;
}
.toolkit-markdown li {
    margin-bottom: 6px;
    color: var(--text);
}
.toolkit-markdown blockquote {
    background: rgba(99, 102, 241, 0.08);
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
    color: var(--text);
    font-style: normal;
}
.toolkit-markdown .inline-code {
    background: rgba(255, 255, 255, 0.08);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 13px;
    border: 1px solid var(--border);
}
.code-block-wrapper {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    margin: 14px 0 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-block-lang {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}
.code-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}
.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.code-copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
}
.code-block-wrapper pre {
    margin: 0;
    padding: 14px;
    overflow-x: auto;
    font-family: var(--font-mono, Consolas, Monaco, monospace);
    font-size: 13px;
    line-height: 1.55;
    color: #e2e8f0;
}

