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

:root {
    --berlitz-blue: #003DA5;
    --berlitz-red: #E2231A;
    --berlitz-dark: #1a1a1a;
    --berlitz-gray: #f5f5f5;
    --berlitz-white: #ffffff;
    --success-green: #00A651;
    --warning-orange: #FF6B35;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.banner-container {
    width: 300px;
    height: 600px;
    position: relative;
    overflow: hidden;
    background: var(--berlitz-white);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    flex-direction: column;
    padding: 30px 25px;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

/* === SLIDE 1: Hook === */
#slide-1 {
    background: linear-gradient(135deg, var(--berlitz-blue) 0%, #002b7a 100%);
    color: var(--berlitz-white);
    justify-content: space-between;
}

.berlitz-logo {
    margin-bottom: 20px;
}

.berlitz-logo svg {
    filter: brightness(0) invert(1);
}

.headline {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.highlight {
    color: #FFD700;
    position: relative;
}

.subheadline {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-button {
    background: var(--berlitz-red);
    color: var(--berlitz-white);
    border: none;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(226, 35, 26, 0.3);
    width: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 35, 26, 0.4);
}

.cta-button .arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(5px);
}

/* === SLIDES 2-4: Frases === */
#slide-2,
#slide-3,
#slide-4 {
    background: var(--berlitz-gray);
}

.berlitz-logo-small {
    font-size: 20px;
    font-weight: 700;
    color: var(--berlitz-blue);
    margin-bottom: 15px;
}

.progress-indicator {
    font-size: 14px;
    font-weight: 600;
    color: var(--berlitz-blue);
    margin-bottom: 15px;
    text-align: center;
}

.challenge-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--berlitz-dark);
    margin-bottom: 20px;
    text-align: center;
}

.phrase-box {
    background: var(--berlitz-white);
    border: 3px solid var(--berlitz-blue);
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 61, 165, 0.1);
    position: relative;
}

.target-phrase {
    font-size: 16px;
    font-weight: 600;
    color: var(--berlitz-dark);
    line-height: 1.5;
    text-align: center;
    margin-bottom: 10px;
}

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 auto;
    display: block;
    width: fit-content;
}

.difficulty-badge.basic {
    background: var(--success-green);
    color: var(--berlitz-white);
}

.difficulty-badge.intermediate {
    background: var(--warning-orange);
    color: var(--berlitz-white);
}

.difficulty-badge.advanced {
    background: var(--berlitz-red);
    color: var(--berlitz-white);
}

.instructions {
    text-align: center;
    margin-bottom: 20px;
}

.instructions p {
    font-size: 14px;
    color: #666;
}

.mic-button {
    background: var(--berlitz-red);
    color: var(--berlitz-white);
    border: none;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(226, 35, 26, 0.3);
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(226, 35, 26, 0.4);
}

.mic-button.recording {
    animation: pulse 1.5s ease-in-out infinite;
    background: var(--berlitz-red);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mic-button span {
    font-size: 13px;
    font-weight: 600;
}

.fallback-button {
    background: transparent;
    border: none;
    color: #666;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    margin: 0 auto 10px;
    padding: 8px;
}

.fallback-button:hover {
    color: var(--berlitz-blue);
}

.skip-button {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    margin: 8px auto 0;
    transition: all 0.3s ease;
}

.skip-button:hover {
    border-color: var(--berlitz-blue);
    color: var(--berlitz-blue);
}

/* === SLIDE: Análisis (reutilizable) === */
#slide-analysis {
    background: var(--berlitz-blue);
    justify-content: center;
    align-items: center;
}

.analyzing-animation {
    text-align: center;
}

.sound-wave {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    height: 80px;
}

.sound-wave span {
    width: 6px;
    background: var(--berlitz-white);
    border-radius: 10px;
    animation: wave 1.2s ease-in-out infinite;
}

.sound-wave span:nth-child(1) { animation-delay: 0s; height: 30px; }
.sound-wave span:nth-child(2) { animation-delay: 0.1s; height: 50px; }
.sound-wave span:nth-child(3) { animation-delay: 0.2s; height: 70px; }
.sound-wave span:nth-child(4) { animation-delay: 0.3s; height: 50px; }
.sound-wave span:nth-child(5) { animation-delay: 0.4s; height: 30px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.analyzing-text {
    color: var(--berlitz-white);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

/* === SLIDE 5: Resultados Parciales === */
#slide-5 {
    background: var(--berlitz-gray);
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--berlitz-white);
    border: 8px solid var(--berlitz-red);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

#slide-7 .score-circle {
    width: 110px;
    height: 110px;
    border-width: 4px;
    margin-bottom: 8px;
}

