@import url('https://fonts.googleapis.com/css?family=IM+Fell+DW+Pica|Pathway+Gothic+One');

:root {
    --bg-color: #333319;
    --text-color: #d1d1bc;
    --accent-color: #ffffff;
    --border-color: #d1d1bc;
    --font-main: 'IM Fell DW Pica', serif;
    --font-header: 'Pathway Gothic One', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 18px;
    margin: 0;
    padding: 0;
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
}

a:hover {
    color: var(--accent-color);
    border-bottom-style: solid;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Header Obra Dinn */
.header-holder {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    position: relative;
    /* Enabled for absolute positioning of donation btn */
}

/* GRID HEADER LAYOUT */
.header-user-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 15px;
    width: 100%;
    gap: 20px;
    /* Force spacing between columns */
}

.user-info-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.header-spacer {
    /* Empty spacer for left grid col */
}

.header-donation-wrapper {
    justify-self: end;
    /* Push to right */
}

/* DONATION BUTTON */
.donation-btn {
    /* Position relative to grid cell now */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: rgba(255, 255, 255, 0.05);
    /* Subtle background */
    border: 1px solid var(--accent-color);
    /* Highlight border */
    color: var(--text-color);
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1.1rem;
    /* Increased size */
    font-family: var(--font-main), sans-serif;
    /* Normal font */
    font-weight: 500;
    /* Less bold */
    transition: all 0.3s;
    opacity: 0.9;
    min-width: 280px;
    /* Wider */
    border-radius: 4px;
    /* Slight roundness */
    text-align: center;
}

.donation-btn:hover {
    background: var(--accent-color);
    color: #000;
    /* Contrast on hover */
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.heart-icon {
    color: #ff4d4d;
    /* Red heart */
    font-size: 1.5rem;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.3);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }
}

h1#main-title {
    font-family: var(--font-header);
    font-size: 4rem;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 2px;
}

/* SEARCH SIDEBAR (Sticky/Fixed) - LEFT SIDE */
.search-sidebar {
    position: fixed;
    top: 50px;
    right: 50%;
    margin-right: 500px;
    width: 300px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color);
    padding: 15px;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.search-title {
    font-family: var(--font-header);
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 5px;
}

/* Responsive: VERTICAL MONITOR */
@media (max-width: 1600px) {
    .search-sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        margin: 0 0 30px 0;
        max-height: 250px;
        right: auto;
        background: #333319;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        z-index: 900;
    }

    .search-sidebar.view-only-sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        margin: 0 0 30px 0;
        max-height: 250px;
        right: auto;
        background: #333319;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        z-index: 900;
    }
}

/* View-only sidebar styling - SOLO para monitores grandes */
@media (min-width: 1601px) {
    .search-sidebar.view-only-sidebar {
        position: fixed;
        top: 50px;
        right: 50%;
        margin-right: 500px;
        width: 300px;
        background: rgba(0, 0, 0, 0.2);
        border: 2px solid var(--border-color);
        padding: 15px;
        z-index: 1000;
        max-height: 80vh;
        overflow-y: auto;
        text-align: left;
    }
}

