﻿@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');
@import url('game_over.css');
@import url('menu_buttons.css');
@import url('ranking.css');

:root {
    --bg-dark: #050a1b;
    --primary-blue: #0f172a;
    --gold: linear-gradient(180deg, #ffdf00 0%, #d4af37 50%, #b8860b 100%);
    --gold-solid: #d4af37;
    --text-white: #ffffff;
    --accent-color: #fdbb2d;
    --hex-border: #4ecca3;
    --glow-soft: 0 0 15px rgba(78, 204, 163, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    overflow: hidden;
    /* Fondo con efecto de luces de estadio */
    background-image:
        url('../img/bg-pattern.png'),
        radial-gradient(circle at 50% -10%, rgba(78, 204, 163, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 100%, rgba(26, 42, 108, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 80% 100%, rgba(178, 31, 31, 0.2) 0%, transparent 60%);
    background-size: 150px, cover, cover, cover;
    background-blend-mode: overlay, normal, normal, normal;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    padding: 10px;
    padding-bottom: 90px;
    /* Espacio para la barra fija */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Start Screen Styles */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: var(--bg-dark);
    background-image:
        url('../img/bg-pattern.png'),
        radial-gradient(circle at 50% 50%, rgba(78, 204, 163, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 20% 100%, rgba(26, 42, 108, 0.3) 0%, transparent 60%);
    background-size: 150px, cover, cover;
    background-blend-mode: overlay, normal, normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    text-align: center;
    gap: 15px;
}

.hero-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.slogan-container {
    margin-top: -10px;
    padding: 0 10px;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: var(--gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    text-transform: uppercase;
    display: none;
    /* Opcional: el logo ya suele tener el nombre, pero lo dejo por si acaso */
}

.game-slogan {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.concept-badge {
    display: inline-block;
    background: rgba(78, 204, 163, 0.2);
    border: 1px solid var(--hex-border);
    color: var(--hex-border);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(78, 204, 163, 0.2);
}

.logo-container {
    width: 220px;
    height: 220px;
    margin-bottom: 20px;
    position: relative;
    animation: floating 3s ease-in-out infinite;
}

.logo-container img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.play-btn {
    background: linear-gradient(180deg, #7bed9f, #2ed573);
    border: 3px solid #ffffff;
    color: white;
    padding: 15px 10px;
    width: 100%;
    max-width: 280px;
    font-size: 1.8rem;
    font-weight: 900;
    cursor: pointer;
    clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
    box-shadow: 0 10px 30px rgba(46, 213, 115, 0.4);
    transition: all 0.3s;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 10px;
    display: block;
    text-align: center;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(46, 213, 115, 0.6);
}

.play-btn.btn-exit {
    background: linear-gradient(180deg, #2c3e50, #000000);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.play-btn.btn-exit:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.6);
}

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(78, 204, 163, 0.4);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    width: 95%;
    max-width: 380px;
    justify-content: space-around;
    transition: all 0.3s ease;
}

.nav-item {
    color: white;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.nav-icon {
    font-size: 1.5rem;
}

/* Player Setup Styles */
.setup-container {
    width: 100%;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 30px;
    border: 2px solid var(--hex-border);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.setup-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-transform: uppercase;
}

.input-container {
    margin-bottom: 30px;
    position: relative;
}

#player-name {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 10px 0;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

#player-name:focus {
    outline: none;
    border-bottom-color: var(--hex-border);
}

.selection-title {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.avatar-option {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid transparent;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.avatar-option.selected {
    border-color: var(--hex-border);
    background: rgba(78, 204, 163, 0.2);
    box-shadow: 0 0 15px var(--hex-border);
}

.back-link {
    display: block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.ranking-list {
    text-align: left;
    margin: 20px 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.ranking-name {
    flex-grow: 1;
    font-weight: 700;
}

.ranking-score {
    color: var(--accent-color);
    font-weight: 900;
}

.hidden {
    display: none !important;
}

/* Banner de Premio Dorado Hexagonal */
.prize-banner {
    background: var(--gold);
    color: #000;
    padding: 8px 30px;
    font-weight: 900;
    font-size: 1.1rem;
    text-align: center;
    clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
    margin: 170px auto 10px;
    width: 85%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

.lifelines {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.menu-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s;
}

.menu-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.player-current-info {
    position: absolute;
    top: 10px;
    left: 80px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    /* Transparente como en la imagen */
    padding: 0;
    border-radius: 0;
    border: none;
    font-size: 1rem;
    z-index: 20;
}

.presenter-container {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 180px;
    height: 180px;
    z-index: 25;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.presenter-container:hover {
    transform: scale(1.05);
}

#presenter-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: floatPresenter 6s ease-in-out infinite;
}

@keyframes floatPresenter {

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

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

.phase-text {
    position: absolute;
    top: 60px;
    right: 150px;
    background: #ffffff;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    z-index: 30;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 140px;
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timer-display {
    position: absolute;
    top: 130px;
    /* Centrado en el nuevo espacio libre */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 4rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow:
        0 0 15px rgba(255, 215, 0, 0.7),
        2px 2px 0px rgba(0, 0, 0, 0.5);
    font-family: 'Outfit', sans-serif;
    z-index: 50;
    width: auto;
    pointer-events: none;
    line-height: 1;
}

.phase-text::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 0;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 0 solid transparent;
    border-left: 10px solid #ffffff;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5) translate(20px, 20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
}

.mini-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--hex-border);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#current-player-name {
    font-size: 1.1rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.lifeline-btn {
    width: 65px;
    height: 65px;
    background: #16213e;
    border: 3px solid var(--hex-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--glow-soft);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lifeline-btn:hover:not(:disabled) {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 25px var(--hex-border);
    background: #1f4068;
}

.lifelines-nav {
    /* Mantenemos las propiedades de fixed de .bottom-nav */
}

.lifeline-item {
    cursor: pointer;
    transition: all 0.3s;
    opacity: 1;
}

.lifeline-item:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 10px var(--hex-border));
}

.lifeline-item.used {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

/* Question Area Hexagonal */
.question-container {
    background: rgba(22, 33, 62, 0.9);
    border: 2px solid var(--hex-border);
    padding: 25px 20px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(78, 204, 163, 0.2);
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-text {
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 700;
}

/* Botones de Estilo Premium */
.glass-btn {
    background: var(--gold);
    color: #050a1b;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    display: inline-block;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 3px solid rgba(0, 0, 0, 0.2);
}

.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    filter: brightness(1.1);
}

.glass-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

/* Botones Hexagonales para Opciones */
.options-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.glass-btn.option {
    background: #16213e !important;
    border: 2px solid #2c3e50 !important;
    color: white !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
    padding-left: 12%;
    position: relative;
    width: 100%;
}

.glass-btn.option:hover {
    background: #1f4068;
    border-color: #4ecca3;
    box-shadow: 0 0 20px rgba(78, 204, 163, 0.3);
    transform: translateX(10px);
}

.glass-btn.option.correct {
    background: #27ae60 !important;
    border-color: #2ecc71 !important;
    animation: pulseCorrect 0.4s 3;
}

.glass-btn.option.wrong {
    background: #c0392b !important;
    border-color: #e74c3c !important;
}

.option-fade {
    opacity: 0 !important;
    pointer-events: none;
    cursor: default;
}

@keyframes pulseCorrect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Progress bar y Footer */
#progress-bar {
    height: 10px;
    background: #1a1a2e;
    border-radius: 5px;
    border: 1px solid #16213e;
    overflow: hidden;
    margin-top: 10px;
}

#progress-fill {
    height: 100%;
    background: var(--gold);
    width: 0%;
    transition: width 0.6s ease;
}

/* Modals Pro */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #16213e;
    border: 4px solid var(--gold-solid);
    border-radius: 30px;
    padding: 25px 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
}

.modal-header {
    color: var(--accent-color);
    font-size: clamp(0.9rem, 6.5vw, 1.6rem);
    margin-bottom: 20px;
    font-weight: 900;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    display: block;
}

.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 140px;
    margin: 25px 0;
}

.chart-bar {
    width: 45px;
    background: #0f3460;
    border-radius: 10px 10px 0 0;
}

.chart-bar.highlight {
    background: var(--gold);
    box-shadow: 0 0 20px var(--gold-solid);
}

/* OptimizaciÃ³n para pantallas pequeÃ±as y mÃ³viles */

@media (max-height: 700px) {

    .container {

        padding-bottom: 80px;

    }



    .logo-container {

        width: 150px;

        height: 150px;

        margin-bottom: 10px;

    }



    .game-slogan {

        font-size: 0.9rem;

        margin-bottom: 10px;

    }



    .play-btn {

        padding: 10px 40px;

        font-size: 1.5rem;

        margin-top: 10px;

    }



    .start-screen {

        padding: 20px;

        justify-content: center;

    }



    .bottom-nav {

        padding: 8px 15px;

        bottom: 10px;

    }



    .nav-icon {

        font-size: 1.2rem;

    }



    .nav-item {

        font-size: 0.7rem;

    }



    .question-container {

        min-height: 80px;

        padding: 15px;

        margin-bottom: 10px;

    }



    #question-text {

        font-size: 1rem;

    }



    .glass-btn.option {

        padding: 10px 15px;

        font-size: 0.9rem;

    }



    .player-current-info {
        top: 5px;
        left: 5px;
        padding: 2px 8px;
    }

    .presenter-container {
        width: 140px;
        height: 140px;
    }

    .prize-banner {
        margin-top: 100px;
    }
}

/* Sidebar & Ladder Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    height: 100%;
    background: rgba(4, 7, 20, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
}

.sidebar.open {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2001;
}

.close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

.sidebar-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    width: 90%;
}

.ladder-container {
    display: flex;
    flex-direction: column-reverse;
    /* Level 1 at bottom */
    gap: 2px;
    /* Tight gap like the show */
    width: 100%;
    max-width: 340px;
    padding: 20px 0;
}

.ladder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    color: #f39c12;
    /* Golden orange base */
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
    border-radius: 4px;
}

/* Connect numbers and values visually */
.ladder-item .level-num {
    width: 30px;
    text-align: right;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.ladder-item .level-value {
    text-align: right;
    flex-grow: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ladder-item.milestone {
    color: #ffffff;
    font-weight: 900;
}

.ladder-item.milestone .level-num {
    color: #ffffff;
    font-weight: 900;
}

/* Active Level Styling (The Orange bar) */
.ladder-item.active {
    color: #000;
    text-shadow: none;
    transform: scale(1.03);
    margin: 5px 0;
    /* Add space around active item */
}

/* Background for active item using pseudo-element */
.ladder-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #d35400 0%, #f1c40f 50%, #d35400 100%);
    border-radius: 5px;
    z-index: -1;
    box-shadow: 0 0 15px #f39c12, inset 0 0 5px rgba(255, 255, 255, 0.5);
    border: 1px solid #fff;
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
}

.ladder-item.active .level-num,
.ladder-item.active .level-value {
    color: #000;
    font-weight: 800;
}

/* Dim styled for passed levels */
.ladder-item.passed::after {
    content: '✓';
    position: absolute;
    left: 10px;
    color: var(--hex-border);
    font-size: 0.8rem;
}

/* Family Floating Menu */
.family-menu {
    position: fixed;
    bottom: 100px;
    /* Positioned above the nav */
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background: #ffffff;
    border: 5px solid #f1c40f;
    /* Yellow border */
    border-radius: 30px;
    padding: 15px;
    z-index: 500;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.4);
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.family-menu.hidden {
    display: none !important;
}

.menu-arrow {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #f1c40f;
    /* Matches border color */
}

/* White inner triangle availability if needed, but solid yellow arrow looks fine as connector */
.menu-arrow::after {
    content: '';
    position: absolute;
    top: -19px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
}


@keyframes popUp {
    from {
        transform: translate(-50%, 50px) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-items: center;
}

.family-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #000;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.family-circle:active {
    transform: scale(0.95);
}

.f-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.f-name {
    font-size: 0.7rem;
    font-weight: 800;
    color: #000;
    margin-top: 2px;
    text-transform: uppercase;
}

.close-circle {
    border-color: #e74c3c;
}

.close-circle .f-name {
    color: #e74c3c;
}

.family-response {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    margin-top: -10px;
    /* Slight overlap or adjustment can be made */
    text-align: center;
    border: 1px solid #ddd;
    animation: fadeIn 0.3s;
}

/* Tutorial Mode Styles */
body.tutorial-active {
    background-image: url('../img/presentador_tutorial_A.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: normal !important;
    background-color: #000 !important;
    /* Ensure a solid back if image has transparency, but normal mode prevents blending darkening */
}

body.tutorial-active .container>header>*:not(#game-phase-text) {
    display: none !important;
}

body.tutorial-active .presenter-container {
    display: none !important;
}

body.tutorial-active .container>main,
body.tutorial-active .container>footer,
body.tutorial-active #menu-toggle {
    display: none !important;
}

body.tutorial-active #skip-tutorial-btn {
    display: block !important;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: auto;
    padding: 10px 30px;
    background: #e74c3c;
    border-color: #c0392b;
}

body.tutorial-active .phase-text {
    top: auto;
    bottom: 150px;
    /* Position above the skip button */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    right: auto;
    font-size: 1.1rem;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #f1c40f;
}

body.tutorial-active .phase-text::after {
    display: none;
    /* Hide speech bubble tail */
}