* { box-sizing: border-box; }
body {
    margin: 0;
    display: flex;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

.sidebar {
    width: 240px;
    background: #111827;
    padding: 24px 16px;
    border-right: 1px solid rgba(255,255,255,.06);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.nav {
    display: block;
    text-decoration: none;
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
}

.nav:hover, .nav.active {
    background: rgba(59,130,246,.15);
    color: #fff;
}

.nav.danger:hover {
    background: rgba(239,68,68,.12);
}

.main {
    flex: 1;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.topbar h2 {
    margin: 0 0 6px;
}

.topbar span {
    color: #94a3b8;
    font-size: 14px;
}

.actions button, .mini, .setting-card button {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: #93c5fd;
    word-break: break-all;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.card {
    background: linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.98));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(0,0,0,.22);
}

.icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-all;
}

.meta {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 6px;
}

.ops {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.mini {
    padding: 8px 10px;
    font-size: 12px;
    background: #334155;
}

.mini.danger {
    background: #7f1d1d;
}

.empty {
    padding: 26px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    color: #94a3b8;
}

.image-card .thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 12px;
    display: block;
}

.dropzone {
    margin-bottom: 18px;
    padding: 18px;
    border: 2px dashed rgba(148,163,184,.45);
    border-radius: 18px;
    color: #cbd5e1;
    background: rgba(255,255,255,.03);
    transition: .2s ease;
}

.dropzone.dragover {
    border-color: #60a5fa;
    background: rgba(59,130,246,.08);
}

.settings-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.setting-card {
    background: linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.98));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 22px;
    padding: 20px;
}

.setting-card h3 {
    margin-top: 0;
}

.setting-card pre {
    white-space: pre-wrap;
    word-break: break-word;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
}

.form-item {
    margin-bottom: 14px;
}

.form-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #cbd5e1;
}

.form-item input,
.form-item select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: #0f172a;
    color: #fff;
}

.form-item.checkbox label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-list {
    margin-top: 22px;
    display: grid;
    gap: 16px;
}

.share-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    word-break: break-all;
}

.share-card a {
    color: #93c5fd;
}

.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 14px;
    color: white;
    background: #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    opacity: 0;
    transform: translateY(-8px);
    transition: .2s ease;
}

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

.toast-success { background: #166534; }
.toast-error { background: #991b1b; }
.toast-info { background: #1d4ed8; }

.share-page {
    display: block;
}

.share-main {
    max-width: 1280px;
    margin: 0 auto;
}

code {
    display: inline-block;
    background: rgba(255,255,255,.06);
    padding: 2px 6px;
    border-radius: 8px;
}

@media (max-width: 900px) {
    body { flex-direction: column; }
    .sidebar {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
    }
    .logo { margin: 0 12px 0 0; white-space: nowrap; }
    .nav { white-space: nowrap; margin: 0; }
}