/* Resultados de búsqueda */
.search-result-item {
    border: 1px solid var(--border-color);
    padding: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.search-result-item img {
    width: 40px;
    height: auto;
}

/* Lista FilmAffinity */
.mylist-content-wrap {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.list-row {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid rgba(209, 209, 188, 0.3);
    align-items: flex-start;
    gap: 20px;
}

.pos {
    font-family: var(--font-header);
    font-size: 3rem;
    width: 60px;
    text-align: right;
    line-height: 1;
    opacity: 0.6;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
}

.pos:hover {
    opacity: 1;
    color: var(--accent-color);
}

.movie-card {
    display: flex;
    flex-grow: 1;
    gap: 25px;
}

.mc-poster {
    width: 100px;
    height: 150px;
    background: #000;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.mc-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
    background: #000;
}

/* Class for horizontal fallbacks: show the right side of the image (often where characters are) */
.mc-poster img.is-horizontal {
    object-fit: cover;
    object-position: right center;
}

.mc-info-container {
    display: flex;
    flex-direction: column;
}

.mc-title {
    font-family: var(--font-header);
    font-size: 2.2rem;
    margin: 0 0 5px 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.ratings-wrap {
    display: flex;
    gap: 15px;
    font-size: 1.1rem;
    opacity: 0.8;
}

.mc-director,
.mc-cast {
    font-style: italic;
    margin-top: 5px;
    font-size: 0.95rem;
}

/* Nota del Usuario */
.user-rating-box {
    font-family: var(--font-header);
    font-size: 1.8rem;
    border: 2px solid var(--border-color);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0px;
    align-self: flex-start;
    margin-top: 50px;
    /* Align with the center of the main content area */
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    margin-left: auto;
    cursor: pointer;
}

.user-rating-box:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Botones */
.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 15px;
}

.btn-toolbar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

button.btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1.2rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

button.btn.remove {
    border-color: #ff6b6b;
    color: #ff6b6b;
    margin-top: 10px;
}

button.btn.remove:hover {
    background: #ff6b6b;
    color: #fff;
}

/* --- MODAL ESTILO OBRA DINN --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border: 4px double var(--border-color);
    padding: 30px;
    text-align: center;
    width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.modal-title {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-input {
    width: 100%;
    padding: 10px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-header);
    font-size: 2rem;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

select.modal-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-color) 50%),
        linear-gradient(135deg, var(--text-color) 50%, transparent 50%);
    background-position:
        right 18px center,
        right 12px center;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

select.modal-input:focus {
    border-color: var(--accent-color);
}

.modal-message {
    padding: 20px 0;
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:hover {
    background: var(--border-color);
    color: var(--bg-color);
}

.modal-btn-danger:hover {
    background: #8b0000;
    border-color: #8b0000;
    color: var(--text-color);
}

/* Info y DLC Section */
.info-dlc-container {
    margin-top: 10px;
}

.info-dlc-toggle {
    display: inline-block;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px dotted var(--border-color);
    transition: opacity 0.2s;
}

.info-dlc-toggle:hover {
    opacity: 1;
}

.info-dlc-content {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(209, 209, 188, 0.2);
    margin-top: 10px;
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 820px;
}

.details-id {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 15px;
    font-style: italic;
}


.info-dlc-content {
    position: relative;
    padding-top: 10px;
}

.steamdb-link {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.steamdb-link:hover {
    background: var(--text-color);
    transform: scale(1.1);
}

.steamdb-link img {
    width: 20px;
    height: 20px;
}

.details-section {
    margin-bottom: 20px;
}

.details-label {
    font-family: var(--font-header);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    opacity: 0.8;
}

.details-text {
    text-align: justify;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 10px;
    border-left: 2px solid rgba(209, 209, 188, 0.1);
    padding-left: 10px;
    font-style: italic;
}

.rating-global-container {
    margin: 25px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px double var(--border-color);
    position: relative;
}

.rating-global-label {
    position: absolute;
    top: -12px;
    left: 15px;
    background: var(--bg-color);
    padding: 2px 10px;
    font-family: var(--font-header);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.rating-global-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.rating-global-box {
    text-align: center;
    padding: 10px 15px;
    border: 1px solid rgba(209, 209, 188, 0.2);
    min-width: 80px;
}

.steam-rating {
    border-color: var(--accent-color);
}

.rating-score {
    font-family: var(--font-header);
    font-size: 2.2rem;
    line-height: 1;
    color: var(--text-color);
}

.ratings-wrap {
    font-size: 0.9rem;
    color: rgba(209, 209, 188, 0.7);
    margin-bottom: 3px;
}

.global-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.global-rating-box {
    font-family: var(--font-header);
    font-size: 1.25rem;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.global-votes-count {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0.8;
}

.rating-name {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    letter-spacing: 1px;
}

.rating-votes-info {
    border-left: 1px solid rgba(209, 209, 188, 0.2);
    padding-left: 30px;
}

.total-votos-label {
    font-size: 0.8rem;
    opacity: 0.6;
}

.total-votos-value {
    font-family: var(--font-header);
    font-size: 1.4rem;
}

.details-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

.dlc-section {
    margin-top: 25px;
}

.dlc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.dlc-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(209, 209, 188, 0.15);
    padding: 8px;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dlc-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    background: rgba(0, 0, 0, 0.5);
}

.dlc-card.is-played {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.dlc-poster img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 460/215;
    object-fit: cover;
}

.dlc-name {
    font-family: var(--font-header);
    font-size: 0.95rem;
    margin-top: 8px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    flex-grow: 1;
}

.dlc-footer {
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px dashed rgba(209, 209, 188, 0.1);
    padding-top: 8px;
}

.dlc-id {
    font-size: 0.75rem;
    opacity: 0.4;
}

/* Obra Dinn Style Checkbox */
.dlc-checkbox-container {
    display: block;
    position: relative;
    width: 18px;
    height: 18px;
    cursor: pointer;
    user-select: none;
}

.dlc-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.dlc-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 2px solid var(--border-color);
}

.dlc-checkbox-container:hover input~.dlc-checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.dlc-checkbox-container input:checked~.dlc-checkmark {
    background-color: var(--border-color);
}

.dlc-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.dlc-checkbox-container input:checked~.dlc-checkmark:after {
    display: block;
}

.dlc-checkbox-container .dlc-checkmark:after {
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--bg-color);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* SHARE CONTROLS */
#share-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.share-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border: 3px double var(--border-color);
    padding: 10px 20px;
    font-family: var(--font-header);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
}

.share-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.share-menu {
    position: absolute;
    bottom: 55px;
    right: 0;
    width: 280px;
    background: var(--bg-color);
    border: 3px double var(--border-color);
    padding: 20px;
    display: none;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

.share-menu.active {
    display: block;
}

.share-title {
    font-family: var(--font-header);
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.share-message {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* SWITCH TOGGLE */
.switch-container {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border: 2px solid var(--border-color);
    transition: .4s;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: var(--border-color);
    transition: .4s;
}

input:checked+.switch-slider {
    background-color: var(--border-color);
}

input:checked+.switch-slider:before {
    transform: translateX(20px);
    background-color: var(--bg-color);
}

/* VIEW TOGGLE */
.view-toggle-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}

.view-btn {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 8px;
    font-family: var(--font-header);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* TIER LIST CONTAINER */
#tier-list-container {
    margin-top: 20px;
}

.tier-row {
    display: flex;
    min-height: 160px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    align-items: stretch;
}

.tier-label {
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    font-size: 1.8rem;
    color: #000;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    padding: 10px;
    box-sizing: border-box;
}

.tier-label-text {
    padding: 0 5px;
    word-break: break-word;
    line-height: 1.1;
}

.tier-label-input {
    width: 100%;
    height: 100%;
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #000;
    font-family: var(--font-header);
    font-size: inherit;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

.pool-title .tier-label-input {
    font-size: 1.5rem;
    color: var(--text-color);
    min-height: 36px;
}

.s-label {
    background-color: #ff7f7f;
}

.a-label {
    background-color: #ffbf7f;
}

.b-label {
    background-color: #ffff7f;
}

.c-label {
    background-color: #7fff7f;
}

.d-label {
    background-color: #7fbfff;
}

.f-label {
    background-color: #7f7fff;
}

.tier-items {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 5px;
    min-width: 100px;
    flex-grow: 1;
    align-items: stretch;
}

/* TIER ITEM (CROMO) - Altura igual a la fila, sin huecos (ratio 2:3) */
.tier-item {
    width: 100px;
    height: 150px;
    border: 1px solid var(--border-color);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #000;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.tier-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 10;
}

.tier-item:active {
    cursor: grabbing;
}

.tier-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ghost al arrastrar (Sortable.js) */
.tier-item.sortable-ghost {
    opacity: 0.4;
}

/* POOL */
.pool-container {
    margin-top: 30px;
    border: 2px double var(--border-color);
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.pool-title {
    font-family: var(--font-header);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

#tier-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    min-height: 130px;
    padding: 5px;
}

/* CATEGORY BUTTON IN LIST VIEW */
.rating-category-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.category-btn {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: normal;
    color: var(--accent-color);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    min-width: 60px;
    text-align: center;
    white-space: nowrap;
    /* Force single line */
}

.category-btn:hover {
    opacity: 1;
    background: var(--border-color);
    color: var(--bg-color);
    transform: scale(1.05);
}

/* TIER SELECTION MODAL - LIST VIEW */
.tier-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.tier-list-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.tier-list-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tier-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 15px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.tier-list-label {
    flex-grow: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    color: var(--text-color);
}

.tier-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
    font-weight: bold;
}

.tier-list-row.selected .tier-checkbox {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

/* Helper colors for dots */
.tier-s {
    background-color: #ff7f7f;
}

.tier-a {
    background-color: #ffbf7f;
}

.tier-b {
    background-color: #ffff7f;
}

.tier-c {
    background-color: #7fff7f;
}

.tier-d {
    background-color: #7fbfff;
}

.tier-f {
    background-color: #7f7fff;
}

.tier-pool {
    background-color: #ccc;
}

/* Colors for modal buttons match labels */
.tier-s {
    background-color: #ff7f7f;
    color: #000;
}

.tier-a {
    background-color: #ffbf7f;
    color: #000;
}

.tier-b {
    background-color: #ffff7f;
    color: #000;
}

.tier-c {
    background-color: #7fff7f;
    color: #000;
}

.tier-d {
    background-color: #7fbfff;
    color: #000;
}

.tier-f {
    background-color: #7f7fff;
    color: #000;
}

.tier-pool {
    background-color: #ccc;
    color: #000;
}

/* SETTINGS BUTTON */
#settings-btn {
    position: absolute;
    /* Changed to absolute to scroll with page */
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 1.2rem;
    text-transform: uppercase;
    transition: all 0.2s;
    z-index: 2000;
    background: rgba(51, 51, 25, 0.8);
}

#settings-btn:hover {
    background: var(--border-color);
    color: var(--bg-color);
}

/* SETTINGS MODAL CONTENT */
#settings-modal .modal-input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
}

#settings-modal select.modal-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 38px;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.2);
    color-scheme: dark;

    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-color) 50%),
        linear-gradient(135deg, var(--text-color) 50%, transparent 50%);
    background-position:
        right 18px center,
        right 12px center;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

#settings-modal select.modal-input option {
    color: var(--text-color);
    background-color: rgba(30, 30, 20, 0.95);
    color-scheme: dark;
}

