:root {
    color-scheme: dark;
    --page: #0b0e18;
    --panel: #121726;
    --panel-raised: #171e30;
    --line: rgba(191, 204, 235, 0.12);
    --text: #f3f5fb;
    --muted: #9ca8bf;
    --purple: #9674ff;
    --purple-bright: #ad93ff;
    --cyan: #61d6dc;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse at 84% 4%, rgba(89, 77, 181, 0.18), transparent 32rem),
        radial-gradient(ellipse at 4% 36%, rgba(36, 131, 155, 0.1), transparent 30rem),
        var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-nav {
    position: sticky;
    z-index: 10;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 14, 24, 0.84);
    backdrop-filter: blur(18px);
}

.nav-inner {
    width: min(1200px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -0.03em; }
.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(173, 147, 255, 0.45);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(150, 116, 255, 0.3), rgba(97, 214, 220, 0.12));
    color: #d6caff;
    font-size: 0.77rem;
    letter-spacing: 0.02em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-size: 0.97rem; }
.brand-name span { margin-top: 4px; color: var(--muted); font-size: 0.71rem; font-weight: 550; letter-spacing: 0.03em; }
.nav-links { display: flex; align-items: center; gap: 7px; }
.nav-links > a {
    padding: 9px 13px;
    border-radius: 10px;
    color: #bbc4d6;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}
.nav-links > a:hover { background: rgba(255, 255, 255, 0.06); color: white; }
.nav-links > .nav-admin { border: 1px solid rgba(173, 147, 255, 0.28); color: #d9ceff; }
.nav-links > .nav-admin:hover { background: rgba(150, 116, 255, 0.14); }

.container { width: min(1200px, calc(100% - 40px)); max-width: none; padding: 0; }
.home-page { padding-bottom: 76px; }
.hero {
    min-height: 540px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 50px;
    padding-top: 66px;
    padding-bottom: 64px;
}
.hero-copy { max-width: 620px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #b9a7ff;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgba(97, 214, 220, 0.8); }
.hero h1 {
    margin: 22px 0 18px;
    color: #f8f8ff;
    font-size: clamp(3.1rem, 6vw, 5.2rem);
    font-weight: 780;
    letter-spacing: -0.075em;
    line-height: 0.99;
}
.hero h1 span { color: #a88cff; }
.hero-copy > p, .page-heading > p {
    max-width: 530px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .nav-links a:focus-visible, .text-link:focus-visible { outline: 3px solid rgba(97, 214, 220, 0.75); outline-offset: 3px; }
.button-primary { background: linear-gradient(135deg, #9d7cff, #7553e6); box-shadow: 0 10px 28px rgba(121, 88, 227, 0.25); color: white; }
.button-primary:hover { background: linear-gradient(135deg, #ae94ff, #8564f2); color: white; }
.button-quiet { border-color: var(--line); background: rgba(255, 255, 255, 0.035); color: #d8deeb; }
.button-quiet:hover, .button-soft:hover { border-color: rgba(173, 147, 255, 0.36); background: rgba(150, 116, 255, 0.1); color: white; }
.button-picker { border-color: rgba(173, 147, 255, 0.3); background: rgba(150, 116, 255, 0.11); color: #e2d9ff; }
.button-soft { min-height: 36px; padding: 8px 11px; border-color: var(--line); background: rgba(255, 255, 255, 0.035); color: #d7deec; font-size: 0.78rem; }
.button-danger { min-height: 36px; padding: 8px 12px; background: rgba(232, 82, 112, 0.12); border-color: rgba(232, 82, 112, 0.25); color: #ffabb9; font-size: 0.8rem; }
.button-danger:hover { background: rgba(232, 82, 112, 0.22); color: white; }
.button-discord { width: 100%; background: #5865f2; color: white; }
.button-discord:hover { background: #6b76ff; color: white; }
.button-small { min-height: 35px; }
.hero-note { margin-top: 24px; color: #a3aec3; font-size: 0.82rem; }
.hero-note span { margin-right: 6px; color: var(--cyan); }

.hero-art { position: relative; display: grid; min-height: 360px; place-items: center; }
.art-glow { position: absolute; width: 82%; height: 75%; border-radius: 50%; background: rgba(120, 98, 242, 0.22); filter: blur(68px); }
.art-window {
    position: relative;
    width: min(100%, 440px);
    padding: 12px;
    border: 1px solid rgba(194, 203, 232, 0.2);
    border-radius: 21px;
    background: linear-gradient(145deg, rgba(30, 37, 58, 0.96), rgba(15, 20, 34, 0.97));
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42), 0 0 0 8px rgba(255, 255, 255, 0.018);
    transform: rotate(2deg);
}
.art-window-bar { display: flex; align-items: center; gap: 5px; padding: 5px 7px 13px; color: #8390aa; font-size: 0.65rem; }
.art-window-bar i { width: 7px; height: 7px; border-radius: 50%; background: #ed6b82; }
.art-window-bar i:nth-child(2) { background: #e9bb60; }
.art-window-bar i:nth-child(3) { background: #6ecb9b; }
.art-window-bar span { margin-left: 8px; }
.art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.art-tile { position: relative; height: 116px; overflow: hidden; border-radius: 12px; }
.art-tile::after { position: absolute; inset: 0; content: ""; background: linear-gradient(145deg, transparent 30%, rgba(10, 13, 22, 0.42)); }
.art-tile span { position: absolute; z-index: 1; right: 10px; bottom: 7px; color: rgba(255, 255, 255, 0.7); font-size: 0.65rem; }
.art-tile-one { background: radial-gradient(circle at 24% 28%, #b7a0ff, transparent 34%), linear-gradient(130deg, #36426e, #7755ac 58%, #eb9eaf); }
.art-tile-two { background: radial-gradient(circle at 70% 25%, #f3d08a, transparent 30%), linear-gradient(130deg, #334968, #297f8a 55%, #b0cfb2); }
.art-tile-three { background: radial-gradient(circle at 55% 25%, #ffb7a3, transparent 34%), linear-gradient(130deg, #a75679, #4e4279 58%, #1d324d); }
.art-tile-four { background: radial-gradient(circle at 35% 30%, #a8e5cf, transparent 31%), linear-gradient(130deg, #346b71, #28486d 56%, #927dc5); }
.art-link { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 11px; border: 1px solid rgba(190, 202, 230, 0.1); border-radius: 11px; background: rgba(7, 11, 20, 0.48); color: #9aa6bd; font-size: 0.64rem; }
.art-link .link-icon { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; background: rgba(97, 214, 220, 0.13); color: var(--cyan); font-size: 0.85rem; }
.art-link b { margin-left: auto; color: #d8ceff; font-size: 0.62rem; }
.floating-badge { position: absolute; right: -5px; bottom: 25px; padding: 10px 14px; border: 1px solid rgba(196, 208, 236, 0.18); border-radius: 12px; background: rgba(22, 29, 45, 0.9); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3); color: #e5e9f3; font-size: 0.78rem; font-weight: 650; }
.floating-badge span { margin-right: 6px; color: #f2c777; }

.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { min-height: 160px; padding: 23px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(24, 31, 48, 0.85), rgba(15, 19, 31, 0.74)); }
.feature-icon { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 16px; border-radius: 11px; background: rgba(150, 116, 255, 0.13); color: #c7b6ff; font-size: 1.05rem; }
.feature-card h2 { margin: 0 0 6px; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }

.page-wrap { min-height: calc(100vh - 76px); padding-top: 58px; padding-bottom: 80px; }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { margin: 9px 0 8px; font-size: clamp(2.3rem, 4vw, 3.4rem); font-weight: 760; letter-spacing: -0.065em; }
.page-heading > p { font-size: 0.98rem; }
.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.upload-panel { margin-bottom: 53px; padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, rgba(21, 27, 43, 0.92), rgba(16, 21, 34, 0.92)); }
.upload-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.upload-toolbar input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.upload-toolbar label:focus-within { outline: 3px solid rgba(97, 214, 220, 0.7); outline-offset: 3px; }
.upload-hint { margin: 12px 0 0; color: var(--muted); font-size: 0.81rem; }
.visibility-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 18px 0 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; }
.visibility-options legend { float: left; width: auto; margin: 0 12px 0 0; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.visibility-options label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 0.84rem; }
.visibility-options input { accent-color: var(--purple); }
.visibility-badge { display: inline-block; margin: -4px 0 12px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: capitalize; }
.visibility-public { border-color: rgba(97, 214, 220, 0.28); background: rgba(97, 214, 220, 0.08); color: #a2e9e9; }
.visibility-private { border-color: rgba(175, 188, 219, 0.17); background: rgba(175, 188, 219, 0.06); color: #bdc5d6; }
.visibility-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.visibility-control label { color: var(--muted); font-size: 0.75rem; }
.visibility-control select, .visibility-control input[type="text"] { min-width: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-raised); color: var(--text); }
.form-label { display: block; color: #c5cce0; font-size: 0.82rem; font-weight: 650; }
.form-control { display: block; width: 100%; min-height: 46px; padding: 10px 42px 10px 13px; border: 1px solid rgba(163, 176, 211, 0.25); border-radius: 12px; outline: none; background-color: #101626; color: var(--text); font: inherit; font-size: 0.92rem; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
.form-control::placeholder { color: #77829c; }
.form-control:focus { border-color: rgba(173, 147, 255, 0.8); background-color: #131b2e; box-shadow: 0 0 0 3px rgba(150, 116, 255, 0.16); }
select.form-control { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8a7ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.upload-field { display: grid; gap: 8px; width: min(100%, 420px); margin-top: 18px; }
.visibility-control .form-control { width: auto; min-width: 150px; }
.create-folder-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 8px 12px; max-width: 650px; }
.create-folder-form .form-label { grid-column: 1 / -1; }
.create-folder-form .form-control { padding-right: 13px; }
.folder-list { display: grid; gap: 12px; margin-top: 20px; }
.folder-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(18, 23, 38, 0.72); }
.folder-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.folder-row-main { flex: 1 1 190px; }
.folder-row-tools { flex: 2 1 440px; justify-content: flex-end; }
.folder-id-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9, 13, 23, 0.4); }
.folder-id-label { color: var(--muted); font-size: 0.72rem; font-weight: 650; }
.folder-id-control code, .admin-folder-id { overflow-wrap: anywhere; color: #cfc3ff; font-size: 0.74rem; }
.folder-id-control code { max-width: 245px; }
.folder-row-tools .visibility-control { margin: 0; }
.folder-row .visibility-badge { margin: 0; }
.create-folder-form { margin-top: 14px; }
.public-user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.public-user-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(18, 23, 38, 0.88); transition: border-color 160ms ease, transform 160ms ease; }
.public-user-card:hover { transform: translateY(-2px); border-color: rgba(173, 147, 255, 0.38); }
.public-user-card > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.public-user-card strong, .public-user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-user-card strong { font-size: 0.88rem; }
.public-user-card small { color: var(--muted); font-size: 0.74rem; }
.public-folder-arrow { margin-left: auto; color: var(--cyan); font-size: 1.1rem; }
.user-avatar-placeholder { display: grid; place-items: center; background: rgba(150, 116, 255, 0.15); color: #c7b6ff; font-size: 1rem; }
.public-profile-heading > .text-link { display: inline-block; margin-bottom: 24px; }
.public-profile { display: flex; align-items: center; gap: 17px; }
.public-profile .user-avatar { width: 64px; height: 64px; }
.public-profile h1 { margin: 2px 0; }
.public-profile p { margin: 0; color: var(--muted); }
.upload-preview-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.upload-preview-list:empty { display: none; }
.upload-preview { width: 132px; color: #e9ecf5; }
.upload-preview img { display: block; width: 132px; height: 98px; border: 1px solid var(--line); border-radius: 10px; background: #0b0e18; object-fit: cover; }
.upload-preview-name { display: block; overflow: hidden; margin-top: 6px; color: var(--muted); font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.content-section { margin-top: 25px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.section-heading h2 { margin: 5px 0 0; font-size: 1.6rem; font-weight: 720; letter-spacing: -0.04em; }
.text-link { color: #c2b2ff; font-size: 0.82rem; font-weight: 650; }
.text-link:hover { color: white; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 17px; }
.image-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: rgba(18, 23, 38, 0.88); transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease; }
.image-card:hover { transform: translateY(-3px); border-color: rgba(173, 147, 255, 0.3); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22); }
.image-frame { display: block; overflow: hidden; height: 185px; background: #0e1320; }
.video-frame { display: grid; height: 185px; overflow: hidden; place-items: center; background: #080b12; }
.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-upload-panel .section-heading { margin-bottom: 14px; }
.video-card .image-card-body h3 { overflow-wrap: anywhere; }
.image-thumbnail { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.image-card:hover .image-thumbnail { transform: scale(1.035); }
.image-card-body { padding: 14px; }
.image-card-body h2, .image-card-body h3 { overflow: hidden; margin: 0 0 13px; color: #edf0f8; font-size: 0.9rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.image-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.empty-state { grid-column: 1 / -1; padding: 48px 20px; border: 1px dashed rgba(175, 188, 219, 0.2); border-radius: 18px; background: rgba(18, 23, 38, 0.45); text-align: center; }
.empty-icon { display: block; margin-bottom: 11px; color: #aa94ff; font-size: 1.65rem; }
.empty-state h2, .empty-state h3 { margin: 0 0 5px; font-size: 1.1rem; font-weight: 700; }
.empty-state p { margin: 0 0 17px; color: var(--muted); font-size: 0.88rem; }
.admin-section { margin-top: 15px; }
.admin-image-card form { margin: 0; }
.admin-page-heading { align-items: center; }
.admin-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.admin-heading-actions form { margin: 0; }
.admin-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.admin-stat { display: grid; gap: 8px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(24, 31, 48, 0.92), rgba(15, 20, 34, 0.82)); }
.admin-stat span { color: var(--muted); font-size: 0.78rem; }
.admin-stat strong { font-size: 1.8rem; line-height: 1; letter-spacing: -0.04em; }
.admin-toolbar { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(150px, 210px) minmax(150px, 210px) auto; align-items: end; gap: 12px; margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(18, 23, 38, 0.78); }
.admin-search-field, .admin-filter-field { display: grid; gap: 7px; }
.admin-reset { min-height: 46px; }
.admin-jump-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.admin-jump-links a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(18, 23, 38, 0.68); color: #cfc3ff; font-size: 0.8rem; font-weight: 650; }
.admin-folder-list, .admin-user-list { display: grid; gap: 10px; }
.admin-folder-row, .admin-user-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px 20px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 23, 38, 0.78); }
.admin-item-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-item-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: rgba(150, 116, 255, 0.13); color: #c7b6ff; font-size: 1.15rem; }
.admin-item-identity > div, .admin-user-identity { display: grid; min-width: 0; gap: 4px; }
.admin-item-identity strong, .admin-user-identity strong { overflow-wrap: anywhere; font-size: 0.9rem; }
.admin-item-identity span, .admin-user-identity span { color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.admin-item-identity .admin-folder-id { color: #cfc3ff; font-size: 0.7rem; }
.admin-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-item-actions .visibility-badge { margin: 0; }
.admin-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-inline-form .form-control { width: auto; min-width: 125px; min-height: 38px; padding: 7px 34px 7px 10px; border-radius: 9px; font-size: 0.82rem; }
.admin-file-meta { margin: -6px 0 10px; color: var(--muted); font-size: 0.75rem; }
.admin-image-card .admin-inline-form { margin: 10px 0; }
.admin-user-row { justify-content: flex-start; }
.admin-user-identity { flex: 1 1 220px; }
.admin-user-counts { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; }
.admin-user-counts span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.72rem; }
.admin-filter-empty { grid-column: 1 / -1; padding: 20px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; }
.admin-page [hidden] { display: none !important; }

.auth-wrap { display: grid; place-items: start center; padding-top: 92px; }
.auth-panel { width: min(100%, 510px); padding: clamp(24px, 5vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(23, 30, 48, 0.98), rgba(16, 21, 34, 0.98)); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25); }
.auth-panel h1 { margin: 8px 0 10px; font-size: 2rem; font-weight: 740; letter-spacing: -0.05em; }
.auth-intro, .auth-footnote { color: var(--muted); font-size: 0.88rem; }
.auth-intro { margin-bottom: 24px; }
.auth-footnote { margin: 14px 0 0; font-size: 0.77rem; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-actions form { margin: 0; }
.notice { padding: 13px 15px; border: 1px solid rgba(97, 214, 220, 0.2); border-radius: 11px; background: rgba(97, 214, 220, 0.07); color: #c4f3f2; font-size: 0.85rem; }
.notice-error { border-color: rgba(237, 111, 136, 0.28); background: rgba(237, 111, 136, 0.08); color: #ffbdc9; }
.signed-in-card { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.035); }
.signed-in-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.signed-in-card strong { color: var(--text); }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.key-created-panel { margin-bottom: 22px; padding: 22px; border: 1px solid rgba(97, 214, 220, 0.28); border-radius: 16px; background: rgba(97, 214, 220, 0.07); }
.key-created-panel h2, .api-key-create-panel h2, .api-docs-panel h2 { margin: 0 0 8px; font-size: 1.2rem; }
.key-created-panel > p { color: var(--muted); font-size: 0.86rem; }
.key-created-panel pre { overflow-x: auto; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #090c14; color: #c6f4ee; white-space: pre-wrap; overflow-wrap: anywhere; }
.api-key-create-panel { display: grid; gap: 12px; }
.api-key-create-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.api-key-create-form label { width: 100%; color: var(--muted); font-size: 0.82rem; }
.api-key-create-form input { flex: 1 1 240px; min-height: 43px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d1220; color: var(--text); }
.api-key-list { display: grid; gap: 10px; }
.api-key-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(18, 23, 38, 0.8); }
.api-key-row h3 { margin: 0 0 5px; font-size: 0.92rem; }
.api-key-row code, .api-docs-panel code { color: #b8a7ff; overflow-wrap: anywhere; }
.api-key-row p { margin: 5px 0 0; }
.api-key-row form { margin: 0; }
.api-docs-panel { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(18, 23, 38, 0.72); }
.api-docs-panel p { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }

/* Keep the admin dashboard legible even when upstream framework rules change. */
.admin-page { width: min(1440px, calc(100% - 48px)); padding-top: 48px; }
.admin-page .admin-page-heading { margin-bottom: 30px; }
.admin-page .admin-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.admin-page .admin-stat { min-height: 105px; align-content: space-between; }
.admin-page .admin-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(160px, 220px) auto; }
.admin-page .admin-toolbar label, .admin-page .admin-inline-form select { color: var(--text); }
.admin-page .admin-toolbar .form-control, .admin-page .admin-inline-form .form-control {
    border: 1px solid rgba(163, 176, 211, 0.25);
    background-color: #101626;
    color: var(--text);
}
.admin-page .admin-section { margin-top: 30px; }
.admin-page .admin-section .section-heading { margin-bottom: 16px; }
.admin-page .admin-folder-row, .admin-page .admin-user-row { min-height: 76px; }
.admin-page .admin-image-card { min-width: 0; }
.admin-page .admin-item-actions, .admin-page .admin-inline-form { gap: 10px; }
@media (max-width: 900px) {
    .admin-page .admin-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-page .admin-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .admin-page { width: calc(100% - 28px); }
    .admin-page .admin-overview, .admin-page .admin-toolbar { grid-template-columns: 1fr; }
    .folder-row-tools { justify-content: flex-start; }
    .folder-id-control { width: 100%; }
    .folder-id-control code { flex: 1 1 140px; max-width: 100%; }
}

@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 54px; }
    .hero-copy { max-width: 680px; }
    .hero-art { min-height: 310px; }
    .feature-row { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
}

@media (max-width: 600px) {
    .nav-inner { width: calc(100% - 28px); min-height: 68px; flex-wrap: wrap; gap: 7px; padding: 11px 0; }
    .brand { gap: 8px; }
    .brand-mark { width: 34px; height: 34px; }
    .nav-links { width: 100%; gap: 2px; overflow-x: auto; }
    .nav-links > a { padding: 8px 9px; font-size: 0.77rem; white-space: nowrap; }
    .container { width: calc(100% - 28px); }
    .hero { min-height: auto; padding-top: 45px; padding-bottom: 35px; }
    .hero h1 { font-size: clamp(2.85rem, 13vw, 4rem); }
    .hero-copy > p { font-size: 0.96rem; }
    .hero-art { min-height: 270px; }
    .art-window { width: 95%; }
    .art-tile { height: 91px; }
    .floating-badge { right: 0; bottom: 10px; }
    .page-wrap { min-height: calc(100vh - 120px); padding-top: 38px; }
    .page-heading-row { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 2.6rem; }
    .upload-panel { padding: 16px; }
    .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-toolbar { grid-template-columns: 1fr; }
    .admin-toolbar .form-control, .admin-reset { width: 100%; }
    .admin-heading-actions { width: 100%; }
    .admin-heading-actions .button { flex: 1; }
    .create-folder-form { grid-template-columns: 1fr; }
    .create-folder-form .form-label { grid-column: auto; }
    .upload-toolbar { align-items: stretch; flex-direction: column; }
    .upload-toolbar .button { width: 100%; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 11px; }
    .image-frame { height: 145px; }
    .video-frame { height: 145px; }
    .image-card-body { padding: 11px; }
    .image-actions { align-items: flex-start; flex-direction: column; }
    .visibility-control { align-items: stretch; flex-direction: column; }
    .section-heading { align-items: flex-start; }
    .section-heading h2 { font-size: 1.35rem; }
    .auth-wrap { padding-top: 48px; }
    .api-key-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Sidebar navigation for the website control center. */
.admin-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); width: 100%; min-height: calc(100vh - 76px); margin: 0; padding: 0; }
.admin-sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; align-self: start; height: calc(100vh - 76px); min-height: 520px; padding: 22px 14px 16px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.08); background: rgba(14, 16, 23, .97); }
.admin-sidebar-back { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; color: #b5b6c1; font-size: .86rem; font-weight: 600; }
.admin-sidebar-back:hover { color: #fff; }
.admin-sidebar-app { display: flex; align-items: center; gap: 11px; margin: 13px 8px 22px; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar-mark { display: grid; width: 35px; height: 35px; place-items: center; flex: 0 0 auto; border: 1px solid rgba(173,147,255,.38); border-radius: 11px; background: rgba(150,116,255,.15); color: #d9ceff; font-size: .72rem; font-weight: 800; }
.admin-sidebar-app > div { display: grid; gap: 2px; }
.admin-sidebar-app strong { color: #f4f4f8; font-size: .88rem; }
.admin-sidebar-app span:not(.admin-sidebar-mark) { color: #8e909d; font-size: .73rem; }
.admin-side-nav { display: grid; gap: 3px; }
.admin-nav-group-title { display: flex; align-items: center; gap: 9px; margin: 12px 8px 4px; color: #a2a3ae; font-size: .76rem; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }
.admin-side-link { display: flex; min-height: 39px; align-items: center; gap: 11px; padding: 7px 11px; border-radius: 9px; color: #b3b4bd; font-size: .85rem; font-weight: 550; transition: color 140ms ease, background 140ms ease; }
.admin-side-link:hover { background: rgba(255,255,255,.055); color: #f7f7fb; }
.admin-side-link.is-active { background: #30313a; color: #fff; font-weight: 650; }
.admin-nav-icon { display: grid; width: 18px; place-items: center; color: #9c9eaa; font-size: .95rem; }
.admin-side-link.is-active .admin-nav-icon { color: #d5c8ff; }
.admin-nav-count { margin-left: auto; color: #858793; font-size: .72rem; font-variant-numeric: tabular-nums; }
.admin-sidebar-account { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 13px 7px 0; border-top: 1px solid rgba(255,255,255,.08); }
.admin-account-copy { display: grid; min-width: 0; gap: 3px; }
.admin-account-copy span { color: #858793; font-size: .68rem; }
.admin-account-copy strong { overflow: hidden; color: #e7e7ec; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-sidebar-account form { margin: 0; }
.admin-side-signout { padding: 6px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: transparent; color: #c1c2cb; font-size: .72rem; }
.admin-side-signout:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-layout > .admin-page { width: 100%; min-width: 0; padding: 40px clamp(24px, 4vw, 58px) 80px; }
.admin-page > .admin-page-heading { margin-bottom: 27px; }
.admin-page > .admin-overview, .admin-page > .admin-toolbar, .admin-page > .admin-section { scroll-margin-top: 100px; }

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 215px minmax(0, 1fr); }
    .admin-layout > .admin-page { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 680px) {
    .admin-layout { display: block; }
    .admin-sidebar { position: relative; top: auto; height: auto; min-height: 0; padding: 10px 14px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .admin-sidebar-back, .admin-sidebar-app, .admin-sidebar-account, .admin-nav-group-title { display: none; }
    .admin-side-nav { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
    .admin-side-link { min-height: 37px; flex: 0 0 auto; gap: 7px; padding: 7px 10px; font-size: .78rem; white-space: nowrap; }
    .admin-nav-count { margin-left: 2px; }
    .admin-layout > .admin-page { padding: 29px 16px 60px; }
}
