/* ============================================
   DILEMAS VIRALES - REDISEÑO VIRAL
   Estilo: Dark glitch, neon, cinematic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@400;600;700&family=Share+Tech+Mono&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080604;
    --bg2: #110e08;
    --card: #141008;
    --red: #ff6a00;
    --red2: #ff8c38;
    --green: #39ff14;
    --purple: #c77dff;
    --blue: #00d4ff;
    --yellow: #ffd60a;
    --text: #f5ede0;
    --muted: #7a6a55;
    --border: rgba(255,160,60,0.1);
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --timer-duration: 5s;
}

html { font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para móvil */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    touch-action: manipulation; /* Optimizar para touch */
}

/* ---- EFECTOS DE FONDO ---- */
canvas#particleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
}

.scanlines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.15) 2px,
        rgba(0,0,0,0.15) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

/* ---- CONTENEDOR PRINCIPAL ---- */
.game-container {
    width: 100%;
    max-width: 480px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* ---- HEADER ---- */
.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

/* Efecto glitch en el logo */
.glitch-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--text);
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 2px;
}

.glitch-text::before {
    color: var(--red);
    animation: glitch1 4s infinite;
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
}

.glitch-text::after {
    color: var(--yellow);
    animation: glitch2 4s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
}

@keyframes glitch1 {
    0%, 95% { transform: translate(0); opacity: 0; }
    96% { transform: translate(-3px, 1px); opacity: 0.8; }
    97% { transform: translate(2px, -1px); opacity: 0.8; }
    100% { transform: translate(0); opacity: 0; }
}

@keyframes glitch2 {
    0%, 93% { transform: translate(0); opacity: 0; }
    94% { transform: translate(3px, -1px); opacity: 0.8; }
    95% { transform: translate(-2px, 1px); opacity: 0.8; }
    100% { transform: translate(0); opacity: 0; }
}

.logo-sub {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 1px;
    margin-top: 2px;
}

.stats {
    display: flex;
    gap: 0.6rem;
}

.stat-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--green);
}

.streak-pill {
    color: var(--red);
}

/* ---- ÁREA DE JUEGO ---- */
.game-area {
    width: 100%;
    background: linear-gradient(160deg, #141008 0%, #0d0a05 100%);
    border: 1px solid rgba(255,106,0,0.12);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 0 60px rgba(255,106,0,0.06), 0 30px 80px rgba(0,0,0,0.6);
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* Línea de acento superior */
.game-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), var(--yellow), transparent);
}

.hidden { display: none !important; }

/* ---- PANTALLA DE INICIO ---- */
.start-screen {
    text-align: center;
    animation: fadeUp 0.5s ease-out;
}

.start-badge {
    display: inline-block;
    background: rgba(232, 35, 58, 0.15);
    border: 1px solid rgba(232, 35, 58, 0.4);
    color: var(--red2);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.start-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.start-title .highlight {
    color: var(--red);
    text-shadow: 0 0 20px rgba(232, 35, 58, 0.6);
}

.start-sub {
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.start-tags {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.start-tags span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.start-warning {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 1rem;
    letter-spacing: 0.5px;
}

/* ---- PANTALLA DE DILEMA ---- */
.dilemma-screen {
    animation: slideRight 0.3s ease-out;
}

/* Timer */
.timer-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.timer-container {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--green) 0%, var(--yellow) 60%, var(--red) 100%);
    border-radius: 3px;
    transform-origin: left;
}

.timer-bar.active {
    animation: timerCountdown var(--timer-duration) linear forwards;
}

.timer-bar.paused {
    animation-play-state: paused;
}

@keyframes timerCountdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.timer-countdown {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    min-width: 12px;
    text-align: right;
}

/* Número de dilema */
.dilemma-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--red);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.dilemma-content {
    margin-bottom: 1.75rem;
}

.dilemma-question {
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    animation: questionAppear 0.4s ease-out;
}

@keyframes questionAppear {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Contador de revelación de opciones */
.reveal-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0;
    animation: fadeUp 0.3s ease-out;
}

.reveal-countdown.hidden {
    display: none !important;
}

.reveal-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--red);
    letter-spacing: 4px;
    animation: pulseText 1s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.reveal-dots {
    display: flex;
    gap: 0.5rem;
}

