body {
    background-attachment: fixed;
}

/* Go Back button (copied from css/style.css — that sheet isn't loaded here) */
.round_corners {
    border-radius: 15px;
    background-color: var(--main-colour);
    width: fit-content;
    padding: var(--padding-sm);
    margin-bottom: 15px;
}

.goback {
    display: flex;
    align-items: center;
    font-variant: all-small-caps;
    font-weight: bold;
    padding: inherit;
}

.goback img {
    width: var(--icon-md);
    padding-right: var(--padding-sm);
}

/* Main Container */
.collection-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    background: var(--sales-dark-bg);
    border: 2px dotted var(--sales-red);
    padding: 20px;
    border-radius: 10px;
}

/* How to section */
.how-to-toggle {
    color: var(--sales-red);
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    display: inline-block;
}

.how-to-content {
    margin-top: 1.2em;
    padding: 1em;
    background: var(--main-colour_clear);
    border-radius: 6px;
    border: 1px solid var(--sales-border-subtle);
    text-align: left;
    display: none;
}

.how-to-content span {
    font-size: 1.1em;
    font-weight: bold;
    font-variant-caps: small-caps;
    color: var(--font-colour_offwhite);
    display: block;
    margin-bottom: 0.8em;
}

/* Reliable numbered list with wrapped lines */
.how-to-content ol {
    list-style: none;
    padding-left: 2.4em;
    counter-reset: number;
    margin: 1em 0;
}

.how-to-content ol li {
    position: relative;
    counter-increment: number;
    padding-left: 2.6em;
    margin-bottom: 0.8em;
    line-height: 1.1;
}

.how-to-content ol li::before {
    content: counter(number) ".";
    position: absolute;
    left: 0;
    width: 2em;
    text-align: right;
    color: var(--font-colour_white);
    font-weight: bold;
}

/* Optional: softer alternating colors */
.how-to-content ol li:nth-child(odd) {
    color: var(--sales-text-dark);
}

.how-to-content ol li:nth-child(even) {
    color: var(--sales-text-muted);
}


/* Controls Area */
.controls-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    background: var(--sales-bg-overlay);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--sales-red);
}

.user-input-group {
    display: flex;
    gap: 10px;
}

.user-input-group input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--sales-border-subtle);
    background: var(--menu-colour);
    color: var(--sales-text-primary);
}

.user-input-group button {
    background: var(--sales-red);
    color: var(--sales-white);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.user-input-group button:hover {
    background: var(--sales-bright-red);
}

.stats-display {
    font-size: 1.1em;
    color: var(--sales-text-secondary);
}

.stats-display span {
    color: var(--sales-red);
    font-weight: bold;
    margin: 0 5px;
}

.filter-buttons button {
    background: var(--transparent);
    border: 1px solid var(--sales-red);
    color: var(--sales-text-secondary);
    padding: 6px 12px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.filter-buttons button.active {
    background: var(--sales-red);
    color: var(--sales-white);
}

/* Search Bar */
.search-bar {
    width: 100%;
    margin-top: 15px;
}

.search-bar input {
    width: -webkit-fill-available;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--sales-border-subtle);
    background: var(--menu-colour);
    color: var(--sales-text-primary);
    font-size: 1em;
}

/* Album Sections */
.album-block {
    margin-bottom: 40px;
}

.album-title {
    font-size: 1.8em;
    color: var(--sales-white);
    border-bottom: 2px solid var(--sales-red);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: var(--sales-text-shadow);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.album-title:hover {
    color: var(--sales-bright-red);
}

.album-title-text {
    flex: 1;
}

.album-count {
    font-size: 0.7em;
    color: var(--sales-text-secondary);
    margin-left: 15px;
}

.collapse-icon {
    font-size: 0.8em;
    margin-left: 10px;
    transition: transform 0.3s;
}

.album-title.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.album-content {
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.album-content.collapsed {
    max-height: 0;
}

.pressing-block {
    margin-bottom: 20px;
    background: var(--main-colour_clear);
    border-radius: 8px;
    overflow: hidden;
}

.pressing-title {
    background: var(--sales-light-red);
    padding: 10px 15px;
    font-weight: bold;
    color: var(--sales-text-primary);
    border-bottom: 1px solid var(--sales-hover-red);
}

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

.variant-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--main-colour_clear);
    cursor: pointer;
    transition: background 0.2s;
}

.variant-item:last-child {
    border-bottom: none;
}

.variant-item:hover {
    background: var(--sales-hover-overlay);
}

/* Owned State */
.variant-item.owned {
    background: var(--sales-status-good);
    border-left: 4px solid var(--sales-price-green);
}

.variant-item.owned:hover {
    background: var(--sales-status-good);
    filter: brightness(1.2);
}

.variant-thumb-container {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 50px;
    margin-right: 20px;
    flex-shrink: 0;
}

.variant-thumb-container.has-multiple {
    width: 60px;
}

.variant-thumb-container.has-multiple .variant-thumb {
    position: absolute;
    top: 0;
    left: 0;
    margin-right: 0;
}

.variant-thumb-container.has-multiple .image-primary {
    z-index: 2;
    box-shadow: 1px 0px 3px rgba(0, 0, 0, 0.5);
}

.variant-thumb-container.has-multiple .image-secondary {
    z-index: 1;
    transform: translateX(12px);
}

.variant-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
    border: 1px solid var(--sales-border-subtle);
    border-radius: 50px;
    transition: transform 0.2s, border-color 0.2s, z-index 0.2s;
}

