/**
 * Calculadora de Nivel WPT - Estilos
 * DigitalPadel.net - Diseño Viral
 */

/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */
.calculadora-nivel-wpt-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ========================================
   HEADER VIRAL
======================================== */
.calculadora-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.calculadora-header h1 {
    font-size: 48px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.calculadora-header .subtitle {
    font-size: 22px;
    color: #7f8c8d;
    margin: 0 0 30px 0;
}

.stats-preview {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #00a651;
}

.stat-label {
    font-size: 14px;
    color: #95a5a6;
    margin-top: 5px;
}

/* ========================================
   PREGUNTAS
======================================== */
.pregunta-card {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pregunta-card.active {
    display: block;
}

.pregunta-numero {
    font-size: 14px;
    font-weight: 600;
    color: #00a651;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.pregunta-titulo {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 30px 0;
    line-height: 1.4;
}

/* ========================================
   OPCIONES RADIO
======================================== */
.opciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.opciones-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.opcion-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.opcion-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.opcion-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    transition: all 0.3s;
    min-height: 140px;
}

.opcion-card:hover .opcion-contenido {
    border-color: #00a651;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 166, 81, 0.2);
}

.opcion-card.selected .opcion-contenido {
    border-color: #00a651;
    background: linear-gradient(135deg, #00a65111 0%, #00a65122 100%);
    box-shadow: 0 8px 20px rgba(0, 166, 81, 0.3);
}

.opcion-emoji {
    font-size: 48px;
    margin-bottom: 15px;
}

.opcion-texto {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.opcion-desc {
    font-size: 13px;
    color: #95a5a6;
    margin-top: 8px;
    text-align: center;
}

/* ========================================
   OPCIONES CHECKBOX
======================================== */
.opciones-checkbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.checkbox-card {
    cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-contenido {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.checkbox-card:hover .checkbox-contenido {
    border-color: #00a651;
    background: #f8f9fa;
}

.checkbox-card.checked .checkbox-contenido {
    border-color: #00a651;
    background: linear-gradient(135deg, #00a65111 0%, #00a65122 100%);
}

.checkbox-emoji {
    font-size: 32px;
}

.checkbox-texto {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* ========================================
   SLIDERS
======================================== */
.slider-container {
    margin-bottom: 30px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
}

.slider {
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #00a651;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.4);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #00a651;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.4);
    transition: all 0.2s;
}

.slider-value {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #00a651;
}

/* ========================================
   BOTONES
======================================== */
.botones-navegacion {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.btn-anterior,
.btn-siguiente,
.btn-calcular {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-anterior {
    background: #ecf0f1;
    color: #7f8c8d;
    flex: 0 0 auto;
}

.btn-anterior:hover {
    background: #d5dbdb;
}

.btn-siguiente,
.btn-calcular {
    background: linear-gradient(135deg, #00a651 0%, #008d44 100%);
    color: white;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
}

.btn-siguiente:hover,
.btn-calcular:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.4);
}

/* ========================================
   LOADING
======================================== */
.loading-screen {
    background: white;
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #00a651;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.loading-content p {
    font-size: 16px;
    color: #95a5a6;
}

/* ========================================
   RESULTADO
======================================== */
.resultado-container {
    animation: fadeInUp 0.8s ease-out;
}

.resultado-hero {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.resultado-icono {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.resultado-titulo {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.resultado-nivel {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    margin: 20px 0;
}

.resultado-categoria {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.resultado-descripcion {
    font-size: 20px;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.resultado-percentil {
    max-width: 500px;
    margin: 0 auto;
}

.percentil-bar {
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.percentil-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 1.5s ease-out;
}

.percentil-text {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

/* ========================================
   DESGLOSE
======================================== */
.resultado-desglose {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.resultado-desglose h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 30px 0;
}

.desglose-grid {
    display: grid;
    gap: 20px;
}

.desglose-item {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    align-items: center;
    gap: 15px;
}

.desglose-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.desglose-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
}

.desglose-fill {
    height: 100%;
    background: linear-gradient(135deg, #00a651 0%, #008d44 100%);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.desglose-valor {
    font-size: 16px;
    font-weight: 700;
    color: #00a651;
    min-width: 50px;
    text-align: right;
}

.puntos-totales {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
    text-align: center;
    font-size: 24px;
    color: #2c3e50;
}

/* ========================================
   RECOMENDACIONES
======================================== */
.resultado-recomendaciones {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.resultado-recomendaciones h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 25px 0;
}

.recomendaciones-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recomendacion-item {
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.recomendacion-item.alta {
    background: #fff3cd;
    border-color: #ffc107;
}

.recomendacion-item.media {
    background: #d1ecf1;
    border-color: #17a2b8;
}

.recomendacion-item.info {
    background: #d4edda;
    border-color: #28a745;
}

.recomendacion-titulo {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.recomendacion-desc {
    font-size: 15px;
    color: #5a6268;
    line-height: 1.5;
}

/* ========================================
   ACCIONES COMPARTIR
======================================== */
.resultado-acciones {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.resultado-acciones h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.resultado-acciones > p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 25px;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto 30px;
}

.input-email {
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.input-email:focus {
    outline: none;
    border-color: #00a651;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.btn-guardar-email {
    padding: 16px 32px;
    background: linear-gradient(135deg, #00a651 0%, #008d44 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-guardar-email:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.4);
}

.botones-compartir {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.btn-compartir {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-compartir:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-compartir.whatsapp:hover { border-color: #25D366; }
.btn-compartir.twitter:hover { border-color: #1DA1F2; }
.btn-compartir.facebook:hover { border-color: #4267B2; }
.btn-compartir.descargar:hover { border-color: #00a651; }

.btn-icon {
    font-size: 32px;
}

.btn-text {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.btn-reintentar {
    padding: 16px 32px;
    background: #ecf0f1;
    color: #7f8c8d;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reintentar:hover {
    background: #d5dbdb;
}

.exito-mensaje {
    padding: 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* ===================================
   RESPONSIVE OPTIMIZADO PARA MÓVILES
   =================================== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .calculadora-nivel-wpt-wrapper {
        padding: 30px 15px;
    }
    
    .pregunta-card,
    .resultado-hero,
    .resultado-desglose,
    .resultado-recomendaciones,
    .resultado-acciones {
        padding: 30px 20px;
    }
    
    .calculadora-header h1 {
        font-size: 42px;
    }
    
    .header-icon {
        font-size: 70px;
    }
}

/* Móviles - pantallas pequeñas */
@media (max-width: 768px) {
    .calculadora-nivel-wpt-wrapper {
        padding: 20px 10px;
    }
    
    /* Header */
    .calculadora-header {
        margin-bottom: 30px;
    }
    
    .calculadora-header h1 {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .calculadora-header .subtitle {
        font-size: 18px;
        line-height: 1.4;
    }
    
    .header-icon {
        font-size: 60px;
        margin-bottom: 15px;
    }
    
    .stats-preview {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    /* Preguntas */
    .pregunta-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .pregunta-numero {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .pregunta-titulo {
        font-size: 20px;
        margin-bottom: 25px;
        line-height: 1.4;
    }
    
    /* Opciones Radio */
    .opciones-grid,
    .opciones-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .opcion-contenido {
        padding: 20px 15px;
        min-height: 120px;
    }
    
    .opcion-emoji {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .opcion-texto {
        font-size: 15px;
    }
    
    .opcion-desc {
        font-size: 12px;
    }
    
    /* Opciones Checkbox */
    .opciones-checkbox {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .checkbox-contenido {
        padding: 15px;
        gap: 12px;
    }
    
    .checkbox-emoji {
        font-size: 28px;
    }
    
    .checkbox-texto {
        font-size: 15px;
    }
    
    /* Sliders */
    .slider-container {
        margin-bottom: 25px;
    }
    
    .slider-label {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .slider {
        height: 10px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider-value {
        font-size: 18px;
    }
    
    /* Botones navegación */
    .botones-navegacion {
        gap: 10px;
        margin-top: 25px;
    }
    
    .btn-anterior,
    .btn-siguiente,
    .btn-calcular {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    /* Loading */
    .loading-screen {
        padding: 50px 20px;
        border-radius: 15px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 6px;
        margin-bottom: 25px;
    }
    
    .loading-content h3 {
        font-size: 22px;
    }
    
    .loading-content p {
        font-size: 15px;
    }
    
    /* Resultado Hero */
    .resultado-hero {
        padding: 40px 20px;
        border-radius: 15px;
    }
    
    .resultado-icono {
        font-size: 70px;
        margin-bottom: 15px;
    }
    
    .resultado-titulo {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .resultado-nivel {
        font-size: 72px;
        margin: 15px 0;
    }
    
    .resultado-categoria {
        font-size: 26px;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .resultado-descripcion {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .percentil-bar {
        height: 24px;
        margin-bottom: 12px;
    }
    
    .percentil-text {
        font-size: 16px;
    }
    
    /* Desglose */
    .resultado-desglose {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .resultado-desglose h3 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .desglose-grid {
        gap: 15px;
    }
    
    .desglose-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .desglose-label {
        font-size: 14px;
    }
    
    .desglose-bar {
        height: 16px;
    }
    
    .desglose-valor {
        font-size: 15px;
        text-align: left;
    }
    
    .puntos-totales {
        margin-top: 20px;
        padding-top: 20px;
        font-size: 20px;
    }
    
    /* Recomendaciones */
    .resultado-recomendaciones {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .resultado-recomendaciones h3 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .recomendaciones-list {
        gap: 12px;
    }
    
    .recomendacion-item {
        padding: 15px;
    }
    
    .recomendacion-titulo {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .recomendacion-desc {
        font-size: 14px;
    }
    
    /* Acciones Compartir */
    .resultado-acciones {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .resultado-acciones h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .resultado-acciones > p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .email-form {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .input-email {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn-guardar-email {
        padding: 14px 25px;
        font-size: 16px;
    }
    
    .botones-compartir {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .btn-compartir {
        padding: 16px 12px;
        gap: 8px;
    }
    
    .btn-icon {
        font-size: 28px;
    }
    
    .btn-text {
        font-size: 13px;
    }
    
    .btn-reintentar {
        padding: 14px 25px;
        font-size: 15px;
        width: 100%;
    }
    
    .exito-mensaje {
        padding: 16px;
        font-size: 15px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
    .calculadora-nivel-wpt-wrapper {
        padding: 15px 8px;
    }
    
    .calculadora-header h1 {
        font-size: 28px;
    }
    
    .calculadora-header .subtitle {
        font-size: 16px;
    }
    
    .header-icon {
        font-size: 50px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .pregunta-card {
        padding: 20px 12px;
    }
    
    .pregunta-titulo {
        font-size: 18px;
    }
    
    .opcion-contenido {
        padding: 16px 12px;
        min-height: 110px;
    }
    
    .opcion-emoji {
        font-size: 36px;
    }
    
    .opcion-texto {
        font-size: 14px;
    }
    
    .checkbox-contenido {
        padding: 12px;
    }
    
    .checkbox-emoji {
        font-size: 24px;
    }
    
    .checkbox-texto {
        font-size: 14px;
    }
    
    .btn-anterior,
    .btn-siguiente,
    .btn-calcular {
        padding: 10px 16px;
        font-size: 15px;
    }
    
    .resultado-nivel {
        font-size: 60px;
    }
    
    .resultado-categoria {
        font-size: 22px;
    }
    
    .resultado-descripcion {
        font-size: 15px;
    }
    
    .resultado-desglose h3,
    .resultado-recomendaciones h3,
    .resultado-acciones h3 {
        font-size: 20px;
    }
    
    .desglose-label {
        font-size: 13px;
    }
    
    .desglose-valor {
        font-size: 14px;
    }
    
    .recomendacion-titulo {
        font-size: 15px;
    }
    
    .recomendacion-desc {
        font-size: 13px;
    }
    
    .botones-compartir {
        grid-template-columns: 1fr;
    }
    
    .btn-compartir {
        padding: 14px;
    }
}

/* Landscape móviles */
@media (max-width: 896px) and (orientation: landscape) {
    .calculadora-header {
        margin-bottom: 20px;
    }
    
    .header-icon {
        font-size: 50px;
        margin-bottom: 10px;
    }
    
    .calculadora-header h1 {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .stats-preview {
        margin-top: 15px;
        gap: 30px;
    }
    
    .pregunta-card {
        padding: 20px;
    }
    
    .pregunta-titulo {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .opciones-grid,
    .opciones-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .opciones-checkbox {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resultado-hero {
        padding: 30px 20px;
    }
    
    .resultado-icono {
        font-size: 60px;
    }
    
    .resultado-nivel {
        font-size: 70px;
    }
}

/* Muy alto (prevenir scroll excesivo) */
@media (min-height: 900px) {
    .calculadora-nivel-wpt-wrapper {
        padding: 60px 20px;
    }
}