/* Estilos para test-mbti.html y test-bigfive.html */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #667eea, #764ba2, #8b5cf6, #6366f1);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.screen { display: none; }
.screen.active { display: block; }
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; position: relative; z-index: 1; }

.volver-portal {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.volver-portal a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #6c5ce7;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.volver-portal a:hover {
    background: #6c5ce7;
    color: white;
    transform: translateX(-5px) scale(1.05);
}

.welcome-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    border: 2px solid rgba(255,255,255,0.3);
}

h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 800;
}

.intro-text {
    color: #555;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.test-info {
    display: flex;
    justify-content: space-around;
    margin: 40px 0;
    gap: 20px;
}

.info-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 20px;
    flex: 1;
    color: white;
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.info-item .number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-item .label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102,126,234,0.5);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.quiz-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.3);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 20px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    border-radius: 20px;
}

.question-header {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.question-text {
    color: #2c3e50;
    font-size: 26px;
    margin-bottom: 40px;
    font-weight: 600;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: white;
    border: 3px solid #e0e0e0;
    padding: 20px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    transform: translateX(10px);
}

.option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.option-number {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.option.selected .option-number {
    background: rgba(255,255,255,0.3);
    color: white;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.results-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.3);
}

/* --- ESTILOS MBTI --- */
.mbti-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 15px 50px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

.result-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border: 5px solid white;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    background: white;
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tipo-mbti h2 {
    font-size: 80px;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: 15px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.tipo-mbti h3 {
    font-size: 36px;
    margin-bottom: 20px;
}

.descripcion-mbti {
    font-size: 20px;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.dimensiones-mbti {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dimensiones-mbti h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

.dimension {
    margin: 30px 0;
}

.dimension-header {
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.dimension-bar {
    display: flex;
    height: 50px;
    background: #f0f0f0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.bar-left, .bar-right {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: width 0.7s ease;
    font-size: 18px;
}

.bar-left {
    background: linear-gradient(90deg, #667eea, #a29bfe);
}

.bar-right {
    background: linear-gradient(90deg, #fd79a8, #fdcb6e);
}

.caracteristicas-mbti {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.caracteristica {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.caracteristica:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.caracteristica h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 22px;
}

.caracteristica p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
}

/* --- ESTILOS BIG FIVE --- */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 15px 50px rgba(102,126,234,0.4);
}

.dimensiones-bigfive {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dimensiones-bigfive h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.dimension-score {
    color: #667eea;
    font-size: 24px;
}

.dimension-bar {
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.dimension-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #a29bfe);
    border-radius: 20px;
    transition: width 0.7s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: bold;
}

.dimension-description {
    margin-top: 10px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.interpretacion {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
}

.interpretacion h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 22px;
}

.interpretacion p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
}

/* --- ESTILOS FORMULARIO --- */
.formulario-opcional {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 32px; }
    .welcome-box, .quiz-box, .results-box { padding: 30px 20px; }
    .tipo-mbti h2 { font-size: 56px; letter-spacing: 8px; }
    .tipo-mbti h3 { font-size: 24px; }
    .test-info { flex-direction: column; }
    .caracteristicas-mbti { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .navigation { flex-direction: column; }
    .option { padding: 15px; }
}