/* AMCO SUMMIT 2026 - STYLE SHEET v9.0 (Debate & Results Loop) */

/* =========================================
   1. RESET Y CONFIGURACIÓN BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(240, 244, 248, 0.8) 100%);
    color: #202124;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.8s ease;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

body.fonts-loaded #particle-canvas {
    opacity: 1;
}

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: transparent;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.branding-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px 10px rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.brand-main {
    font-weight: 700;
    font-size: 1.1rem;
    color: #202124;
    letter-spacing: 0.5px;
}

.brand-sub {
    font-size: 0.9rem;
    color: #5f6368;
}

.nav-center {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px 10px rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    padding: 10px;
}

.nav-center a {
    text-decoration: none;
    color: #5f6368;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-center a:hover {
    color: #202124;
}

.btn-settings {
    background: #002355;
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 35, 85, 0.2);
}

.btn-settings svg {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-settings:hover {
    background: #2C4F86;
    box-shadow: 0 6px 16px rgba(0, 35, 85, 0.3);
}

.btn-settings:hover svg {
    transform: rotate(180deg);
}

/* =========================================
   3. PANTALLAS Y HERO SECTION
   ========================================= */
.screen-section {
    width: 100%;
    flex-grow: 1;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen-section.hidden {
    display: none;
}

.screen-exit {
    animation: fade-out 0.5s ease forwards;
}

.screen-enter {
    animation: slide-up-fade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes slide-up-fade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-header-center {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.amco-box {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #202124;
    display: inline-block;
}

.school-name {
    font-size: 1rem;
    color: #5f6368;
    font-weight: 500;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #002355;
    letter-spacing: -1px;
}

.signature-text {
    font-family: "Dancing Script", cursive;
    font-size: 1.5rem;
    color: #585b60;
    margin-left: 5px;
    letter-spacing: 0px;
}

.blue-system-text {
    color: #1b4e98;
    display: inline-block;
    margin-top: 10px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #5f6368;
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
}

/* BOTÓN PRINCIPAL */
.btn-hero-primary {
    position: relative;
    overflow: hidden;
    background: rgba(183, 191, 217, 0.1);
    color: #202124;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    gap: 12px;
    min-width: 260px;
}

.btn-hero-primary.loading {
    background: rgba(183, 191, 217, 0.1);
    border: 1px solid rgba(0, 35, 85, 0.1);
    cursor: wait;
}

.btn-hero-primary.loading #btn-text {
    position: relative;
    z-index: 5;
    text-shadow: none;
    transition: color 0.3s;
}

.btn-hero-primary:not(.loading):hover {
    background: rgba(221, 36, 128, 0.85);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(221, 36, 128, 0.4);
}

.btn-icon {
    display: block;
    transition: transform 0.8s ease;
}

.btn-hero-primary:not(.loading):hover .btn-icon {
    transform: translateX(6px);
}

#btn-text {
    transition: opacity 0.3s ease;
    opacity: 1;
}

.btn-content-wrapper {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wave-container {
    position: absolute;
    left: 0;
    width: 100%;
    height: 180%;
    top: -20%;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.editorial {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 3s;
    fill: rgba(27, 78, 152, 0.1);
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 4s;
    fill: rgba(27, 78, 152, 0.1);
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 6s;
    fill: rgba(0, 35, 85, 0.1);
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 8s;
    fill: rgba(0, 35, 85, 0.1);
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* =========================================
   4. NUBE DE TEMAS
   ========================================= */
.cloud-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 1vh 2vw;
    padding: 0;
}

.cloud-item {
    position: relative;
    font-weight: 700;
    white-space: normal;
    text-align: center;
    opacity: 0;
    color: #485363;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 35, 85, 0.1);
    cursor: default;
    user-select: none;
    z-index: 3;
    will-change: transform, opacity;
    transition: opacity 0.8s ease, color 0.3s ease, filter 0.3s ease;
    animation: floatVertical var(--float-duration, 6s) ease-in-out infinite alternate;
}

.cloud-item.size-s {
    font-size: clamp(0.8rem, 2.5vmin, 1.5rem);
    color: #64748B;
    font-weight: 500;
    opacity: 0.5;
}

.cloud-item.size-m {
    font-size: clamp(1.2rem, 4vmin, 2.5rem);
    color: #505e72;
    opacity: 0.65;
}

.cloud-item.size-l {
    font-size: clamp(1.8rem, 6vmin, 4.5rem);
    font-weight: 900;
    color: #5c6e89;
    opacity: 0.55;
}

@keyframes floatVertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(var(--move-y, -15px));
    }
}

.cloud-item.highlight {
    /*color: #DD2480 !important;*/
    color: #002355 !important;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 1 !important;
}

.cloud-item.blur-out {
    opacity: 0.15 !important;
    filter: blur(3px);
}

/* =========================================
   5. TARJETA GANADORA Y CONTROLES
   ========================================= */
.winner-card-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100;
    color: #002355;
    background: rgba(255, 255, 255, 0.65);
    padding: 2rem 4rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 35, 85, 0.4);
    border: 1px solid #8AD3F4;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 800;
    text-align: center;
    white-space: normal;
    max-width: 85%;
    opacity: 0;
    animation: slideDownBlurCentered 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

