/**
 * Estilos del Test de Redes Sociales - Frontend
 */

/* Reset y variables */
:root {
    --trs-primary: #4a90e2;
    --trs-secondary: #2c3e50;
    --trs-success: #51cf66;
    --trs-warning: #ffa500;
    --trs-danger: #ff6b6b;
    --trs-gray-50: #f8f9fa;
    --trs-gray-100: #f0f0f0;
    --trs-gray-200: #e0e0e0;
    --trs-gray-300: #c0c0c0;
    --trs-gray-600: #666666;
    --trs-gray-900: #333333;
    --trs-border-radius: 8px;
    --trs-transition: all 0.3s ease;
}

/* Container principal */
.trs-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--trs-gray-900);
}

/* Introducción */
.trs-intro {
    display: none;
    background: white;
    padding: 40px;
    border-radius: var(--trs-border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.trs-intro.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.trs-main-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--trs-secondary);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.trs-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--trs-gray-600);
    margin: 0 0 20px 0;
}

.trs-description {
    font-size: 16px;
    margin: 0 0 30px 0;
}

.trs-benefits {
    background: var(--trs-gray-50);
    padding: 20px;
    border-left: 4px solid var(--trs-primary);
    margin: 20px 0;
    border-radius: 4px;
}

.trs-benefits h3 {
    margin-top: 0;
    color: var(--trs-secondary);
    font-size: 18px;
}

.trs-benefits ul {
    margin: 10px 0;
    padding-left: 20px;
}

.trs-benefits li {
    margin: 8px 0;
}

.trs-important {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.trs-duration {
    font-size: 16px;
    margin: 20px 0;
    color: var(--trs-gray-600);
}

/* Formulario */
.trs-form {
    background: white;
    padding: 40px;
    border-radius: var(--trs-border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Barra de progreso */
.trs-progress-container {
    margin-bottom: 30px;
}

.trs-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--trs-gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.trs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--trs-primary), #5ba3ff);
    transition: width 0.5s ease;
}

.trs-progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--trs-gray-600);
    font-weight: 500;
}

/* Steps */
.trs-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.trs-step.active {
    display: block;
}

.trs-step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--trs-secondary);
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--trs-gray-100);
}

/* Fields */
.trs-field {
    margin-bottom: 25px;
}

.trs-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--trs-secondary);
}

.trs-field .required {
    color: var(--trs-danger);
}

.trs-field input[type="text"],
.trs-field input[type="email"],
.trs-field input[type="tel"],
.trs-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trs-gray-200);
    border-radius: 4px;
    font-size: 16px;
    transition: var(--trs-transition);
    box-sizing: border-box;
}

.trs-field input:focus,
.trs-field select:focus {
    outline: none;
    border-color: var(--trs-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Radio groups */
.trs-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.trs-radio-group label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid var(--trs-gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--trs-transition);
    font-weight: 400;
}

.trs-radio-group label:hover {
    border-color: var(--trs-primary);
    background: var(--trs-gray-50);
}

.trs-radio-group input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.trs-radio-group label:has(input:checked) {
    border-color: var(--trs-primary);
    background: rgba(74, 144, 226, 0.1);
    font-weight: 600;
}

/* Questions */
.trs-question {
    margin-bottom: 35px;
    padding: 20px;
    background: var(--trs-gray-50);
    border-radius: var(--trs-border-radius);
}

.trs-question-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--trs-secondary);
}

.trs-question textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trs-gray-200);
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.trs-question textarea:focus {
    outline: none;
    border-color: var(--trs-primary);
}

/* Botones */
.trs-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trs-transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.trs-btn-primary {
    background: var(--trs-primary);
    color: white;
}

.trs-btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.trs-btn-secondary {
    background: var(--trs-gray-100);
    color: var(--trs-secondary);
}

.trs-btn-secondary:hover {
    background: var(--trs-gray-200);
}

.trs-btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

/* Navegación */
.trs-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--trs-gray-100);
}

/* Loading */
.trs-loading {
    text-align: center;
    padding: 40px;
}

.trs-spinner {
    border: 4px solid var(--trs-gray-100);
    border-top: 4px solid var(--trs-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Error */
.trs-error {
    background: #fee;
    border: 1px solid var(--trs-danger);
    color: var(--trs-danger);
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

/* Resultados */
.trs-result {
    background: white;
    padding: 40px;
    border-radius: var(--trs-border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.trs-result-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--trs-gray-100);
}

.trs-result-header h2 {
    font-size: 28px;
    color: var(--trs-secondary);
    margin: 0 0 30px 0;
}

.trs-result-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.trs-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--trs-primary), #5ba3ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

.trs-result-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
}

.trs-result-badge.nivel-1 {
    background: var(--trs-danger);
    color: white;
}

.trs-result-badge.nivel-2 {
    background: var(--trs-warning);
    color: white;
}

.trs-result-badge.nivel-3 {
    background: var(--trs-success);
    color: white;
}

.trs-result-content {
    max-width: 700px;
    margin: 0 auto;
}

.trs-result-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--trs-gray-50);
    border-left: 4px solid var(--trs-primary);
    border-radius: 4px;
}

.trs-result-section h3 {
    margin-top: 0;
    color: var(--trs-secondary);
    font-size: 20px;
}

.trs-result-cta {
    text-align: center;
    margin: 40px 0;
}

.trs-about {
    margin-top: 50px;
    padding: 30px;
    background: #f0f7ff;
    border-radius: var(--trs-border-radius);
}

.trs-about h2 {
    color: var(--trs-secondary);
    font-size: 24px;
    margin-top: 0;
}

.trs-about h3 {
    color: var(--trs-primary);
    font-size: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .trs-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .trs-intro,
    .trs-form,
    .trs-result {
        padding: 25px 20px;
    }
    
    .trs-main-title {
        font-size: 24px;
    }
    
    .trs-subtitle {
        font-size: 16px;
    }
    
    .trs-step-title {
        font-size: 20px;
    }
    
    .trs-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .trs-btn {
        width: 100%;
    }
    
    .trs-score-circle {
        width: 120px;
        height: 120px;
        font-size: 36px;
    }
}

@media print {
    .trs-navigation,
    .trs-progress-container {
        display: none;
    }
}