.reveal-dots span {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: dotPulse 0.6s ease-in-out infinite;
}

.reveal-dots span:nth-child(2) { animation-delay: 0.15s; }
.reveal-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px var(--red); }
}

/* Opciones */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: optionsReveal 0.5s ease-out;
}

.options-container.hidden {
    display: none !important;
}

@keyframes optionsReveal {
    0% { opacity: 0; transform: translateY(20px) scale(0.98); }
    60% { transform: translateY(-3px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.vs-divider {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--red);
    letter-spacing: 3px;
    padding: 0.4rem 0;
    position: relative;
}

.vs-divider::before,
.vs-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border);
}

.vs-divider::before { left: 0; }
.vs-divider::after { right: 0; }

.option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,35,58,0.08), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.option-btn:hover {
    border-color: rgba(232, 35, 58, 0.5);
    background: rgba(232,35,58,0.06);
    transform: translateX(4px);
}

.option-btn:hover::before { opacity: 1; }

.option-btn:active {
    transform: translateX(2px) scale(0.99);
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(232,35,58,0.4);
}

.option-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

/* Seleccionado / no seleccionado */
.option-btn.selected {
    border-color: var(--green);
    background: rgba(0, 255, 136, 0.07);
    transform: translateX(4px);
    box-shadow: 0 0 20px rgba(0,255,136,0.15);
}

.option-btn.selected .option-label {
    background: var(--green);
    color: #000;
    animation: labelPop 0.3s ease-out;
}

.option-btn.unselected {
    opacity: 0.35;
    filter: grayscale(0.6);
}

@keyframes labelPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ---- PANTALLA DE RESULTADO NORMAL ---- */
.result-screen {
    text-align: center;
    animation: fadeUp 0.3s ease-out;
}

.result-badge {
    display: inline-block;
    background: rgba(255, 214, 10, 0.1);
    border: 1px solid rgba(255,214,10,0.3);
    color: var(--yellow);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.percentage-display {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--red);
    text-shadow: 0 0 30px rgba(232,35,58,0.5);
    margin-bottom: 0.25rem;
    animation: popIn 0.5s ease-out;
}

.result-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    letter-spacing: 1px;
}

.sarcastic-response {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    font-style: italic;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border-left: 3px solid var(--red);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    animation: slideRight 0.4s ease-out 0.2s both;
}

.sarcastic-response[data-categoria="sarcastico"] { border-left-color: #ff9f43; }
.sarcastic-response[data-categoria="psicologico"] { border-left-color: var(--purple); }
.sarcastic-response[data-categoria="provocador"] { border-left-color: var(--red2); }
.sarcastic-response[data-categoria="humorAcido"] { border-left-color: var(--blue); }
.sarcastic-response[data-categoria="analisis"] { border-left-color: var(--green); }

.psychological-insight {
    font-size: 0.95rem;
    color: var(--purple);
    font-weight: 600;
    padding: 0.7rem 1rem;
    background: rgba(155, 93, 229, 0.1);
    border: 1px solid rgba(155, 93, 229, 0.3);
    border-radius: 10px;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    animation: fadeUp 0.5s ease-out;
}

.milestone-message {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    background: rgba(232,35,58,0.08);
    border: 1px solid rgba(232,35,58,0.25);
    border-radius: 10px;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    animation: fadeUp 0.5s ease-out;
}

.insight-animate, .milestone-animate {
    animation: fadeUp 0.5s ease-out;
}

/* ---- BOTONES PRINCIPALES ---- */
.btn-primary {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(232,35,58,0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(232,35,58,0.55);
}

.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(-1px); }

/* ---- PANTALLA PSICOLÓGICA VIRAL ---- */
.psych-result-screen {
    text-align: center;
    animation: fadeUp 0.4s ease-out;
    position: relative;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.psych-header {
    margin-bottom: 0.5rem;
}

.psych-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--red);
    text-transform: uppercase;
}

.psych-eres-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--muted);
    letter-spacing: 4px;
    margin-bottom: 0.3rem;
}

.psych-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.psych-emoji {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 12px rgba(232,35,58,0.5));
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.psych-archetype-block {
    text-align: left;
}

.psych-archetype {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: 2px;
    color: var(--text);
    text-shadow: 0 0 20px rgba(232,35,58,0.3);
}

