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

:root {
    --radius: 8px;
    --radius-lg: 12px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
}

/* --- Dark Theme (default) --- */
[data-theme="dark"] {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #22263a;
    --border: #2a2e3f;
    --text: #e4e6ef;
    --text-muted: #8b8fa3;
    --primary: #2196F3;
    --primary-hover: #1976D2;
    --primary-light: #4FC3F7;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --success: #00b894;
    --warning: #fdcb6e;
    --error-bg: #2d1b1b;
    --error-border: #e74c3c;
    --info-bg: #1b2d2d;
    --info-border: #00b894;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --deleted-overlay: rgba(0, 0, 0, 0.85);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Light Theme --- */
[data-theme="light"] {
    --bg: #f4f5f9;
    --surface: #ffffff;
    --surface-hover: #eef0f5;
    --border: #d5d8e3;
    --text: #1a1d2b;
    --text-muted: #5c6070;
    --primary: #1976D2;
    --primary-hover: #1565C0;
    --primary-light: #1565C0;
    --danger: #d32f2f;
    --danger-hover: #b71c1c;
    --success: #009b7d;
    --warning: #d4940a;
    --error-bg: #fef2f2;
    --error-border: #e57373;
    --info-bg: #eefbf7;
    --info-border: #00b894;
    --modal-overlay: rgba(0, 0, 0, 0.4);
    --deleted-overlay: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.accent {
    color: var(--primary-light);
}

/* --- Site Header --- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
}

.site-logo-icon {
    display: block;
}

.site-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-hover);
}

/* --- Site Footer --- */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-sep {
    margin: 0 0.4rem;
}

.footer-tagline {
    opacity: 0.7;
}

/* --- Layout --- */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container-narrow {
    max-width: 480px;
}

.page { display: none; }
.page.active { display: block; flex: 1; }

/* --- Typography --- */

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* --- Landing page --- */

.hero {
    text-align: center;
    padding: 2rem 0 2.5rem;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-action-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-action-block .btn {
    width: 100%;
}

.hero-action-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    max-width: 240px;
    text-align: center;
    line-height: 1.5;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature-icon {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 0.1rem;
}

.feature-item strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.feature-item span {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.trust-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.6;
}

/* --- Install CTA --- */

.install-section {
    margin-bottom: 2rem;
}

.install-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08), rgba(79, 195, 247, 0.06));
    border: 1px solid rgba(33, 150, 243, 0.25);
    border-radius: var(--radius-lg);
}

.install-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2196F3, #4FC3F7);
    border-radius: 10px;
    color: white;
}

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

