/**
 * Hoja de Estilos: La Ruleta Mexicana - Juego TV para Elementor Pro
 * Estética: Feria Mexicana, Papel Picado, Rosa Mexicano, Cempasúchil, Verde Jade y Azul Talavera
 */

.rme-tv-wrapper {
    --rme-pink: #E4007C;
    --rme-gold: #FFB703;
    --rme-green: #00A86B;
    --rme-navy: #1D3557;
    --rme-purple: #7209B7;
    --rme-orange: #FB5607;
    --rme-cyan: #00B4D8;
    --rme-cream: #FFFDF7;

    position: relative;
    max-width: 1180px;
    margin: 20px auto;
    background: radial-gradient(circle at 50% 15%, #2A4770 0%, var(--rme-navy) 65%, #0F1E36 100%);
    border-radius: 24px;
    border: 6px solid var(--rme-gold);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(255, 183, 3, 0.15);
    padding: 0 24px 32px 24px;
    color: #ffffff;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
}

.rme-tv-wrapper *,
.rme-tv-wrapper *::before,
.rme-tv-wrapper *::after {
    box-sizing: border-box;
}

/* Cenefa de Papel Picado Mexicano */
.rme-papel-picado {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 0 -24px 18px -24px;
    padding: 0 12px;
    height: 38px;
}

.rme-banderin {
    flex: 1;
    height: 36px;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 85% 100%, 70% 72%, 50% 100%, 30% 72%, 15% 100%, 0 72%);
    background-image: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.4) 18%, transparent 20%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    animation: rmeWave 3s ease-in-out infinite alternate;
}

.rme-banderin:nth-child(odd) {
    animation-delay: 0.4s;
}

@keyframes rmeWave {
    0% { transform: translateY(0px); }
    100% { transform: translateY(3px); }
}

