:root {
    --bg: #F5F6F8;
    --bg-card: #FFFFFF;
    --bg-input: #F0F2F5;
    --blue: #1A73E8;
    --blue-light: #4A9AF5;
    --blue-glow: rgba(26,115,232,0.08);
    --green: #34A853;
    --green-light: #5BC878;
    --green-glow: rgba(52,168,83,0.08);
    --text: #1A1A2E;
    --text-dim: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --danger: #EA4335;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    box-shadow: var(--shadow);
}

.upload-card { max-width: 540px; }
.links-card { max-width: 660px; }
.password-card { max-width: 420px; text-align: center; }
.password-card > svg { margin-bottom: 16px; }
.admin-login-card { max-width: 400px; text-align: center; }

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    border-radius: 18px;
    margin-bottom: 14px;
    letter-spacing: -1px;
    box-shadow: 0 4px 16px rgba(26,115,232,0.25);
}

h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
h2 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; letter-spacing: -0.3px; }
h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }

.tagline { color: var(--text-dim); font-size: 14px; }

.format-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-dim);
}

.format-info-centered { text-align: center; align-items: center; }
.format-info-centered .format-row { justify-content: center; }
.format-row { display: flex; align-items: center; gap: 8px; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue { background: var(--blue-glow); color: var(--blue); }
.badge-green { background: var(--green-glow); color: var(--green); }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    margin-bottom: 20px;
    background: var(--bg-card);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--blue);
    background: var(--blue-glow);
    box-shadow: 0 0 0 4px rgba(26,115,232,0.06);
}

.upload-icon { color: var(--blue); margin-bottom: 12px; }
.upload-main-text { font-size: 16px; font-weight: 600; color: var(--text); }
.upload-sub-text { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.album-toggle {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-dim);
    transition: color .2s;
}

.radio-option:has(input:checked) { color: var(--blue); font-weight: 600; }

.radio-option input[type="radio"] {
    accent-color: var(--blue);
    width: 16px;
    height: 16px;
}

.input-group { margin-bottom: 20px; }

.input-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
}

.input-group input, .input-full {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.input-group input:focus, .input-full:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

.input-sm {
    padding: 7px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 200px;
}

.input-sm:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }

textarea.input-full { resize: vertical; font-family: inherit; }
select.input-full { appearance: none; cursor: pointer; }

.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.file-list.collapsed { display: none; }

.file-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.file-entry-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.file-entry-thumb-video {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--green-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    flex-shrink: 0;
}

.file-entry-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-entry-size { color: var(--text-dim); }

.file-entry-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .2s, background .2s;
}

.file-entry-remove:hover { color: var(--danger); background: rgba(234,67,53,0.06); }

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--green));
    border-radius: 3px;
    transition: width .3s;
}

.progress-text { font-size: 13px; color: var(--text-dim); min-width: 36px; font-weight: 600; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform .1s, box-shadow .2s, background .2s;
    width: 100%;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}

.btn-primary:hover { background: #1565C0; box-shadow: 0 4px 16px rgba(26,115,232,0.3); }

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

.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

.btn-danger {
    background: rgba(234,67,53,0.06);
    color: var(--danger);
    border: 1px solid rgba(234,67,53,0.2);
}

.btn-danger:hover { background: rgba(234,67,53,0.12); }

.btn-sm { padding: 7px 16px; font-size: 12px; width: auto; }

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    padding: 7px 9px;
    display: inline-flex;
    align-items: center;
    transition: color .2s, border-color .2s, background .2s;
}

.btn-icon:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-glow); }

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(234,67,53,0.06);
    color: var(--danger);
    border: 1px solid rgba(234,67,53,0.15);
}

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-header svg { margin-bottom: 8px; }
.result-header h2 { margin: 0; }

.result-album { margin-bottom: 20px; }

.result-thumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.result-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.result-single { text-align: center; margin-bottom: 20px; }

.result-single-preview {
    margin-bottom: 14px;
}

.result-single-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.result-single-link {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}

.result-multi-header {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.copy-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.copy-actions .btn { width: auto; flex: 0; }

.copy-sep {
    color: var(--text-light);
    font-size: 14px;
    user-select: none;
}

.links-header { text-align: center; margin-bottom: 24px; }
.links-header svg { margin-bottom: 12px; }

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    align-items: center;
}

.link-preview {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.link-preview img { width: 100%; height: 100%; object-fit: cover; }

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}

.preview-placeholder.video { background: var(--green-glow); color: var(--green); }

.link-body { flex: 1; min-width: 0; }
.link-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-size { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.link-url-row { display: flex; gap: 6px; }

.link-url {
    flex: 1;
    padding: 7px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--blue);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.link-url:focus { border-color: var(--blue); }

.view-page {
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.view-media {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.view-img {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: block;
}

.view-video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    outline: none;
    box-shadow: var(--shadow-lg);
}

.view-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.view-name { font-weight: 600; }
.view-size { color: var(--text-dim); }

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

.view-actions a { text-decoration: none; }

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .2s, background .2s;
}

.password-toggle:hover {
    color: var(--text-dim);
    background: var(--bg-input);
}

.password-toggle .eye-off { display: none; }
.password-toggle.visible .eye-on { display: none; }
.password-toggle.visible .eye-off { display: block; }

.password-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

#banner-slot:empty { display: none; }
#promo-slot:empty { display: none; }

.promo-strip {
    text-align: center;
    padding: 7px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    line-height: 1.4;
}

.promo-strip a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s;
}

