/* single-dilema.css - Centralized Styles for Ethical Dilemmas */

/* General Background Styles */
body,
body.single-dilemas {
    background: url('../images/fondo_juego.webp') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
    display: block;
    font-family: 'Geist', sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* UNIVERSAL FIXED WRAPPERS - High Priority */
#welcome-box,
#instructions-box,
#game-container,
#modal-feedback>div,
#modal-certificate>div {
    width: 1250px !important;
    height: 700px !important;
    max-width: 1250px !important;
    max-height: 700px !important;
    margin: 0 auto !important;
    position: absolute !important;
    top: 45% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    border-radius: 50px !important;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4) !important;
    background: #5636e3;
    background: url('../images/fondo_modal.webp');
    display: none;
    z-index: 50;
    background-size: cover;
    will-change: transform;
    backface-visibility: hidden;
}

#welcome-box {
    background: none !important;
    overflow: hidden !important;
}

#game-container {
    overflow: hidden !important;
}

#instructions-box {
    overflow: visible !important;
}

#welcome-box:not(.hidden),
#instructions-box:not(.hidden),
#game-container:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SUPPORT MODAL: Small floating dialog, NOT full-screen */
#modal-support>div {
    width: auto !important;
    height: auto !important;
    max-width: 450px !important;
    max-height: none !important;
    min-height: auto !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    background: white !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem !important;
    text-align: center !important;
}

.h-full {
    height: 100% !important;
}

.w-full {
    width: 100% !important;
}

.app-master-wrapper {
    min-height: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-loader {
    width: 1250px;
    height: 700px;
    background: linear-gradient(135deg, #5636e3 0%, #6366f1 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    color: white;
    padding: 60px;
}

.playful-dots {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.playful-dots .dot {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    animation: playful-jump 0.6s infinite alternate cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.playful-dots .dot:nth-child(2) {
    animation-delay: 0.15s;
}

.playful-dots .dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes playful-jump {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translateY(-30px) scale(1.1);
        opacity: 1;
    }
}

#game-loader .loading-title {
    font-family: 'Geist', sans-serif;
    font-weight: 900;
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: text-pulse 1.5s infinite ease-in-out;
}

#game-loader .loading-text {
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    opacity: 0.8;
    text-align: center;
}

@keyframes text-pulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.platform-card {
    background-color: #5636e3;
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    background: url('../images/fondo_login_box_new.webp') center center / cover no-repeat !important;
    position: relative;
    height: 100%;
    width: 100% !important;
    border-radius: 40px !important;
}

.platform-card .left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    position: relative;
    margin-left: 10%;
    transition: all 0.3s ease;
}

.platform-card.no-video {
    justify-content: center !important;
    text-align: center !important;
}

.platform-card.no-video .left-side {
    margin-left: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 800px !important;
}