/* Estilo para el icono de refresco */
.refresh-icon {
    display: inline-block;
    /* Necesario para que la rotación funcione */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 8px;
    font-size: 1.2rem;
    /*vertical-align: middle;*/
}

/* Animación al pasar el mouse por el botón padre */
.btn-clean:hover .refresh-icon {
    transform: rotate(360deg);
}

.refresh-icon,
.confirm-icon {
    display: flex;
    /* Permite control total del contenedor del icono */
    align-items: center;
    /* Alineación interna */
    line-height: 1;
    /* Elimina espacios extra arriba/abajo del glifo */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* */
}

/* Configuración para que el giro sea sobre su propio eje */
.refresh-icon {
    display: inline-flex;
    /* Centrado interno */
    align-items: center;
    /* Centrado vertical */
    justify-content: center;
    /* Centrado horizontal */
    width: 1.2em;
    /* Ancho fijo igual al alto */
    height: 1.2em;
    /* Alto fijo igual al ancho */
    line-height: 1;
    /* Elimina espacio de línea */
    /*vertical-align: middle;*/
    /* Alineación con el texto vecino */
    transform-origin: center center;
    /* Asegura el eje en el centro exacto */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Quitamos el margin-left manual porque el botón ya tiene gap: 10px */
    margin-left: 0;
}

/* El efecto de giro se mantiene igual */
.btn-clean:hover .refresh-icon {
    transform: rotate(360deg);
}

/* El efecto de desplazamiento se mantiene igual */
.btn-blue-solid:hover .confirm-icon {
    transform: translateX(8px);
}

@keyframes reveal-center {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.selection-controls {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
    pointer-events: none;
}

@keyframes slideDownBlurCentered {
    0% {
        opacity: 0;
        /* Mantenemos el -50% horizontal y solo variamos el vertical */
        transform: translate(-50%, -20px);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        /* Mantenemos el -50% horizontal en el estado final */
        transform: translate(-50%, -50%);
        filter: blur(0);
    }
}

@media (min-width: 768px) {
    .selection-controls {
        flex-direction: row;
        justify-content: center;
    }
}

.selection-controls button {
    pointer-events: auto;
}

.btn-clean {
    min-width: 240px;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.41);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(221, 36, 128, 0.3);
    color: #DD2480;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(221, 36, 128, 0.3);
    transition: all 0.6s ease;
    cursor: pointer;

    display: inline-flex;
    /* Cambiado de block/inline a inline-flex */
    align-items: center;
    /* Centra verticalmente todo el contenido */
    justify-content: center;
    /* Centra horizontalmente todo el contenido */
    gap: 10px;
}

.btn-clean:hover {
    background: #DD2480;
    color: white;
    box-shadow: 0 10px 25px rgba(221, 36, 128, 0.3);
    transform: translateY(-8px);
}

.btn-clean:disabled {
    background: #f1f3f4;
    background: rgba(255, 255, 255, 0.41);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    color: #002355;
    border-color: #9aa0a6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.btn-blue-solid {
    background: #002355 !important;
    color: white !important;
    border: 1px solid #002355 !important;
    box-shadow: 0 10px 25px rgba(0, 35, 85, 0.2);
}

.btn-blue-solid:hover {
    background: #1b4e98 !important;
    border-color: #1b4e98 !important;
    box-shadow: 0 15px 35px rgba(0, 35, 85, 0.4) !important;
    transform: translateY(-3px) scale(1.02);
}

/* Estilo para el icono de confirmación */
.confirm-icon {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.3rem;
    /*vertical-align: middle;*/
}