.promo-strip a:hover { color: var(--blue); }

.promo-strip span {
    display: inline-block;
    transition: opacity .3s, transform .3s;
}

.banner {
    padding: 4px 8px;
    text-align: center;
    font-size: 14px;
    background: var(--blue-glow);
    border-bottom: 1px solid var(--border);
    line-height: 0;
}

.banner img, .banner video { display: block; margin: 0 auto; }

.banner a { color: var(--blue); text-decoration: underline; }
.banner-fade { animation: fadeIn 1s ease-in; }
.banner-slide { animation: slideDown 0.5s ease-out; }
.banner-pulse { animation: pulse 2s infinite; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

.album-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.album-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.album-main-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: max-height .3s, border-radius .3s;
}

.album-main-img-full {
    max-height: 95vh;
    border-radius: 2px;
}

.album-strip {
    order: -1;
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    justify-content: center;
}

.album-strip::-webkit-scrollbar { height: 4px; }
.album-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.album-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity .2s, box-shadow .2s, transform .15s;
    box-shadow: var(--shadow);
}

.album-thumb:hover { opacity: 0.9; transform: scale(1.05); }
.album-thumb.active { opacity: 1; box-shadow: 0 0 0 3px var(--blue); }

.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-nav-inner {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.admin-logo {
    font-size: 20px;
    font-weight: 800;
    padding: 14px 24px 14px 0;
    margin-right: 8px;
    border-right: 1px solid var(--border);
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.admin-tabs {
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color .2s, background .2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; transition: opacity .2s; }
.nav-link:hover svg { opacity: 1; }

.nav-link:hover { color: var(--text); background: var(--bg-input); }
.nav-link.active { color: var(--blue); background: var(--blue-glow); border-bottom-color: var(--blue); }
.nav-link.active svg { opacity: 1; color: var(--blue); }

.admin-main {
    flex: 1;
    padding: 36px 24px;
    background: var(--bg);
    overflow-x: auto;
    min-width: 0;
}

.admin-content {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-main h1 { margin-bottom: 24px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 auto 32px;
    max-width: 800px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.admin-table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: var(--bg-input);
}

.admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: var(--blue-glow); }
.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table code {
    font-size: 12px;
    color: var(--blue);
    background: var(--blue-glow);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 4px 0;
    max-width: 800px;
    margin: 0 auto;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
    transition: background .15s;
}

.setting-row:hover { background: var(--blue-glow); }
.setting-row:last-child { border-bottom: none; }

.setting-info { flex: 1; min-width: 200px; }
.setting-key { font-size: 14px; font-weight: 600; margin-bottom: 4px; }

.setting-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-light);
    border-radius: 50%;
    transition: transform .2s, background .2s;
}

.toggle input:checked + .toggle-slider { background: var(--green-glow); border-color: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--green); }

.promo-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.promo-toolbar h2 { margin: 0; }

.promo-bulk-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-dim);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
    padding: 0;
}

.btn-icon:hover { color: var(--text); border-color: var(--text-dim); }
.btn-icon.btn-danger { border-color: transparent; }
.btn-icon.btn-danger:hover { color: var(--red); border-color: var(--red); background: rgba(255,59,48,0.08); }
.btn-icon.btn-primary { border-color: transparent; }
.btn-icon.btn-primary:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-glow); }
.btn-icon.btn-secondary:hover { color: var(--text); border-color: var(--text-dim); }

.banner-form { margin: 0 auto 32px; max-width: 700px; }
.banner-form h3 { margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 4px; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.banner-item { margin-bottom: 16px; }

.banner-preview {
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-dim);
    word-break: break-all;
}

.banner-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.banner-img-preview { min-height: 0; }
.banner-html-preview { font-size: 13px; color: var(--text-dim); word-break: break-all; }

.banner-live-preview, .promo-live-preview {
    margin: 16px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    padding-bottom: 12px;
}

.preview-label {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.preview-container {
    min-height: 60px;
}

.preview-container .banner {
    margin: 0;
}

.promo-preview-strip .promo-strip {
    border-bottom: none;
}

.edit-form-inline {
    margin-top: 16px;
    padding: 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.edit-form-inline h3 {
    margin-bottom: 16px;
    font-size: 15px;
}

.display-mode-card {
    margin: 0 auto 24px;
    max-width: 700px;
}

.display-mode-card h3 {
    margin-bottom: 12px;
}

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mode-option {
    display: block;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.mode-option:hover {
    border-color: var(--blue);
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-active {
    border-color: var(--blue);
    background: var(--blue-glow);
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.mode-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}

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

.banners-section {
    max-width: 700px;
    margin: 0 auto;
}

.color-input {
    height: 42px;
    padding: 4px;
}

.color-input-sm {
    height: 36px;
    padding: 3px;
}

.checkbox-label-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
}

.checkbox-input-accent {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
}

.inline-form {
    display: inline;
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 14px;
}

.edit-cell {
    padding: 16px;
}

.th-narrow {
    width: 36px;
}

.action-cell {
    white-space: nowrap;
}

.btn-save-mode {
    margin-top: 12px;
}

.replay-btn {
    margin: 8px 14px 0;
}

.preview-media {
    max-width: 100%;
    max-height: 200px;
}

.custom-date-fields {
    gap: 6px;
    align-items: center;
}

.label-hint {
    color: var(--text-dim);
    font-weight: 400;
}

.url-display {
    font-size: 12px;
    color: var(--blue);
    word-break: break-all;
}

.style-info {
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-dim);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.files-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.files-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.file-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-input);
}

.file-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-dim);
}