.platform-card.no-video .platform-form {
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.platform-card.no-video .platform-input {
    text-align: center !important;
}

.platform-card.no-video .platform-form p.instruction {
    text-align: center !important;
}

.platform-card .right-side {
    flex: 0.6;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
}

.platform-card .fge-logo-top {
    position: absolute;
    top: 110px;
    left: 60px;
}

.platform-card .fge-logo-top img {
    height: 35px;
    width: auto;
    display: block;
}

.inicia-label {
    text-align: center;
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    padding-bottom: 4px;
    line-height: 1;
    opacity: 1;
    letter-spacing: 0.2px;
}

.fge-logo-top .inicia-label {
    color: #ffffff;
}

.corner-fge-logo .inicia-label {
    color: #2563eb;
    text-align: center;
}

.platform-card .org-logo-leaf {
    background:transparent;
    color: #1e293b;
    padding: 15px;
    position: absolute;
    top: 65px;
    right: 85px;
    width: 128px;
    height: 128px;
    border-radius: 45px 0 45px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.platform-card .title-group {
    margin: 0px 0 30px 0;
}

.platform-card h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 0.85;
    margin: 0;
    text-transform: lowercase;
    letter-spacing: -3px;
}

.title-group h1 {
    font-family: 'Geist', sans-serif;
    font-size: 4.8rem;
    margin: 0;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -3px;
    color: #ffffff;
}

.pre-title {
    font-family: 'Geist', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
    display: block;
    text-transform: lowercase;
}

@media (max-width: 1024px) {
    .platform-card {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 60px 30px;
        gap: 40px;
        max-width: 95%;
    }

    .platform-card .left-side {
        margin-left: 0 !important;
        padding-top: 40px;
    }

    .platform-card .right-side {
        flex: none;
        width: 100%;
        max-width: 600px;
    }

    .platform-card .org-logo-leaf {
        top: 20px;
        right: 20px;
        width: 100px;
        height: 80px;
        border-radius: 35px 0 35px 0;
    }

    .platform-card .fge-logo-top {
        top: 25px;
        left: 30px;
    }

    .platform-card .fge-logo-top img {
        height: 35px;
    }
}

.platform-card .pre-title {
    display: block;
    text-transform: none;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.platform-card .balance-header {
    width: 250px;
    height: 150px;
    margin-bottom: -10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.platform-form {
    width: 100%;
    max-width: 380px;
}

.platform-form p.instruction {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.9;
    font-weight: 500;
}

.video-wrapper-new {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: #1e293b;
    aspect-ratio: 16/9;
}

input#user-email {
    width: 100%;
    padding: 10px 24px;
    border-radius: 5px;
    border: none;
    background: white;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0px;
    outline: none;
}

.platform-input::placeholder {
    color: #94a3b8;
}

select#user-area.platform-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 5px;
    border: none;
    background: white;
    color: #94a3b8;
    font-size: 1rem;
    font-family: 'Geist', 'Inter', sans-serif;
    margin-bottom: 0px;
    margin-top: 6px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

select#user-area.platform-input:focus {
    box-shadow: 0 0 0 3px rgba(86, 54, 227, 0.25);
}

select#user-area.platform-input option[value=""] {
    color: #94a3b8;
}

.platform-btn {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    border: none;
    background-color: #FDE047;
    color: #1e293b;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
    margin-top:20px;
}

.platform-btn:hover {
    background-color: #FACC15;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 20px rgba(250, 204, 21, 0.4);
}

.platform-btn:active {
    transform: translateY(0) scale(0.98);
}

.platform-card .decorative-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    animation: fadeInDots 2s forwards 0.5s;
}

.decorative-dots circle {
    opacity: 0;
    animation: twinkle var(--duration, 4s) infinite ease-in-out;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeInDots {
    to {
        opacity: 1;
    }
}

p#feedback-rating-error {
    color: #EF4444 !important;
    background: #FEF2F2;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    animation: errorEnter 0.3s ease-out;
}