/* Animación de desplazamiento al hacer hover */
.btn-blue-solid:hover .confirm-icon {
    transform: translateX(8px);
}

/* =========================================
   6. FOOTER & MODAL
   ========================================= */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: #9aa0a6;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.main-footer span,
.main-footer .version-text span {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px 10px rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.version-text {
    font-weight: 400;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-shadow: 0 20px 50px rgba(0, 35, 85, 0.2);
    border: 1px solid rgba(255, 255, 255, 1);
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: #002355;
    margin: 0;
    font-weight: 700;
}

.total-count-label {
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 4px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #f1f3f4;
    color: #5f6368;
}

.status-badge.online {
    background: #e6f4ea;
    color: #137333;
}

.status-badge.saving {
    background: #fef7e0;
    color: #f9ab00;
}

.btn-close {
    background: transparent;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.add-topic-section {
    padding: 1rem 2rem;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    gap: 10px;
    background: #fafafa;
}

.input-topic {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-add {
    background: #002355;
    color: white;
    border: none;
    padding: 0 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-add:hover {
    background: #2C4F86;
}

.topics-container {
    padding: 1rem 2rem;
    flex-grow: 1;
    overflow-y: auto;
}

.topic-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    gap: 15px;
}

.topic-item:hover {
    border-color: #002355;
    background: #f8f9fa;
}

.topic-main-info {
    flex-grow: 1;
}

.topic-input-edit {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: #3c4043;
    width: 100%;
    outline: none;
    border-bottom: 1px solid transparent;
}

.topic-input-edit:focus {
    border-bottom: 1px solid #1967d2;
}

.topic-meta-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-label {
    font-size: 0.75rem;
    color: #9aa0a6;
    display: none;
}

@media (min-width: 500px) {
    .count-label {
        display: inline-block;
    }
}

.topic-count-input {
    width: 50px;
    padding: 4px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    color: #5f6368;
}

.btn-icon-action {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #dadce0;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action:hover {
    background: #f1f3f4;
    color: #d93025;
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid #f1f3f4;
    background: #f8f9fa;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-save {
    background: #188038;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover {
    background: #137333;
}

.btn-save:disabled {
    background: #ceead6;
    cursor: not-allowed;
}

.btn-reset {
    background: transparent;
    color: #5f6368;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-reset:hover {
    background: #fff;
    color: #d93025;
    border-color: #d93025;
}

.hidden {
    display: none;
}

.flash-effect {
    animation: flash-shine 0.5s ease-out;
}

@keyframes flash-shine {
    0% {
        background-color: rgba(255, 255, 255, 0);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.8);
    }

    100% {
        background-color: rgba(255, 255, 255, 0);
    }
}

/* =========================================
   7. ANIMACIONES DE ENTRADA
   ========================================= */
@keyframes slideDownBlur {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ESTADO INICIAL: Todo invisible */
.navbar .branding-container,
.nav-center a,
.nav-right .btn-settings,
.hero-header-center,
h1,
.hero-subtitle,
.hero-buttons {
    opacity: 0;
}

body.fonts-loaded .navbar .branding-container {
    animation: slideDownBlur 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.0s;
}

body.fonts-loaded .nav-center a {
    animation: slideDownBlur 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

body.fonts-loaded .nav-center a:nth-child(1) {
    animation-delay: 0.1s;
}

body.fonts-loaded .nav-center a:nth-child(2) {
    animation-delay: 0.2s;
}

body.fonts-loaded .nav-center a:nth-child(3) {
    animation-delay: 0.3s;
}

body.fonts-loaded .nav-center a:nth-child(4) {
    animation-delay: 0.4s;
}

body.fonts-loaded .nav-right .btn-settings {
    animation: slideDownBlur 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

body.fonts-loaded .hero-header-center {
    animation: slideDownBlur 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

body.fonts-loaded h1 {
    animation: slideDownBlur 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

body.fonts-loaded .hero-subtitle {
    animation: slideDownBlur 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

body.fonts-loaded .hero-buttons {
    animation: slideDownBlur 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

/* =========================================
   8. POSTURE SCREEN & STANCE LOGIC
   ========================================= */
.topic-context-bar {
    position: absolute;
    top: 15%;
    width: 85%;
    max-width: 900px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 35, 85, 0.1);
    padding-bottom: 15px;
    opacity: 0;
}

.topic-context-bar.animate-enter {
    animation: slideDownBlur 0.8s ease forwards;
    animation-delay: 0.2s;
}

.label-mini {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #5f6368;
    text-transform: uppercase;
    font-weight: 500;
}

#display-topic-mini {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.4rem;
    color: #202124;
    margin: 8px 0 0 0;
    line-height: 1.3;
}

.posture-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    z-index: 50;
    margin-top: 5vh;
}

.stance-card-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 3rem 1.5rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 35, 85, 0.08);
    width: 360px;
    max-width: 90vw;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    animation: reveal-center 0.8s ease forwards;
    animation-delay: 0.4s;
}

.card-body {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.card-header {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #9aa0a6;
    text-transform: uppercase;
    margin-bottom: 10px;
}

#stance-display-text {
    font-family: 'Google Sans', sans-serif;
    font-weight: 800;
    font-size: 3.5rem;
    margin: 0;
    letter-spacing: -1px;
    color: #BDC1C6;
    transition: color 0.3s ease;
    display: inline-block;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease, filter 0.1s linear;
}

.scrambling-mode {
    color: transparent !important;
    text-shadow: 0 0 0 rgba(189, 193, 198, 0.5);
    animation: casino-fall 0.12s linear infinite;
}

.scrambling-mode::before,
.scrambling-mode::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    color: #BDC1C6;

    /*
    filter: blur(0px 2px);
    */
}

.scrambling-mode::before {
    top: -100%;
}

.scrambling-mode::after {
    top: 100%;
}

@keyframes casino-fall {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0%);
    }
}

.scrambling-mode.tease-blue::before,
.scrambling-mode.tease-blue::after {
    color: rgba(0, 35, 85, 0.6);
}

.scrambling-mode.tease-magenta::before,
.scrambling-mode.tease-magenta::after {
    color: rgba(221, 36, 128, 0.6);
}

.stance-for {
    border-color: #002355 !important;
    background: rgba(0, 35, 85, 0.03) !important;
}

.stance-against {
    border-color: #DD2480 !important;
    background: rgba(221, 36, 128, 0.03) !important;
}

.shockwave-blue {
    animation: shockwave-pulse-blue 0.8s ease-out forwards;
}

.shockwave-orange {
    animation: shockwave-pulse-magenta 0.8s ease-out forwards;
}

.heartbeat-text {
    animation: text-heartbeat 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes text-heartbeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shockwave-pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 35, 85, 0.6);
        transform: scale(1);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 0 50px rgba(0, 35, 85, 0);
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shockwave-pulse-magenta {
    0% {
        box-shadow: 0 0 0 0 rgba(221, 36, 128, 0.6);
        transform: scale(1);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 0 50px rgba(221, 36, 128, 0);
        transform: scale(1);
        opacity: 1;
    }
}

.stance-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    animation: slide-up-fade 0.8s ease forwards;
    animation-delay: 0.6s;
}