.install-title {
    display: block;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.install-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.btn-install {
    flex-shrink: 0;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.btn-install:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-install:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.btn-install.installed {
    background: var(--success);
}

/* iOS install modal */

.ios-install-lead {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.ios-install-steps {
    list-style: none;
    counter-reset: ios-step;
    padding: 0;
    margin: 0 0 1.25rem;
}

.ios-install-steps li {
    counter-increment: ios-step;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.ios-install-steps li:last-child {
    border-bottom: none;
}

.ios-install-steps li::before {
    content: counter(ios-step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.ios-share-icon {
    display: inline-flex;
    vertical-align: middle;
    color: var(--primary);
}

.ios-install-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

[data-theme="light"] .install-card {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.06), rgba(33, 150, 243, 0.04));
    border-color: rgba(25, 118, 210, 0.2);
    box-shadow: var(--shadow);
}

[data-theme="light"] .btn-install {
    color: white;
}

/* --- Cards --- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -0.5rem 0 1.25rem;
}

/* --- Back link --- */

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

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

/* --- Form elements --- */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 180px;
    font-family: var(--mono);
    font-size: 0.9rem;
}

/* --- Generate Password --- */

.password-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.password-input-row input {
    flex: 1;
    min-width: 0;
}

.btn-generate {
    background: var(--surface-hover);
    color: var(--primary);
    border: 1px solid var(--border);
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
}

.btn-generate:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Password Strength Indicator --- */

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    display: flex;
    gap: 4px;
    height: 4px;
    margin-bottom: 0.35rem;
}

.strength-segment {
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.25s;
}

.strength-segment.very-weak { background: var(--danger); }
.strength-segment.weak      { background: #e67e22; }
.strength-segment.medium    { background: var(--warning); }
.strength-segment.strong    { background: var(--success); }

.strength-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.strength-label.very-weak { color: var(--danger); }
.strength-label.weak      { color: #e67e22; }
.strength-label.medium    { color: var(--warning); }
.strength-label.strong    { color: var(--success); }

.strength-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.3rem;
}

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

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
    color: var(--text);
    line-height: 1.4;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-hover);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-large {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    text-decoration: underline;
    padding: 0;
}

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

/* --- Clipboard header --- */

.clipboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.clipboard-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
}

.status {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.status.connected {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.status.disconnected {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

.device-count {
    color: var(--text-muted);
}

/* --- Text info --- */

.text-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Drop zone --- */

.file-list:not(:empty) {
    margin-bottom: 1rem;
}

.drop-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(33, 150, 243, 0.04);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(33, 150, 243, 0.1);
}

.drop-zone.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-content .link-btn {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.drop-zone-icon {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.drop-zone-text {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.drop-zone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- File list --- */

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: 0.75rem;
}

.file-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-item .file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item .file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-item .file-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.file-source-status {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.file-source-status.online {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.file-source-status.offline {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

/* --- Transfers --- */

.transfer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transfer-item {
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.transfer-progress {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.transfer-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s;
}

/* --- Status boxes --- */

.error-box {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.info-box {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--success);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* --- Danger zone --- */

.danger-zone {
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* --- Modal --- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 380px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin-bottom: 0;
    color: var(--text);
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.modal-actions .btn {
    flex: 1;
}

/* --- QR specific --- */

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.qr-container svg {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.qr-url {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    word-break: break-all;
    margin-bottom: 1rem;
}

.qr-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

.qr-trusted-option {
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.qr-trusted-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.qr-trusted-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.qr-trusted-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* --- Overlay (deleted) --- */

.overlay {
    position: fixed;
    inset: 0;
    background: var(--deleted-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 1rem;
}

.overlay-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.overlay-content h2 {
    color: var(--danger);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.overlay-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-style: italic;
}

/* --- Copy feedback --- */

.copy-feedback {
    position: fixed;
    top: 4rem;
    right: 1rem;
    background: var(--success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 400;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-0.5rem); }
    15% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- Theme Toggle --- */

.theme-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0;
    position: relative;
}

.theme-toggle-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 26px;
    border-radius: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s;
    padding: 0;
    line-height: 1;
}

.theme-toggle-option svg {
    width: 16px;
    height: 16px;
}

.theme-toggle-option.active {
    background: var(--primary);
    color: white;
}

/* --- Light Theme Refinements --- */

[data-theme="light"] .card {
    box-shadow: var(--shadow);
}

[data-theme="light"] .feature-item {
    box-shadow: var(--shadow);
}

[data-theme="light"] .modal {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .overlay-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .site-header {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .copy-feedback {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .file-item {
    background: var(--surface);
}

[data-theme="light"] .transfer-item {
    background: var(--surface);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] textarea {
    background: var(--bg);
}

/* Smooth theme transition */
body,
.site-header,
.site-footer,
.card,
.feature-item,
.modal,
.overlay-content,
.file-item,
.transfer-item,
.btn,
.nav-link,
input[type="text"],
input[type="password"],
textarea,
.drop-zone,
.status,
.error-box,
.info-box,
.install-card {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero { padding: 1.5rem 0 2rem; }
    .container { padding: 1.5rem 1rem; }
}

/* Mobile */
@media (max-width: 600px) {
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero { padding: 1rem 0 1.5rem; }

    .features {
        grid-template-columns: 1fr;
    }

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

    .feature-item span {
        font-size: 0.875rem;
    }

    .container { padding: 1rem 0.75rem; }
    h1 { font-size: 1.4rem; }
    .clipboard-title { font-size: 1.2rem; }

    .clipboard-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-large {
        width: 100%;
        padding: 0.85rem 1.5rem;
    }

    .install-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .btn-install {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .hero-action-block {
        width: 100%;
    }

    .hero-action-hint {
        max-width: 100%;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .file-item .file-actions {
        width: 100%;
    }

    .file-item .file-actions .btn {
        flex: 1;
    }

    .drop-zone {
        padding: 1.5rem 1rem;
    }

    .modal {
        max-width: 100%;
        margin: 0.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .danger-zone {
        justify-content: center;
    }

    textarea {
        min-height: 140px;
    }

    .card {
        padding: 1rem;
    }

    .site-logo-text {
        font-size: 1rem;
    }

    .header-container {
        padding: 0.5rem 0.75rem;
    }

    .footer-tagline {
        display: block;
        margin-top: 0.25rem;
    }

    .footer-sep {
        display: none;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .container {
        max-width: 860px;
    }
}