.variant-thumb:hover {
    transform: scale(1.1);
    border-color: var(--sales-red);
}

.variant-thumb-container.has-multiple .image-primary:hover {
    transform: scale(1.1);
    z-index: 3;
}

.variant-thumb-container.has-multiple .image-secondary:hover {
    transform: translateX(18px) scale(1.1);
    z-index: 3;
}

.variant-info {
    flex: 1;
}

.variant-color {
    font-size: 1.1em;
    color: var(--sales-text-primary);
    display: block;
    margin-bottom: 4px;
}

.variant-meta {
    font-size: 0.85em;
    color: var(--sales-text-muted);
}

.discogs-link {
    margin-left: auto;
    padding: 8px 12px;
    background: var(--sales-light-red);
    border: 1px solid var(--sales-red);
    border-radius: 4px;
    color: var(--sales-white);
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s;
    white-space: nowrap;
}

.discogs-link:hover {
    background: var(--sales-red);
    transform: scale(1.05);
}

.export-buttons {
    display: flex;
    gap: 8px;
}

.export-buttons button {
    background: var(--sales-status-good);
    border: 1px solid var(--sales-status-good-border);
    color: var(--sales-white);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.export-buttons button:hover {
    background: var(--sales-price-green);
}

.hidden {
    display: none !important;
}

/* Edit Mode Button */
.edit-mode-btn {
    background: var(--sales-light-red);
    border: 1px solid var(--sales-red);
    color: var(--sales-white);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.edit-mode-btn:hover {
    background: var(--sales-red);
}

.edit-mode-btn.active {
    background: var(--sales-price-green);
    border-color: var(--sales-status-good-border);
}

/* Options Button */
.options-btn {
    background: var(--sales-border-subtle);
    border: 1px solid var(--sales-border-subtle);
    color: var(--sales-white);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.options-btn:hover {
    background: var(--sales-light-red);
    border-color: var(--sales-red);
}

/* PIN Modal */
.pin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--sales-bg-lightbox);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.pin-modal-content {
    background: var(--menu-colour);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--sales-red);
    max-width: 400px;
    width: 90%;
}

.pin-modal h2 {
    color: var(--sales-white);
    margin-top: 0;
}

.pin-modal input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--sales-border-subtle);
    background: var(--bg-colour);
    color: var(--sales-white);
    border-radius: 4px;
    font-size: 1.2em;
    text-align: center;
    letter-spacing: 0.5em;
}

.pin-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pin-modal-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.pin-modal-buttons .btn-submit {
    background: var(--sales-red);
    color: var(--sales-white);
}

.pin-modal-buttons .btn-cancel {
    background: var(--sales-border-subtle);
    color: var(--sales-white);
}

.pin-error {
    color: var(--sales-error-red);
    margin-top: 10px;
    display: none;
}

/* Options Modal */
.options-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--sales-bg-lightbox);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.options-modal-content {
    background: var(--menu-colour);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--sales-red);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.options-modal h2 {
    color: var(--sales-white);
    margin-top: 0;
    border-bottom: 2px solid var(--sales-red);
    padding-bottom: 10px;
}

.option-item {
    margin: 20px 0;
    padding: 15px;
    background: var(--sales-bg-overlay);
    border-radius: 6px;
    border: 1px solid var(--sales-border-subtle);
}

.option-item label {
    display: flex;
    align-items: center;
    color: var(--sales-text-primary);
    cursor: pointer;
    font-size: 1.05em;
}

.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.option-description {
    color: var(--sales-text-muted);
    font-size: 0.9em;
    margin-top: 8px;
    margin-left: 35px;
}

.options-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 25px;
    align-items: stretch;
}

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

/* All buttons get these base styles */
.options-modal-buttons button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
}

/* Save & Cancel keep their original look */
.options-modal-buttons .btn-save {
    background: var(--sales-price-green);
    color: var(--sales-white);
    flex: 1;
}

.options-modal-buttons .btn-save:hover {
    background: var(--sales-bright-red);
}

.options-modal-buttons .btn-cancel {
    background: var(--sales-border-subtle);
    color: var(--sales-white);
    flex: 1;
}

.options-modal-buttons .btn-cancel:hover {
    background: var(--sales-light-red);
    border-color: var(--sales-red);
}

/* Delete becomes link-like text, left-aligned */
.options-modal-buttons .text-btn-delete {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: var(--sales-price-red);
    font-weight: 500;
    font-size: 0.95em;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: transparent;
    align-self: flex-start;
    /* This is the key property! */
}

.options-modal-buttons .text-btn-delete:hover {
    color: var(--sales-price-red-hover);
    text-decoration-thickness: 2px;
}

/* Pin button */
.options-modal-buttons .btn-delete-confirm {
    background: var(--sales-price-red);
    color: var(--sales-white);
    width: max-content;
    align-self: center;
    flex: 1;
}

.options-modal-buttons .btn-delete-confirm:hover {
    background: var(--sales-price-red-hover);
}

/* Lightbox Override */
#lightbox {
    background: var(--sales-bg-lightbox);
}

/* Slide transition for delete view */
#optionsDeleteView {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}