/* =========================================
   9. WAR ROOM & RESEARCH PHASE
   ========================================= */
#search-screen {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 10vh;
}

.war-room-header {
    text-align: center;
    margin-bottom: 0.3rem;
    animation: slideDownBlur 1s ease forwards;
}

.phase-label {
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #5f6368;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

#war-room-topic {
    font-size: 1.8rem;
    font-family: 'Google Sans', sans-serif;
    color: #202124;
    max-width: 900px;
    line-height: 1.3;
}

.timer-container {
    position: relative;
    width: 600px;
    max-width: 90vw;
    height: 200px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: reveal-center 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.progress-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background: #002355;
    width: 100%;
    min-width: 12px;
    transition: width 1s linear, background 0.3s ease;
}

.progress-bar-fill.danger {
    background: #d93025 !important;
    height: 8px;
}

#research-timer {
    font-size: 7rem;
    font-weight: 700;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    color: #202124;
    z-index: 2;
    letter-spacing: -3px;
}

.blink-warning {
    animation: blink-red 1s infinite;
    color: #d93025 !important;
}

.time-up {
    color: #d93025 !important;
}

@keyframes blink-red {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.posture-badge-container {
    text-align: center;
    opacity: 0;
    animation: slide-up-fade 0.8s ease forwards;
    animation-delay: 0.4s;
}

.badge-label {
    display: block;
    font-size: 0.8rem;
    color: #9aa0a6;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.posture-badge {
    display: inline-block;
    padding: 10px 30px;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50px;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.status-for {
    background: radial-gradient(circle at center, rgba(227, 242, 253, 0.9) 0%, rgba(240, 244, 248, 0.8) 100%);
}

body.status-for .posture-badge {
    background: #002355;
    color: white;
}

body.status-for .progress-bar-fill {
    background: #002355;
}

body.status-against {
    background: radial-gradient(circle at center, rgba(252, 228, 236, 0.9) 0%, rgba(240, 244, 248, 0.8) 100%);
}

body.status-against .posture-badge {
    background: #DD2480;
    color: white;
}

body.status-against .progress-bar-fill {
    background: #DD2480;
}

.coach-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #eee;
    animation: slide-up-fade 0.5s ease forwards;
}

.coach-panel.hidden {
    display: none !important;
}

.panel-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1px;
}