.rme-b-pink   { background-color: #E4007C; }
.rme-b-gold   { background-color: #FFB703; }
.rme-b-green  { background-color: #00A86B; }
.rme-b-cyan   { background-color: #00B4D8; }
.rme-b-purple { background-color: #8338EC; }
.rme-b-orange { background-color: #FB5607; }

/* Encabezado de Estudio TV */
.rme-tv-header {
    text-align: center;
    margin-bottom: 20px;
}

.rme-header-top-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.28);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 16px;
}

.rme-tv-badge {
    background: var(--rme-pink);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 30px;
    letter-spacing: 0.8px;
    box-shadow: 0 0 12px rgba(228, 0, 124, 0.6);
}

.rme-Quick-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.rme-select-label {
    font-size: 13px;
    font-weight: 700;
    color: #FFD166;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rme-select-label select {
    background: #102542;
    color: #fff;
    border: 2px solid var(--rme-gold);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.rme-btn-icon {
    background: #102542;
    color: #FFD166;
    border: 2px solid var(--rme-gold);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.rme-btn-icon:hover {
    background: var(--rme-gold);
    color: #102542;
}

.rme-tv-title {
    font-family: 'Fredoka', 'Montserrat', sans-serif;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
    color: #FFD166;
    text-transform: uppercase;
    margin: 4px 0;
    letter-spacing: 1px;
    text-shadow: 0 3px 0 #E4007C, 0 6px 15px rgba(0,0,0,0.6);
}

.rme-tv-subtitle {
    margin: 0 0 14px 0;
    font-size: 15px;
    color: #E0FBFC;
    font-weight: 600;
}

/* Barra del Presentador Don Cheto */
.rme-host-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(90deg, rgba(228,0,124,0.9) 0%, rgba(114,9,183,0.9) 100%);
    border: 2px solid #FFD166;
    border-radius: 16px;
    padding: 10px 18px;
    text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.rme-host-avatar {
    font-size: 34px;
    background: #FFD166;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.rme-host-speech {
    font-size: 15px;
    line-height: 1.4;
}

.rme-host-name {
    color: #FFD166;
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* TABLERO DE LETRAS ESTILO TV */
.rme-puzzle-stage {
    margin: 18px 0;
}

.rme-category-pill-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: -14px;
    position: relative;
    z-index: 3;
}

.rme-category-pill {
    background: linear-gradient(135deg, #FFB703 0%, #FB8500 100%);
    color: #102542;
    font-weight: 900;
    font-size: 14px;
    padding: 6px 22px;
    border-radius: 30px;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    text-transform: uppercase;
}

.rme-difficulty-pill {
    background: #E4007C;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 30px;
    border: 2px solid #FFD166;
}

.rme-board-frame {
    background: linear-gradient(180deg, #007F5F 0%, #004B23 100%);
    border: 8px solid #FFD166;
    border-radius: 22px;
    padding: 28px 18px 22px 18px;
    box-shadow:
        0 12px 30px rgba(0,0,0,0.5),
        inset 0 0 25px rgba(0,0,0,0.65);
    position: relative;
}

.rme-letter-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.rme-board-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.rme-tile {
    width: clamp(26px, 5.2vw, 52px);
    height: clamp(36px, 6.2vw, 64px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(16px, 3vw, 30px);
    transition: transform 0.35s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
}

/* Casilla verde vacía del tablero TV */
.rme-tile-empty {
    background: #005F40;
    border: 2px solid rgba(255, 209, 102, 0.35);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

/* Casilla blanca activa con letra oculta */
.rme-tile-hidden {
    background: linear-gradient(145deg, #FFFDF7, #E9ECEF);
    border: 3px solid #102542;
    box-shadow: 0 4px 0 #0B192C;
    color: transparent;
}

/* Casilla iluminada en dorado antes de voltear (Efecto TV) */
.rme-tile-lit {
    background: #FFD166 !important;
    border-color: #E4007C !important;
    box-shadow: 0 0 20px #FFD166, 0 0 35px #E4007C !important;
    transform: scale(1.08);
}

/* Casilla con letra revelada */
.rme-tile-revealed {
    background: #FFFFFF;
    border: 3px solid #E4007C;
    color: #102542;
    box-shadow: 0 4px 0 #9B0054;
    animation: rmeFlipIn 0.4s ease forwards;
}

@keyframes rmeFlipIn {
    0%   { transform: rotateY(90deg) scale(0.9); }
    100% { transform: rotateY(0deg) scale(1); }
}

.rme-clue-box {
    margin-top: 12px;
    background: rgba(16, 37, 66, 0.85);
    border: 2px dashed var(--rme-gold);
    border-radius: 12px;
    padding: 10px 16px;
    text-align: center;
    font-size: 15px;
}

.rme-clue-icon {
    color: var(--rme-gold);
    font-weight: 800;
    margin-right: 6px;
}

/* PODIOS DE JUGADORES */
.rme-scoreboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.rme-podium-card {
    background: rgba(16, 37, 66, 0.8);
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
}

.rme-podium-active {
    border-color: #FFD166;
    background: linear-gradient(135deg, rgba(228,0,124,0.35) 0%, rgba(255,183,3,0.25) 100%);
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.45);
    transform: translateY(-3px);
}

.rme-podium-turn-tag {
    position: absolute;
    top: -11px;
    left: 14px;
    background: #FFD166;
    color: #102542;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.rme-podium-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rme-podium-Null-avatar {
    font-size: 28px;
}

.rme-podium-name {
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    display: block;
}

.rme-podium-bank {
    font-size: 12px;
    color: #A8DADC;
}

.rme-podium-money {
    font-family: 'Fredoka', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #FFD166;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ARENA PRINCIPAL: RULETA + TECLADO */
.rme-main-arena {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 26px;
    align-items: start;
}

@media (max-width: 960px) {
    .rme-main-arena {
        grid-template-columns: 1fr;
    }
}

.rme-wheel-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rme-wheel-container {
    position: relative;
    width: 100%;
    max-width: 430px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rme-wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 12px 35px rgba(0,0,0,0.6), 0 0 0 8px #FFD166, 0 0 0 14px #E4007C;
}

.rme-wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    z-index: 5;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.65));
    line-height: 1;
}

.rme-wheel-center-btn {
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFD166 0%, #FB8500 100%);
    border: 5px solid #fff;
    color: #102542;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 4;
}

.rme-wheel-center-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 0 24px #FFD166;
}

.rme-wheel-center-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.rme-wheel-status-card {
    margin-top: 18px;
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #FFD166;
    border-radius: 14px;
    padding: 10px 16px;
    text-align: center;
}

.rme-status-label {
    font-size: 12px;
    color: #A8DADC;
    display: block;
    font-weight: 700;
}

.rme-spin-result-value {
    font-size: 22px;
    color: #FFD166;
    font-weight: 900;
}

/* COLUMNA DERECHA: BOTONES Y TECLADO */
.rme-controls-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rme-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.rme-btn {
    padding: 13px 16px;
    border-radius: 12px;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rme-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.rme-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.rme-btn-spin {
    background: linear-gradient(135deg, #E4007C 0%, #B5179E 100%);
    box-shadow: 0 5px 0 #7B0041;
}

.rme-btn-vowel {
    background: linear-gradient(135deg, #00B4D8 0%, #0077B6 100%);
    box-shadow: 0 5px 0 #03045E;
}

.rme-btn-solve {
    background: linear-gradient(135deg, #00A86B 0%, #007F5F 100%);
    box-shadow: 0 5px 0 #004B23;
}

.rme-btn-new-round {
    background: linear-gradient(135deg, #FFB703 0%, #FB8500 100%);
    color: #102542;
    box-shadow: 0 5px 0 #9A5B00;
}

/* Teclados de Consonantes y Vocales */
.rme-keyboard-box {
    background: rgba(0, 0, 0, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 14px;
}

.rme-vowels-box {
    border-color: rgba(0, 180, 216, 0.45);
}

.rme-keyboard-header {
    font-size: 12px;
    font-weight: 800;
    color: #FFD166;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rme-keyboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rme-key-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #FFD166;
    background: #102542;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 3px 0 #081221;
    transition: all 0.15s ease;
}

.rme-key-btn:hover:not(:disabled) {
    background: var(--rme-pink);
    border-color: #fff;
    transform: translateY(-2px);
}

.rme-key-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rme-key-correct {
    background: #00A86B !important;
    border-color: #A7F3D0 !important;
    color: #fff !important;
    opacity: 0.85 !important;
}

.rme-key-wrong {
    background: #4A1525 !important;
    border-color: #991B1B !important;
    color: #F87171 !important;
    text-decoration: line-through;
}

/* Tarjeta de Premio Especial */
.rme-prize-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(90deg, rgba(255,183,3,0.2) 0%, rgba(228,0,124,0.25) 100%);
    border: 2px solid #FFD166;
    border-radius: 14px;
    padding: 12px 16px;
}

.rme-prize-icon {
    font-size: 32px;
}

.rme-prize-label {
    font-size: 11px;
    font-weight: 800;
    color: #FFD166;
    letter-spacing: 0.7px;
}

.rme-prize-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

/* MODALES */
.rme-modal {
    position: absolute;
    inset: 0;
    background: rgba(10, 21, 38, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.rme-modal-card {
    background: linear-gradient(160deg, #1D3557 0%, #0F1E36 100%);
    border: 4px solid #FFD166;
    border-radius: 22px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.rme-modal-card h3 {
    margin: 0 0 10px 0;
    color: #FFD166;
    font-size: 24px;
    font-weight: 900;
}

.rme-solve-input,
.rme-input-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #FFD166;
    background: #fff;
    color: #102542;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
}

.rme-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.rme-btn-confirm-solve,
.rme-btn-save-score,
.rme-btn-next-round {
    background: #E4007C;
    border: 2px solid #FFD166;
}

.rme-btn-cancel-modal {
    background: #475569;
}

.rme-win-confetti-badge {
    font-size: 46px;
    margin-bottom: 6px;
}

.rme-win-phrase-display {
    background: #007F5F;
    color: #FFD166;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 1px;
}

.rme-win-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 10px;
    margin: 14px 0;
    font-size: 15px;
}

.rme-winner-form {
    background: rgba(255,255,255,0.06);
    padding: 16px;
    border-radius: 14px;
    margin-top: 14px;
}

.rme-winner-form h4 {
    margin: 0 0 10px 0;
    color: #FFD166;
}

.rme-confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}