.score-circle > * {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
}

.score-circle.score-medium {
    width: 140px;
    height: 140px;
    border-width: 6px;
}

.score-circle.good {
    border-color: var(--success-green);
}

.score-number {
    font-size: 56px;
    font-weight: 800;
    color: var(--berlitz-red);
    line-height: 1;
    display: inline-block;
}

.score-circle.score-medium .score-number {
    font-size: 48px;
}

#slide-7 .score-number {
    font-size: 36px;
}

.score-circle.good .score-number {
    color: var(--success-green);
}

.score-symbol {
    font-size: 28px;
    font-weight: 700;
    color: var(--berlitz-red);
    display: inline-block;
    line-height: 1;
    margin-left: 4px;
    vertical-align: baseline;
}

.score-circle.score-medium .score-symbol {
    font-size: 22px;
    margin-left: 3px;
}

#slide-7 .score-symbol {
    font-size: 16px;
    margin-left: 2px;
}

.score-circle.good .score-symbol {
    color: var(--success-green);
}

.result-container {
    text-align: center;
    width: 100%;
}

#slide-7 .result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: flex-start;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--berlitz-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

#slide-7 .result-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.result-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    padding: 0 10px;
}

#slide-7 .result-message {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.3;
    padding: 0 5px;
}

.teaser-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 25px;
    padding: 0 5px;
}

/* === SLIDE 6: Formulario === */
#slide-6 {
    background: var(--berlitz-gray);
    padding: 15px 20px 20px 20px;
    overflow: hidden; /* Sin scroll */
}

#slide-6 .content {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#slide-6 .berlitz-logo-small {
    margin-bottom: 10px;
    font-size: 18px;
}

.form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--berlitz-dark);
    margin-bottom: 4px;
    text-align: center;
}

.form-subtitle {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.2;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--berlitz-dark);
    margin-bottom: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus {
    outline: none;
    border-color: var(--berlitz-blue);
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    margin: 2px 0;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 10px;
    font-weight: 400;
    cursor: pointer;
    flex: 1;
    line-height: 1.3;
}

.form-submit {
    margin-top: 6px;
    width: 100%;
    padding: 12px;
    font-size: 13px;
    flex-shrink: 0;
}

/* === SLIDE 7: Resultados Finales === */
#slide-7 {
    background: var(--berlitz-gray);
    padding: 15px 20px 20px 20px;
    justify-content: space-between;
    overflow: hidden; /* Sin scroll */
}

#slide-7 .content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding-bottom: 0;
}

#slide-7 .content.centered {
    justify-content: space-between;
}

#slide-7 .berlitz-logo-small {
    margin-bottom: 8px;
    font-size: 18px;
}

.personalized-greeting {
    font-size: 14px;
    font-weight: 700;
    color: var(--berlitz-blue);
    margin-bottom: 10px;
    line-height: 1.2;
}

.score-breakdown {
    background: var(--berlitz-white);
    border-radius: 8px;
    padding: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#slide-7 .score-breakdown {
    padding: 6px;
    margin: 8px 0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

#slide-7 .breakdown-item {
    padding: 4px 0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

#slide-7 .breakdown-label {
    font-size: 11px;
}

.breakdown-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--berlitz-dark);
}

#slide-7 .breakdown-value {
    font-size: 13px;
}

.cta-final {
    margin-top: auto;
    width: 100%;
    padding-top: 15px;
}

#slide-7 .cta-final {
    position: relative;
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: 0;
    flex-shrink: 0; /* Evitar que se comprima */
}

.cta-button-final {
    background: var(--berlitz-red);
    color: var(--berlitz-white);
    border: none;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(226, 35, 26, 0.3);
    width: 100%;
    text-align: center;
}

.cta-button-final:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 35, 26, 0.4);
    background: #C01E16;
}

.cta-button-final:active {
    transform: translateY(0);
}

/* === Indicadores === */
.slide-indicator {
    position: absolute;
    bottom: 20px;
    right: 25px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

#slide-2 .slide-indicator,
#slide-3 .slide-indicator,
#slide-4 .slide-indicator,
#slide-5 .slide-indicator,
#slide-6 .slide-indicator,
#slide-7 .slide-indicator {
    color: #999;
    bottom: 15px; /* Ajustar posición para no interferir con el botón */
}

/* === Utilities === */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content.centered {
    justify-content: center;
}