@keyframes errorEnter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* DEFINITIVE BALANCE STYLE (Option 1 Refined) */
.balance-header {
    width: 285px;
    margin-top: -65px;
    height: 200px;
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.op1-main .balance-glow {
    animation: none;
    opacity: 1;
}

.op1-main .scale-move {
    animation: scale-tilt-final 4s infinite ease-in-out;
    transform-origin: 100px 70px;
}

@keyframes scale-tilt-final {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.op1-main .ball-rolling {
    animation: ball-roll-final 4s infinite ease-in-out;
}

@keyframes ball-roll-final {

    0%,
    100% {
        transform: translateX(60px);
    }

    50% {
        transform: translateX(-60px);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.1;
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10px, -15px) scale(1.2);
    }

    66% {
        transform: translate(-15px, 10px) scale(0.8);
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes scale-tilt {

    0%,
    100% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }
}

.balance-scale-group {
    animation: scale-tilt 4s infinite ease-in-out;
    transform-origin: 100px 65px;
}

.balance-ball {
    animation: ball-sway 4s infinite ease-in-out;
    transform-origin: 100px 38px;
}

@keyframes ball-sway {

    0%,
    100% {
        transform: translateX(-35px);
    }

    50% {
        transform: translateX(35px);
    }
}

#instructions-box.hidden {
    display: none !important;
}

.instructions-card {
    border-radius: 40px;
    width: 100%;
    max-width: 1100px;
    padding: 60px;
    color: #1e293b;
    position: relative;
    text-align: center;
}

.instructions-card h2,
.dilemma-left h3 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.dilemma-case {
    background: #EBF2FA;
    border-radius: 20px;
    padding: 30px;
    color: #475569;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
    position: relative;
}

.question-text {
    color: #5636e3;
    font-size: 2.4rem;
    font-weight: 900;
    margin-top: 10px;
}

.balances-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.balance-visual {
    width: 180px;
    height: 120px;
}

.balance-label {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.label-carencia {
    background: #f59e0b;
}

.label-equilibrio {
    background: #10b981;
}

.label-exceso {
    background: #ef4444;
}

.info-box {
    padding: 25px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    height: 100%;
    border: 2px solid transparent;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.info-carencia {
    background: #fffcf0;
    border-color: #fde68a;
    color: #92400e;
}

.info-equilibrio {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.info-exceso {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.instructions-list-container {
    background: white;
    border-radius: 30px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.step-num {
    width: 36px;
    height: 36px;
    background: #5636e3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.step-text {
    font-size: 1.1rem;
    color: #475569;
    font-weight: 500;
    padding-top: 4px;
}

#btn-start-game {
    background: #fde047;
    color: #1e293b;
    padding: 20px 60px;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: 900;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(252, 211, 77, 0.3);
    margin-top: 20px;
}

#btn-start-game:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 50px rgba(252, 211, 77, 0.5);
    background-color: #facc15;
}

.instructions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.btn-skip {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.btn-skip:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #1e293b;
}

.fge-logo-instr {
    font-size: 2rem;
    font-weight: 900;
    color: #1e293b;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .balances-grid {
        grid-template-columns: 1fr;
    }

    .instructions-card {
        padding: 30px;
    }

    .instructions-card h2 {
        font-size: 1.8rem;
    }
}

.hidden {
    display: none !important;
}

body.game-active {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    background: url('../images/fondo_juego.webp') no-repeat center center fixed !important;
    background-size: cover !important;
}

.lang-row-integrated {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 8px 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 110;
}

.lang-label-mini {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

#global-mute-container button {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

#global-mute-container button:active {
    transform: scale(0.95);
}

.mute-btn-container {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 1000;
}

.mute-btn-container button {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    backdrop-filter: blur(12px) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(67, 56, 202, 0.4) !important;
}

.mute-btn-container button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(67, 56, 202, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
}

.mute-btn-container button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #6366f1;
    animation: audio-pulse 2s infinite;
    pointer-events: none;
}

@keyframes audio-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.corner-fge-logo {
    position: absolute;
    bottom: 40px;
    right: 50px;
    z-index: 50;
    pointer-events: none;
}

.corner-fge-logo img {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .corner-fge-logo {
        bottom: 25px;
        right: 25px;
    }

    .corner-fge-logo img {
        height: 30px;
    }

    /* En dilema-etico el logo FGE del juego se oculta: aparece solo en el footer */
    body.dilema-etico .corner-fge-logo {
        display: none !important;
    }
}

.mute-icon {
    font-size: 26px !important;
    transition: transform 0.3s ease !important;
}

.lang-selector-simple {
    display: flex;
    gap: 4px;
}

.lang-btn-simple {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 40px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn-simple:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn-simple.active {
    background: white;
    color: #5636e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#certificate-to-print {
    width: 800px;
    background: white;
    padding: 0;
    margin: 0;
    display: none;
    font-family: 'Geist', sans-serif;
}

.cert-inner {
    border: 20px solid #1e293b;
    padding: 60px;
    position: relative;
    background: white;
    min-height: 560px;
}

.cert-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 10px solid #facc15;
    z-index: 10;
}

.cert-tl {
    top: -10px;
    left: -10px;
    border-right: 0;
    border-bottom: 0;
}

.cert-tr {
    top: -10px;
    right: -10px;
    border-left: 0;
    border-bottom: 0;
}

.cert-bl {
    bottom: -10px;
    left: -10px;
    border-right: 0;
    border-top: 0;
}

.cert-br {
    bottom: -10px;
    right: -10px;
    border-left: 0;
    border-top: 0;
}

.light-ray-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.light-ray-effect-welcome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Modal Feedback Styles */
#modal-feedback {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.feedback-modal-content {
    background: white;
    border-radius: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: row;
    min-height: 550px;
}

.feedback-left {
    width: 50%;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
}

.feedback-right {
    width: 50%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.feedback-star-btn {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 1rem;
    border: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.2s;
    cursor: pointer;
}

.feedback-textarea {
    width: 100%;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: all 0.2s;
    resize: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-feedback-submit {
    width: 100%;
    background: #2563eb;
    color: white;
    font-weight: 900;
    padding: 1.25rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Modal Certificate Styles */
#modal-certificate {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cert-modal-content {
    background: white;
    border-radius: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: row;
    min-height: 500px;
}

.cert-left {
    width: 50%;
    background: #fefce8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #f1f5f9;
}

.cert-right {
    width: 50%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.btn-pdf-download {
    width: 100%;
    background: #fbbf24;
    color: #1e293b;
    font-weight: 900;
    padding: 1.25rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.btn-cert-email {
    width: 100%;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 900;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Footer Styles */
.footer-bar {
    margin: 10px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 30px;
    background: rgba(86, 54, 227, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    width: fit-content;
    max-width: 90%;
}

.footer-divider {
    opacity: 0.2;
    color: white;
    font-size: 14px;
}


.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s;
}

.footer-link:hover {
    color: white;
}

/* Support Modal */
.modal-support-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-support-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 15px 35px -8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.btn-support-send {
    width: 100%;
    background: #604BDE;
    color: white;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-close-round {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close-round:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: scale(1.15);
}

.modal-title {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.comment-input-wrapper {
    width: 100%;
    margin-bottom: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-label {
    font-size: 11px;
    font-weight: 900;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: left;
}

.star-rating-container {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.btn-skip-feedback {
    width: 100%;
    padding: 0.5rem;
    color: #94a3b8;
    font-weight: 700;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    text-align: center;
}

.feedback-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.cert-visual-wrapper {
    width: 6rem;
    height: 6rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feedback-visual-icon {
    font-size: 3.5rem;
}

.cert-visual-icon {
    font-size: 3.5rem;
}

.feedback-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* Legal Modal (Términos y Privacidad) */
.modal-legal-card {
    background: transparent;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    max-width: 680px;
    width: 100%;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px -12px rgba(86, 54, 227, 0.35), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal-legal-header {
    background: linear-gradient(135deg, #5636e3 0%, #7c6fcd 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.modal-legal-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-legal-header-icon .material-symbols-outlined {
    color: white;
    font-size: 20px;
    font-variation-settings: 'FILL' 1;
}

.modal-legal-title {
    flex: 1;
    color: white;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-legal-close {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.modal-legal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-legal-close .material-symbols-outlined {
    font-size: 16px;
}

.modal-legal-body {
    overflow-y: auto;
    flex: 1;
    background: white;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.75;
    padding: 1.5rem 1.75rem;
}

.modal-legal-body h1,
.modal-legal-body h2 {
    color: #5636e3;
    font-weight: 800;
    font-size: 0.95rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.4em;
    border-bottom: 1.5px solid #ede9fc;
}

.modal-legal-body h3 {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.88rem;
    margin-top: 1.1em;
    margin-bottom: 0.4em;
}

.modal-legal-body h1:first-child,
.modal-legal-body h2:first-child {
    margin-top: 0;
}

.modal-legal-body p {
    margin-bottom: 0.85em;
}

.modal-legal-body ul,
.modal-legal-body ol {
    padding-left: 1.4rem;
    margin-bottom: 0.85em;
}

.modal-legal-body li {
    margin-bottom: 0.3em;
}

.modal-legal-body a {
    color: #5636e3;
    text-decoration: underline;
}

.modal-legal-body strong {
    color: #1e293b;
    font-weight: 700;
}

.feedback-p {
    color: #334155;
    font-weight: 600;
    max-width: 280px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Dilema Ético (body.dilema-etico) · ≤ 768px
   Otros juegos NO se ven afectados
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* 1. Contenedores principales: dejar flujo normal, ancho 100% */
    body.dilema-etico #welcome-box,
    body.dilema-etico #instructions-box,
    body.dilema-etico #game-container {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    body.dilema-etico .app-master-wrapper {
        min-height: 0 !important;
        align-items: stretch !important;
        padding: 0 !important;
    }

    /* 2. Platform card: columna única, scroll vertical */
    body.dilema-etico .platform-card {
        flex-direction: column !important;
        padding: 60px 20px 30px !important;
        gap: 20px !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: auto !important;
        overflow-y: auto !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    /* 3. Left side: ancho completo */
    body.dilema-etico .platform-card .left-side {
        min-width: 0 !important;
        flex: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* 4. Right side (video): ancho completo debajo */
    body.dilema-etico .platform-card .right-side {
        width: 100% !important;
        flex: none !important;
    }

    body.dilema-etico #dilema-player-wrapper {
        margin-top: 0 !important;
    }

    /* 5. Balanza SVG: centrada y más pequeña */
    body.dilema-etico .platform-card .balance-header.op1-main {
        width: 280px !important;
        margin: 0 auto 10px !important;
    }
    select#user-area.platform-input {
        padding: 10px 20px;
    }

    /* 6. Puntos decorativos SVG: ocultar en mobile */
    body.dilema-etico .decorative-dots {
        display: none !important;
    }

    /* 7. Títulos: escala reducida */
    body.dilema-etico .platform-card h1,
    body.dilema-etico .title-group h1 {
        font-size: 3rem !important;
        letter-spacing: -2px !important;
    }

    /* 8. Logo FGE: reposicionar */
    body.dilema-etico .platform-card .fge-logo-top {
        top: 16px !important;
        left: 20px !important;
    }

    /* 9. Logo organización: circular igual que en pantallas interiores */
    body.dilema-etico .platform-card .org-logo-leaf {
        top: 14px !important;
        right: 16px !important;
        width: 68px !important;
        height: 68px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
    }

    body.dilema-etico .platform-card .org-logo-leaf img {
        transform: none !important;
        transform-origin: unset !important;
        border-radius: 50% !important;
    }

    /* 10. Selector de idioma: flujo normal debajo del botón Continuar */
    body.dilema-etico .lang-row-integrated {
        position: static !important;
        transform: none !important;
        left: auto !important;
        bottom: auto !important;
        margin: 8px auto 0 !important;
        align-self: center !important;
        order: 10 !important;
    }

    /* 11. Pantalla de carga "¡Genial!" */
    body.dilema-etico #game-loader {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        border-radius: 0 !important;
    }

    /* 12. Instrucciones: grid de balanzas → columna única */
    body.dilema-etico .balances-grid {
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
    }

    body.dilema-etico .balance-item {
        width: 100% !important;
        max-width: 340px !important;
    }

    /* 13. Instrucciones: reducir padding del card */
    body.dilema-etico .instructions-card {
        padding: 60px 16px 20px !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    /* 14. Botón "Omitir": flujo normal en vez de absoluto */
    body.dilema-etico #btn-skip-instructions {
        position: static !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 12px !important;
        width: 100% !important;
    }

    /* 15. Logo organización en instrucciones: ajustar posición */
    body.dilema-etico #instructions-box > div:first-child {
        top: 14px !important;
        left: 16px !important;
        zoom:0.7;
    }
    body.dilema-etico .balance-icon-small{
        zoom:0.5;
    }

}