/* =========================================
   RISA GAME - CSS
   ========================================= */

.container-risa {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 15px 30px;
}

/* =========================================
   1. AUDIO PLAYER
   ========================================= */
.risa-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #3e2723 0%, #291a14 100%);
    border: 2px solid #5d4037;
    border-radius: 20px;
    padding: 32px 24px 24px;
    margin: 0 auto 24px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Sound wave bars */
.risa-soundwave {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 48px;
}

.risa-soundwave span {
    display: inline-block;
    width: 5px;
    height: 8px;
    background: rgba(255, 200, 0, 0.4);
    border-radius: 3px;
    transition: height 0.15s ease, background 0.3s;
}

.risa-soundwave.playing span {
    background: rgb(255, 200, 0);
    animation: wave 1.2s ease-in-out infinite;
}

.risa-soundwave.playing span:nth-child(1) {
    animation-delay: 0.0s;
}

.risa-soundwave.playing span:nth-child(2) {
    animation-delay: 0.1s;
}

.risa-soundwave.playing span:nth-child(3) {
    animation-delay: 0.2s;
}

.risa-soundwave.playing span:nth-child(4) {
    animation-delay: 0.3s;
}

.risa-soundwave.playing span:nth-child(5) {
    animation-delay: 0.4s;
}

.risa-soundwave.playing span:nth-child(6) {
    animation-delay: 0.3s;
}

.risa-soundwave.playing span:nth-child(7) {
    animation-delay: 0.2s;
}

.risa-soundwave.playing span:nth-child(8) {
    animation-delay: 0.1s;
}

.risa-soundwave.playing span:nth-child(9) {
    animation-delay: 0.0s;
}

.risa-soundwave.playing span:nth-child(10) {
    animation-delay: 0.2s;
}

@keyframes wave {

    0%,
    100% {
        height: 8px;
    }

    50% {
        height: 40px;
    }
}

/* Play button */
.risa-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgb(255, 200, 0);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    box-shadow: 0 4px 20px rgba(255, 200, 0, 0.4);
}

.risa-play-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(255, 200, 0, 0.6);
}

.risa-play-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.risa-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.risa-play-btn.playing {
    background: rgba(255, 200, 0, 0.8);
}

.risa-play-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.04em;
}

.risa-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.risa-mute-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 200, 0, 0.7);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.risa-mute-btn:hover {
    color: rgb(255, 200, 0);
}

.risa-volume-range {
    flex: 1;
    accent-color: rgb(255, 200, 0);
    cursor: pointer;
}

.risa-volume-value {
    min-width: 36px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-align: right;
}

.risa-volume-note {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    font-style: italic;
}

/* =========================================
   2. ATTEMPTS ROW
   ========================================= */
.risa-attempts-row {
    text-align: center;
    font-size: 0.9rem;
    color: #3e2723;
    margin-bottom: 16px;
}

/* =========================================
   3. RESULTS TABLE
   ========================================= */
.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;
}

.results-table td.correct {
    color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.1);
    font-weight: bold;
}

.results-table td.incorrect {
    color: #c62828;
}

.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);
}

@media (max-width: 600px) {
    .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;
    }
}

/* =========================================
   4. HIDDEN UTILITY
   ========================================= */
.hidden {
    display: none !important;
}