* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #0d0f12;
    color: #e9edf2;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 22px 32px;
    background: rgba(13, 15, 18, 0.94);
    border-bottom: 1px solid #252a31;
    backdrop-filter: blur(12px);
}

.topbar-inner {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 18px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-nav a {
    color: #aeb6c1;
    font-size: 14px;
    text-decoration: none;
}

.topbar-nav a:hover {
    color: #ffffff;
}

.admin-indicator {
    padding: 5px 8px;
    background: #20242b;
    border: 1px solid #2d333c;
    border-radius: 6px;
    color: #c5ccd5;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.4px;
}

.brand span {
    color: #858e9a;
    font-size: 14px;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 32px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-bar select,
.filter-bar button {
    min-height: 38px;
    padding: 8px 11px;
    background: #15181d;
    border: 1px solid #2d333c;
    border-radius: 7px;
    color: #d7dce2;
    font: inherit;
    font-size: 13px;
}

.filter-bar select {
    min-width: 150px;
    cursor: pointer;
}

.filter-bar button {
    padding-left: 16px;
    padding-right: 16px;
    cursor: pointer;
}

.filter-bar select:hover,
.filter-bar button:hover {
    border-color: #414955;
}

.filter-bar select:focus {
    outline: none;
    border-color: #596270;
}

.filter-bar button:hover {
    background: #20242b;
}

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

.release-card {
    position: relative;
    overflow: hidden;
    background: #15181d;
    border: 1px solid #252a31;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.release-card:hover {
    transform: translateY(-3px);
    border-color: #3a414b;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.release-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center;
    background: #111419;
}

.designer-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(12, 15, 19, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #d7dde5;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.release-image-placeholder {
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            145deg,
            #1d2127,
            #111419
        );
    color: #59616d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.release-info {
    padding: 16px;
}

.release-info h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 600;
}

.collection {
    margin: 7px 0 0;
    color: #9da6b2;
    font-size: 13px;
}

.release-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.release-meta span {
    padding: 5px 8px;
    background: #20242b;
    border: 1px solid #2d333c;
    border-radius: 6px;
    color: #aeb6c1;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.back-link {
    display: inline-block;
    margin-bottom: 28px;
    color: #9da6b2;
    font-size: 14px;
    text-decoration: none;
}

.back-link:hover {
    color: #ffffff;
}

.detail-header {
    display: grid;
    gap: 22px;
    margin-bottom: 28px;
}

.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    width: 100%;
}

.detail-info {
    justify-self: start;
}

.detail-header h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.8px;
}

.detail-franchise {
    margin: 8px 0 0;
    color: #858e9a;
    font-size: 16px;
}

.detail-info {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.detail-info-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: baseline;
    font-size: 14px;
}

.detail-info-label {
    color: #7f8894;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.detail-section {
    margin-top: 42px;
}

.detail-section > h2 {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 600;
}

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

.gallery-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center;
    background: #111419;
    border: 1px solid #252a31;
    border-radius: 12px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-control {
    display: flex;
    justify-content: center;
}

.preview-active,
.preview-button {
    width: 100%;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
    text-align: center;
}

.preview-active {
    background: #20242b;
    border: 1px solid #343b45;
    color: #cfd6de;
}

.preview-button {
    background: #15181d;
    border: 1px solid #2d333c;
    color: #aeb6c1;
    cursor: pointer;
}

.preview-button:hover {
    background: #20242b;
    border-color: #414955;
    color: #ffffff;
}

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

.variant-card {
    padding: 18px;
    background: #15181d;
    border: 1px solid #252a31;
    border-radius: 12px;
}

.variant-card h3 {
    margin: 0;
    font-size: 17px;
}

.variant-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.variant-scale,
.variant-type {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.variant-type {
    margin: 0;
    color: #c2c8d0;
}

.release-notes {
    max-width: 900px;
    color: #b7bec8;
    line-height: 1.7;
}

.gallery-image {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    display: block;
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 26px;
    z-index: 1001;
    padding: 0;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #bfc5cc;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    z-index: 1001;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    transition:
        background 140ms ease,
        transform 140ms ease;
}

.lightbox-nav::before {
    content: "";
    width: 16px;
    height: 16px;
    border-top: 4px solid #ffffff;
    border-right: 4px solid #ffffff;
}

.lightbox-next::before {
    transform: translateX(-3px) rotate(45deg);
}

.lightbox-prev::before {
    transform: translateX(3px) rotate(-135deg);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.10);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.94);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

body.lightbox-open {
    overflow: hidden;
}

.admin-edit-panel {
    margin-top: 28px;
    padding: 20px;
    background: #15181d;
    border: 1px solid #252a31;
    border-radius: 12px;
}

.admin-edit-panel h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
}

.admin-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-field {
    display: grid;
    gap: 7px;
    font-size: 13px;
    color: #9da6b2;
}

.admin-field input[type="text"],
.admin-field select,
.admin-field textarea {
    width: 100%;
    padding: 10px 11px;
    background: #101318;
    border: 1px solid #2b3139;
    border-radius: 7px;
    color: #e9edf2;
    font: inherit;
}

.admin-field input[type="text"]:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    outline: none;
    border-color: #596270;
}

.admin-checkbox {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-notes-field {
    grid-column: 1 / -1;
}

.admin-form-actions {
    grid-column: 1 / -1;
}

.admin-form-actions button {
    padding: 9px 14px;
    background: #20242b;
    border: 1px solid #343b45;
    border-radius: 7px;
    color: #e9edf2;
    font-size: 13px;
    cursor: pointer;
}

.admin-form-actions button:hover {
    background: #2a3038;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 42px;
}

.detail-sidebar h2,
.detail-gallery-column h2 {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 600;
}

.variant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-card.compact {
    padding: 12px 14px;
}

.variant-card.compact h3 {
    font-size: 16px;
}

.variant-card.compact .release-meta {
    margin-top: 8px;
}

.detail-gallery-column {
    min-width: 0;
}

@media (max-width: 700px) {
    .topbar {
        padding: 18px;
    }

    .brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .container {
        padding: 18px;
    }

    .release-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(170px, 1fr)
        );
        gap: 14px;
    }
}

.variant-print-info {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #2a2f36;
    font-size: 0.76rem;
    color: #858e9a;
}

.print-admin-label {
    display: block;
    margin-bottom: 6px;
    color: #858e9a;
    font-size: 0.76rem;
}

.print-admin-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-button {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #20242b;
    border: 1px solid #2d333c;
    border-radius: 6px;
    color: #d7dce2;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.print-button:hover {
    background: #2a3038;
    border-color: #414955;
}

.print-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.print-button:disabled:hover {
    background: #20242b;
    border-color: #2d333c;
}

.print-count {
    min-width: 24px;
    text-align: center;
    color: #d7dce2;
    font-size: 0.82rem;
    font-weight: 600;
}