.file-name-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}
.file-name-link:hover { color: var(--blue); }

.file-id {
    margin-top: 2px;
}

.file-id code {
    font-size: 11px;
    color: var(--text-dim);
    background: var(--bg-input);
    padding: 1px 6px;
    border-radius: 4px;
}

.date-cell { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.checkbox-wrap { display: flex; align-items: center; cursor: pointer; }
.checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}

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

.page-btn.page-current {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
    cursor: default;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 34px;
    font-size: 13px;
    color: var(--text-dim);
}

.page-goto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.goto-input {
    width: 60px;
    text-align: center;
}

.btn-ghost {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.view-zoom-wrap {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    touch-action: none;
    max-width: 100%;
}

.view-zoom-wrap.zoomed { cursor: grab; }
.view-zoom-wrap.zoomed.panning { cursor: grabbing; }

.view-zoom-wrap .view-img {
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    z-index: 10;
}

.zoom-hint.visible { opacity: 1; }

.banner video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-center { padding: 16px; }
    .card { padding: 24px; }
    .upload-zone { padding: 32px 16px; }
    .logo-section { margin-bottom: 24px; }
    h1 { font-size: 24px; }
    .format-row { font-size: 12px; }
    .admin-layout { flex-direction: column; }
    .admin-nav { padding: 0; position: static; }
    .admin-nav-inner { overflow-x: auto; }
    .admin-logo { padding: 12px 16px; margin: 0; border: none; white-space: nowrap; }
    .nav-link { padding: 12px 16px; white-space: nowrap; border-right: none; margin: 0; }
    .nav-link svg { display: none; }
    .nav-link.active { border-right: none; border-bottom: 3px solid var(--blue); }
    .admin-main { padding: 20px; }
    .admin-content { max-width: 100%; }
    .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
    .setting-row { flex-direction: column; align-items: flex-start; }
    .setting-controls { width: 100%; flex-wrap: wrap; }
    .settings-card { padding: 4px 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .files-toolbar { flex-direction: column; align-items: flex-start; }
    .files-search-form { width: 100%; }
    .view-media { padding: 10px; }
    .album-page { min-height: auto; }
    .album-strip { padding: 8px 12px; gap: 6px; }
    .album-main { flex: none; padding: 8px; align-items: flex-start; }
    .album-main-img { max-height: none; }
    .album-thumb { width: 48px; height: 48px; }
    .link-item { gap: 10px; padding: 10px; }
    .link-preview { width: 44px; height: 44px; }
    .link-name { font-size: 13px; }
    .link-url { font-size: 11px; padding: 6px 8px; }
    .result-single-link { gap: 6px; }
    .result-single-link .btn-icon { flex-shrink: 0; }
    .copy-actions { gap: 6px; }
    .copy-actions .btn { padding: 8px 14px; font-size: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 24px; }
    .stats-grid { gap: 10px; }
    .btn { padding: 10px 20px; font-size: 13px; }
}

@media (max-width: 480px) {
    .page-center { padding: 8px; align-items: flex-start; padding-top: 24px; }
    .card { padding: 20px 16px; border-radius: 12px; }
    .upload-zone { padding: 28px 12px; }
    h1 { font-size: 22px; }
    .format-info { gap: 6px; font-size: 12px; margin-bottom: 14px; }
    .format-row { gap: 6px; flex-wrap: wrap; }
    .album-toggle { padding: 10px 12px; gap: 10px; }
    .radio-option { font-size: 13px; }
    .file-entry { padding: 6px 10px; gap: 8px; }
    .file-entry-thumb, .file-entry-thumb-video { width: 30px; height: 30px; }
    .file-entry-name { font-size: 12px; }
    .file-entry-size { font-size: 11px; }
    .result-single-preview img { max-width: 160px; max-height: 160px; }
    .result-single-link { max-width: 100%; }
    .link-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .link-preview { width: 100%; height: 120px; border-radius: 8px; }
    .link-body { width: 100%; }
    .link-url-row { gap: 4px; }
    .link-url-row .btn-icon { flex-shrink: 0; padding: 6px 8px; }
    .links-card { max-width: 100%; }
    .upload-card { max-width: 100%; }
    .copy-actions .btn { flex: 1; }
    .view-media { padding: 4px; }
    .view-img { border-radius: 4px; }
    .banner { padding: 8px 12px; font-size: 13px; }
}