.psych-archetype-sub {
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: 2px;
    color: var(--red);
    text-shadow: 0 0 30px rgba(232,35,58,0.5);
}

/* Barras psicológicas */
.psych-bars-container {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.psych-bar-row {
    display: grid;
    grid-template-columns: 60px 1fr 44px;
    align-items: center;
    gap: 0.6rem;
}

.psych-bar-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
    text-align: right;
}

.psych-bar-track {
    height: 20px;
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.psych-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.psych-bar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 3px; height: 100%;
    background: rgba(255,255,255,0.4);
    border-radius: 0 4px 4px 0;
}

.psych-bar-caos { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.psych-bar-ego { background: linear-gradient(90deg, #6c3483, #9b59b6); }
.psych-bar-logica { background: linear-gradient(90deg, #1a5276, #00cfff); }
.psych-bar-emocional { background: linear-gradient(90deg, #1e8449, #00ff88); }

.psych-bar-pct {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

.psych-description {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-weight: 600;
}

.psych-traits {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    text-align: left;
}

.psych-trait {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.psych-cta-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.psych-cta-text strong { color: var(--red); }

.psych-site {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green);
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
}

.psych-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-share {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(232,35,58,0.4);
    animation: sharePulse 2s ease-in-out infinite;
}

@keyframes sharePulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(232,35,58,0.4); }
    50% { box-shadow: 0 8px 32px rgba(232,35,58,0.7), 0 0 0 4px rgba(232,35,58,0.1); }
}

.btn-share:hover {
    transform: translateY(-2px);
    animation: none;
    box-shadow: 0 12px 32px rgba(232,35,58,0.6);
}

.btn-continue {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-continue:hover {
    border-color: rgba(255,255,255,0.3);
    color: var(--text);
}

/* ---- TOAST ---- */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--green);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ---- ANIMACIONES ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.7); }
    70% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

/* ---- RESPONSIVE MÓVIL ---- */
@media (max-width: 480px) {
    html { font-size: 18px; } /* 🔥 Base grande para móvil */
    .game-container { padding: 0.75rem; height: 100vh; height: 100dvh; }
    .game-area { padding: 1.25rem; }
    .glitch-text, .glitch-text::before, .glitch-text::after { font-size: 1.3rem; }
    .start-title { font-size: 2.4rem; }
    
    /* 🔥 Pregunta legible 24px */
    .dilemma-question { 
        font-size: 1.5rem; 
        line-height: 1.4;
        margin-bottom: 1.25rem;
    }
    
    /* 🔥 Botones grandes para zona de pulgar */
    .option-btn {
        padding: 1.15rem 1.1rem;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 64px;
    }
    
    .option-label {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
    
    .option-text {
        font-size: 1.05rem;
        line-height: 1.35;
    }
    
    /* 🔥 Botones de acción más grandes */
    .btn-compare, .btn-download, .btn-next {
        padding: 1.1rem;
        font-size: 1.1rem;
        min-height: 56px;
    }
    
    /* 🔥 Espaciado compacto */
    .dilemma-header { margin-bottom: 1rem; }
    .options-container { gap: 0.75rem; }
    
    /* 🔥 Pantalla de análisis ajustada */
    .analyzing-screen {
        min-height: 350px;
        padding: 1.5rem 1rem;
    }
    
    .analyzing-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .analyzing-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .analyzing-sub {
        font-size: 0.8rem;
    }
    
    .analyzing-dots span {
        width: 8px;
        height: 8px;
    }
    
    .percentage-display { font-size: 4rem; }
    
    /* 🔥 Resultado psicológico ajustado */
    .psych-result-screen {
        padding: 0.5rem 0;
        justify-content: flex-start;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .psych-badge-exclusive {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .psych-archetype { 
        font-size: 1.4rem; 
        line-height: 1.1;
        margin-bottom: 0.3rem;
    }
    
    .psych-archetype-sub { 
        font-size: 1.8rem; 
        line-height: 1.1;
    }
    
    .psych-emoji { 
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .psych-title-wrap {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .psych-archetype-block {
        text-align: center;
        width: 100%;
    }
    
    .psych-bars-container {
        width: 100%;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .psych-bar-row {
        grid-template-columns: 50px 1fr 40px;
        gap: 0.5rem;
    }
    
    .psych-bar-label {
        font-size: 0.65rem;
    }
    
    .psych-bar-pct {
        font-size: 0.65rem;
    }
    
    .psych-description {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 0 0.5rem;
        margin-bottom: 0.8rem;
    }
    
    .psych-traits {
        font-size: 0.8rem;
        padding: 0 0.5rem;
        margin-bottom: 0.8rem;
    }
    
    .psych-cta {
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .cta-text {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .psych-site {
        font-size: 0.8rem;
    }
    
    .psych-actions {
        padding: 0 0.5rem;
        gap: 0.8rem;
    }
    
    .btn-compare {
        font-size: 0.9rem;
        padding: 0.9rem;
        min-height: 50px;
    }
    
    .btn-download {
        font-size: 0.9rem;
        padding: 0.9rem;
        min-height: 50px;
    }
    
    .btn-continue-small {
        font-size: 0.9rem;
        padding: 0.9rem;
        min-height: 50px;
    }
}

/* ---- RESPONSIVE TABLETS ---- */
@media (max-width: 768px) and (min-width: 481px) {
    .psych-result-screen {
        padding: 1rem 0;
        justify-content: flex-start;
    }
    
    .psych-archetype { 
        font-size: 1.8rem; 
        line-height: 1.1;
    }
    
    .psych-archetype-sub { 
        font-size: 2.4rem; 
        line-height: 1.1;
    }
    
    .psych-emoji { 
        font-size: 2.5rem;
    }
    
    .psych-title-wrap {
        gap: 0.8rem;
        margin-bottom: 1.2rem;
        padding: 0 1rem;
    }
    
    .psych-bars-container {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }
    
    .psych-description {
        font-size: 1rem;
        padding: 0 1rem;
        margin-bottom: 1.2rem;
    }
    
    .psych-traits {
        font-size: 0.9rem;
        padding: 0 1rem;
        margin-bottom: 1.2rem;
    }
    
    .psych-cta {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }
    
    .psych-actions {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .share-buttons-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 360px) {
    html { font-size: 16px; }
    .game-area { padding: 1rem; }
    .dilemma-question { font-size: 1.35rem; }
    .option-btn {
        padding: 1rem;
        min-height: 60px;
    }
    .start-title { font-size: 2rem; }
    
    /* Extra small screen adjustments */
    .psych-archetype { font-size: 1.2rem; }
    .psych-archetype-sub { font-size: 1.6rem; }
    .psych-emoji { font-size: 1.8rem; }
    
    .psych-bar-row {
        grid-template-columns: 45px 1fr 35px;
        gap: 0.4rem;
    }
    
    .psych-bar-label {
        font-size: 0.6rem;
    }
    
    .psych-bar-pct {
        font-size: 0.6rem;
    }
    
    .share-buttons-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .btn-share-twitter,
    .btn-share-whatsapp,
    .btn-share-facebook,
    .btn-share-copy {
        font-size: 0.8rem;
        padding: 0.6rem 0.7rem;
        min-height: 44px;
    }
}

/* ---- OPTIMIZACIONES ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ---- PANTALLA DE ANÁLISIS ---- */
.analyzing-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    width: 100%;
    padding: 2rem 1rem;
    animation: fadeUp 0.4s ease-out;
}

.analyzing-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(255,106,0,0.2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.analyzing-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--red);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    max-width: 100%;
    word-wrap: break-word;
}

.analyzing-sub {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.analyzing-dots {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.analyzing-dots span {
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: dotPulse 0.6s ease-in-out infinite;
}

.analyzing-dots span:nth-child(2) { animation-delay: 0.2s; }
.analyzing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ---- PRESIÓN SOCIAL EN RESULTADO ---- */
.social-proof {
    background: rgba(255,214,10,0.08);
    border: 1px solid rgba(255,214,10,0.3);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: fadeUp 0.5s ease-out 0.4s both;
}

.rarity-badge {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.rarity-pct {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--yellow);
    line-height: 1;
}

.rarity-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-text {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    font-style: italic;
}

.psych-badge-exclusive {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--red);
    background: rgba(232,35,58,0.1);
    border: 1px solid rgba(232,35,58,0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.psych-eres {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 3px;
    margin-bottom: 0.25rem;
}

.psych-cta {
    text-align: center;
    margin-bottom: 1rem;
}

.psych-cta .cta-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

/* ---- BOTONES VIRALES ---- */
.btn-compare {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(232,35,58,0.4);
    animation: comparePulse 2s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes comparePulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(232,35,58,0.4); }
    50% { box-shadow: 0 8px 32px rgba(232,35,58,0.6), 0 0 0 4px rgba(232,35,58,0.1); }
}

.btn-compare:hover {
    transform: translateY(-2px);
    animation: none;
    box-shadow: 0 12px 32px rgba(232,35,58,0.55);
}

.btn-download {
    width: 100%;
    padding: 0.9rem;
    background: rgba(255,255,255,0.08);
    border: 2px dashed var(--muted);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.btn-download:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(57,255,20,0.05);
}

.btn-continue-small {
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-continue-small:hover {
    color: var(--text);
}

/* ============================================
   SISTEMA DE NIVELES Y LOGROS
   ============================================ */
.level-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 106, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    backdrop-filter: blur(10px);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.level-display {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: #95a5a6;
    text-shadow: 0 0 10px currentColor;
}

.level-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.level-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--red) 0%, var(--red2) 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

.level-stats {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
}

/* Notificaciones de nivel y logros */
.level-up-notification,
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--red);
    border-radius: 15px;
    padding: 2rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 50px rgba(255, 106, 0, 0.5);
}

.level-up-notification.show,
.achievement-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-up-content,
.achievement-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.level-icon,
.achievement-icon {
    font-size: 3rem;
    animation: bounce 1s infinite;
}

.level-text,
.achievement-text {
    flex: 1;
}

.level-title,
.achievement-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.level-name,
.achievement-name {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.level-progress,
.achievement-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--muted);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Pantalla de resultado compartido */
.shared-result-screen {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    border: 1px solid var(--red);
    backdrop-filter: blur(20px);
}

.shared-badge {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shared-archetype {
    margin: 2rem 0;
}

.archetype-display {
    background: rgba(255, 106, 0, 0.1);
    border: 1px solid var(--red);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.archetype-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.archetype-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--red);
    margin-bottom: 0.5rem;
}

.archetype-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.archetype-rarity {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- BOTONES DE COMPARTIR ESPECÍFICOS ---- */
.share-buttons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin: 1.5rem 0;
    width: 100%;
}

.btn-share-twitter,
.btn-share-whatsapp,
.btn-share-facebook,
.btn-share-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-share-twitter:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1DA1F2;
    color: #1DA1F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.btn-share-whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
    border-color: #25D366;
    color: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-share-facebook:hover {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877F2;
    color: #1877F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-share-copy:hover {
    background: rgba(255, 106, 0, 0.2);
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.btn-share-twitter:active,
.btn-share-whatsapp:active,
.btn-share-facebook:active,
.btn-share-copy:active {
    transform: translateY(0);
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .share-buttons-container {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .btn-share-twitter,
    .btn-share-whatsapp,
    .btn-share-facebook,
    .btn-share-copy {
        font-size: 0.85rem;
        padding: 0.7rem 0.8rem;
    }
}
/* ---- PANTALLA DE RETO COMPARTIDO ---- */
.shared-result-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0.5rem 0;
    animation: fadeInUp 0.4s ease;
}

.shared-badge {
    background: linear-gradient(90deg, var(--red), var(--yellow));
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

.shared-intro {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 600;
}

.shared-archetype-card {
    background: rgba(255, 106, 0, 0.06);
    border: 1px solid rgba(255, 106, 0, 0.25);
    border-radius: 14px;
    padding: 1.25rem 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.shared-emoji {
    font-size: 3rem;
    line-height: 1;
}

.shared-titulo {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--red);
    letter-spacing: 2px;
    line-height: 1;
}

.shared-sub {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--yellow);
    letter-spacing: 3px;
    line-height: 1;
}

.shared-rarity {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.shared-rarity strong {
    color: var(--yellow);
}

.shared-challenge {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

.shared-challenge strong {
    color: var(--red);
}

.shared-cta-btn {
    width: 100%;
}

.shared-footnote {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 1px;
}