.btn-penalty {
    background: #fff0f0;
    color: #d93025;
    border: 1px solid #d93025;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-penalty:hover {
    background: #d93025;
    color: white;
}

/* =========================================
   10. DEBATE SCREEN (FSM STYLES)
   ========================================= */
.debate-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 3vh;
}

.debate-header {
    text-align: center;
    animation: slideDownBlur 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.phase-title {
    font-size: 3rem;
    color: #002355;
    font-weight: 800;
    margin-top: 5px;
}

.debate-timer-wrapper {
    position: relative;
    animation: slideDownBlur 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

.giant-timer {
    font-size: 10rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #333;
    letter-spacing: -5px;
    line-height: 1;
    cursor: pointer;
}

.running-state {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.debate-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    animation: slideDownBlur 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

/* PENALTY SLOTS */
.penalty-indicators {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.penalty-slot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: transparent;
    transition: all 0.3s ease;
}

.penalty-active {
    background: #d93025;
    border-color: #d93025;
    box-shadow: 0 0 10px rgba(217, 48, 37, 0.5);
    transform: scale(1.2);
}

/* =========================================
   11. RESULTS SCREEN
   ========================================= */
.results-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    animation: slideDownBlur 1s ease forwards;
}

#results-title {
    font-size: 3rem;
    font-weight: 800;
    color: #002355;
}

.final-report-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.final-penalties-row {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

#final-verdict-text {
    font-size: 1.5rem;
    color: #5f6368;
}

/* Animación de entrada para el botón Next Phase */
.btn-entrance {
    animation: btn-pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes btn-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Refuerzo para que el cronómetro también pueda re-animarse */
.giant-timer.screen-enter {
    animation: slide-up-fade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* =========================================
   12. FIX RESPONSIVE PARA LAPTOPS (1366x768 y menores)
   ========================================= */

@media screen and (max-height: 800px) {

    /* --- PANTALLA DE SELECCIÓN DE TEMA --- */
    .winner-card-display {
        padding: 1.5rem 2rem;
        font-size: 1.5rem;
        max-width: 90%;
        width: 90%;
    }

    .selection-controls {
        bottom: 20px;
        gap: 10px;
    }

    /* --- PANTALLA DE POSTURA (Tus nuevas fotos) --- */

    /* 1. Subir el texto del tema para que no choque con la tarjeta */
    .topic-context-bar {
        top: 60px;
        /* En lugar de 15%, usamos pixeles fijos para pegarlo arriba */
        width: 90%;
    }

    /* 2. Reducir el tamaño de la letra del tema */
    #display-topic-mini {
        font-size: 1.1rem;
        /* Letra más pequeña para que quepa mejor */
        margin-top: 5px;
    }

    /* 3. Hacer la tarjeta de "FOR/AGAINST" más compacta */
    .stance-card-container {
        padding: 1.5rem 1rem;
        /* Menos relleno */
        width: 300px;
        /* Un poco más angosta */
        margin-top: 40px;
        /* Empujarla un poco abajo por si acaso */
    }

    /* 4. Reducir el texto gigante de "PENDING/FOR" */
    #stance-display-text {
        font-size: 2.5rem;
        /* Antes era 3.5rem */
    }

    /* --- AJUSTES GENERALES --- */
    .navbar {
        padding: 0.5rem 2rem;
        /* Navbar más compacto */
    }

    /* Evitar que el logo se coma espacio */
    .brand-main {
        font-size: 1rem;
    }

    .screen-section {
        padding-top: 40px;
        /* Compensar espacio */
    }
}