* {
    box-sizing: border-box;
}

:root {
    --bg: #0d0b0a;
    --panel: #171211;
    --panel2: #1c1715;
    --border: #2b2422;
    --orange: #e44a2b;
    --orange-hover: #d43e1e;
    --text: #e9e5e4;
    --muted: #8a8380;
    --dim: #5c5552;
    --green: #22a55a;
    --blue: #4a7dd6;
    --radius: 14px;
    --radius-sm: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(1100px 550px at 85% 0%, rgba(228, 74, 43, 0.1), transparent 60%), var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
}

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

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

.collections-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 24px 80px;
    font-size: 14px;
}

.kicker,
.section-kicker {
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2.5px;
    margin-bottom: 8px;
}

.big-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.intro {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 820px;
    margin-bottom: 34px;
}

/* toolbar */
.collections-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
}

.search-input i { color: var(--dim); font-size: 15px; }

.search-input input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.search-input input::placeholder { color: var(--dim); }

.category-select {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    min-width: 220px;
}

.category-select i { color: var(--muted); font-size: 15px; }

.cat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--dim);
    letter-spacing: 1.3px;
    white-space: nowrap;
}

.category-select select {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.category-select select option {
    background: #1c1715;
    color: #fff;
}

/* section header */
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.section-count {
    color: var(--muted);
    font-size: 13.5px;
    margin-bottom: 24px;
}

/* grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.collection-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.collection-card:hover {
    border-color: #3a322e;
    transform: translateY(-2px);
    background: #1c1715;
}

.col-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.col-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(228, 74, 43, 0.12);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.col-icon.camera {
    background: rgba(74, 125, 214, 0.14);
    color: var(--blue);
}

.col-title {
    min-width: 0;
    flex: 1;
    padding-top: 2px;
}

.col-cat {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 4px;
}

.col-cat.social { color: var(--orange); }
.col-cat.candid { color: var(--blue); }
.col-cat.snapwins { color: var(--muted); }

.col-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-lock {
    color: var(--dim);
    font-size: 15px;
    padding-top: 6px;
}

.col-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #241d1a;
    font-size: 12.5px;
    color: var(--muted);
}

.col-meta span { display: flex; align-items: center; gap: 6px; }
.col-meta i { color: var(--dim); font-size: 12px; }

.col-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
}

.col-date {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12.5px;
}

.col-date i { color: var(--dim); font-size: 12px; }

.col-points {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-align: right;
}

.col-points small { font-size: 11px; color: var(--dim); font-weight: 600; }

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 48px 20px;
    font-size: 14px;
}

@media (max-width: 1000px) {
    .collections-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .collections-grid { grid-template-columns: 1fr; }
    .collections-toolbar { flex-direction: column; align-items: stretch; }
    .big-title { font-size: 34px; }
}

/* ---------- Light theme ---------- */
html[data-theme="light"] {
    --bg: #f2efec;
    --panel: #ffffff;
    --panel2: #f2ece8;
    --border: #e3dcd7;
    --text: #221d1a;
    --muted: #6f6761;
    --dim: #9b938c;
}

html[data-theme="light"] body {
    background: radial-gradient(1100px 550px at 85% 0%, rgba(228, 74, 43, 0.05), transparent 60%), var(--bg);
}

html[data-theme="light"] .big-title,
html[data-theme="light"] .section-title { color: #1c1714; }
html[data-theme="light"] .search-input input,
html[data-theme="light"] .category-select select { color: #221d1a; }
html[data-theme="light"] .collection-card:hover { background: #f7f3f0; border-color: #d8cfc9; }
html[data-theme="light"] .col-name { color: #221d1a; }
html[data-theme="light"] .col-meta { border-bottom: 1px solid #ece5df; }
html[data-theme="light"] .col-points { color: #221d1a; }
html[data-theme="light"] .category-select select option { background: #ffffff; color: #221d1a; }
