/* =========================================
   WANTED POSTER GAME - CSS
   ========================================= */

.container-wanted {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 15px 30px;
}

/* =========================================
   1. WANTED POSTER
   ========================================= */
.wanted-poster-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.wanted-poster {
    position: relative;
    width: 340px;
    max-width: 100%;
    aspect-ratio: auto;
    user-select: none;
    transition: transform 0.3s ease;
}

.wanted-poster:hover {
    transform: scale(1.02);
}

.wanted-poster-bg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}

/* Photo area - positioned over the white space on the poster */
.wanted-photo-area {
    position: absolute;
    top: 23%;
    left: 11.5%;
    width: 77%;
    height: 41%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd5c0;
}

.wanted-character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: filter 0.6s ease;
}

/* Grayscale filter (default) */
.wanted-character-img.grayscale {
    filter: grayscale(100%) blur(var(--wanted-blur, 10px));
}

/* Color mode */
.wanted-character-img.color-mode {
    filter: blur(var(--wanted-blur, 10px));
}

/* Bounty area - positioned below "DEAD OR ALIVE" text */
/* Name area - positioned below photo */
.wanted-name-area {
    position: absolute;
    bottom: 18%;
    left: 10%;
    width: 80%;
    height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wanted-name-area.visible {
    opacity: 1;
}

.wanted-name-text {
    font-family: 'Pirata One', cursive;
    font-size: 1.7rem;
    color: #3e2723;
    text-transform: uppercase;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
    letter-spacing: 2px;
    white-space: normal;
    text-align: center;
    line-height: 0.9;
    width: 95%;
}

/* Bounty area - positioned below Name */
.wanted-bounty-area {
    position: absolute;
    bottom: 11%;
    left: 10%;
    width: 80%;
    height: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wanted-bounty-area.visible {
    opacity: 1;
}

.wanted-bounty-text {
    font-family: 'Pirata One', cursive;
    font-size: 1.6rem;
    color: #3e2723;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
    letter-spacing: 2px;
    white-space: nowrap;
}

/* =========================================
   2. CONTROLS
   ========================================= */
.wanted-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: rgba(255, 248, 225, 0.6);
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #8d6e63;
}

.btn-color-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #4e342e, #3e2723);
    color: #d7ccc8;
    border: 2px solid #8d6e63;
    border-radius: 50px;
    padding: 10px 20px;
    font-family: 'Pirata One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-color-toggle:hover {
    background: linear-gradient(to bottom, #5d4037, #4e342e);
    border-color: #ffb300;
    color: #ffca28;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-color-toggle.active {
    background: linear-gradient(135deg, #ff6f00, #e65100);
    border-color: #ffb300;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.4);
}

.btn-color-toggle svg {
    stroke: currentColor;
}

.attempts-counter {
    font-family: 'Pirata One', cursive;
    font-size: 1.3rem;
    color: #3e2723;
    background: rgba(255, 248, 225, 0.8);
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #8d6e63;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Wanted-specific hint-box overrides */
.hint-box-wanted {
    margin: 0;
    padding: 8px 15px;
    min-width: auto;
}

.hint-title-wanted {
    font-size: 1rem;
}


/* Revealed hints container */
.revealed-hints-container {
    text-align: center;
    margin-bottom: 15px;
}

/* =========================================
   3. ATTEMPTS TABLE (Copied from Fruta)
   ========================================= */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-table thead th {
    background: #3e2723;
    color: #ffca28;
    font-family: 'Pirata One', cursive;
    font-size: 1.4rem;
    padding: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 4px solid #5d4037;
    text-align: center;
    border-right: 1px solid rgba(255, 202, 40, 0.2);
}

.results-table thead th:last-child {
    border-right: none;
}

.results-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #d7ccc8;
    border-right: 1px solid rgba(93, 64, 55, 0.15);
    vertical-align: middle;
    color: #3e2723;
    font-weight: 500;
}

.results-table tbody td:last-child {
    border-right: none;
}

/* Clases de estado */
.results-table td.correct {
    color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.1);
    font-weight: bold;
}

.results-table td.incorrect {
    color: #c62828;
}

/* Columnas */
.col-img {
    width: 20%;
    text-align: center;
}

.col-name {
    width: 50%;
    text-align: center;
    font-size: 1.2rem;
}

.col-result {
    width: 30%;
    text-align: center;
}

.col-result.correct,
.col-result.incorrect {
    font-family: 'Pirata One', cursive;
    font-size: 1.4rem;
}

.results-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
    border: 2px solid #a1887f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE TABLE */
@media (max-width: 600px) {
    .hint-box {
        justify-content: center;
    }

    .results-table thead {
        display: table-header-group;
    }

    .results-table thead th {
        font-size: 1rem;
        padding: 8px 4px;
        white-space: nowrap;
    }

    .results-table tbody tr {
        display: table-row;
        border-bottom: 1px solid #d7ccc8;
    }

    .results-table tbody td {
        display: table-cell;
        vertical-align: middle;
        padding: 8px 4px;
        border-right: 1px solid rgba(93, 64, 55, 0.15);
        border-bottom: 1px solid rgba(93, 64, 55, 0.15);
    }

    .results-table img {
        width: 45px;
        height: 45px;
        margin: 0 auto;
    }

    .results-table tbody td:nth-child(2) {
        font-size: 1rem;
    }
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 500px) {
    .wanted-poster {
        width: 280px;
    }

    .wanted-bounty-text {
        font-size: 1.2rem;
    }

    .wanted-controls {
        gap: 10px;
    }

    .btn-color-toggle {
        font-size: 0.95rem;
        padding: 8px 15px;
    }

    .attempts-counter {
        display: none;
    }

    .game-result-content {
        flex-direction: column;
        text-align: center;
    }

    .game-result-title {
        font-size: 1.4rem;
    }
}

/* =========================================
   9. ANIMATIONS
   ========================================= */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes posterReveal {
    0% {
        filter: blur(10px);
    }

    100% {
        filter: blur(0px);
    }
}

/* Blur step transitions (smooth) */
.blur-transition {
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        --wanted-blur 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}