/* --- LANDING PAGE / TUTORIAL V2 --- */
.landing-container-v2 {
    max-width: 800px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
    animation: fadeIn 0.8s ease-out;
}

.landing-header h1 {
    font-family: var(--font-header);
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.landing-header p {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 40px;
}

/* CSS STEAM BUTTON */
.btn-steam-css {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #171a21;
    /* Steam Dark */
    color: #c5c3c0;
    padding: 15px 30px;
    text-decoration: none;
    font-family: var(--font-header);
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-steam-css:hover {
    background: #2a475e;
    /* Steam Blueish */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 192, 244, 0.4);
    border-color: #66c0f4;
}

.steam-icon-img {
    width: 24px;
    height: 24px;
    /* transition: transform 0.2s; */
}

/* .btn-steam-css:hover .steam-icon-img {
    transform: scale(1.1);
} */

.btn-steam-css span {
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: bold;
}

/* TIMELINE TUTORIAL */
.tutorial-timeline {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 80px;
    position: relative;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.step-content h3 {
    font-family: var(--font-header);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.step-content p {
    font-size: 0.9rem;
    opacity: 0.6;
    line-height: 1.4;
    max-width: 180px;
    margin: 0 auto;
}

.contact-link:hover {
    opacity: 1 !important;
    text-decoration: underline !important;
}

.contact-btn {
    background: var(--bg-color);
    color: var(--text-color);
    border: 3px double var(--border-color);
    padding: 10px 20px;
    font-family: var(--font-header);
    font-size: 1.1rem;
    /* Slightly smaller than share/view */
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    margin-right: 40px;
    /* Moved more to the left */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.contact-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    opacity: 1 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.timeline-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    /* Aligns with center of step-number (40px/2) */
    position: relative;
    top: 0;
}

@media (max-width: 600px) {
    .tutorial-timeline {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .timeline-line {
        display: none;
    }
}

/* Dynamic Tier Row Controls */
/* Dynamic Tier Row Controls */
.tier-row {
    display: flex !important;
    margin-bottom: 0px !important;
    /* Overwrite existing margin if needed */
    border-bottom: 1px solid #111;
    min-height: 80px;
    position: relative;
    /* For absolute positioning of controls */
    padding-right: 32px;
    /* Make space for controls */
}

/* Controls Always Visible - Integrated Style */
.tier-controls {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    /* Fixed width */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 5px;
    /* Spacing between elements */
    background: rgba(0, 0, 0, 0.3);
    /* Subtle dark background */
    border-left: 1px solid #333;
    z-index: 10;
}

/* Gear Icon */
.tier-settings-btn {
    cursor: pointer;
    font-size: 1.1rem;
    color: #888;
    /* Muted color by default */
    transition: all 0.2s;
    margin-bottom: 5px;
}

.tier-settings-btn:hover {
    color: var(--accent-color);
    /* Highlight on hover */
    transform: rotate(90deg);
}

.tier-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tier-arrow-btn {
    cursor: pointer;
    font-size: 0.7rem;
    color: #666;
    user-select: none;
    padding: 2px;
    transition: all 0.2s;
}

.tier-arrow-btn:hover {
    color: #fff;
    transform: scale(1.2);
}

/* Modal Color Picker Hover */
#row-color-picker div:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px #fff;
}

/* Row Settings Modal Labels */
#row-settings-modal .modal-content div[style*="font-weight: bold"] {
    font-family: var(--font-header);
    letter-spacing: 1px;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Adjust Row Label Input */
#row-label-input {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 1.1rem;
    font-family: var(--font-header);
    /* Add font here too */
}