/* ==============================================
   Zabbix Quiz - Styles
   Colores oficiales de Zabbix Brand Guidelines
   ============================================== */

/* Variables de colores oficiales de Zabbix */
:root {
    --zabbix-red: #D40000;        /* Marca (Zabbix) Rojo - Color principal */
    --zabbix-dark-blue: #0C2447;  /* Azul Oscuro Zabbix - Fondo */
    --zabbix-bright-blue: #0099CC;/* Azul Brillante Zabbix - Acento */
    --white: #FFFFFF;
    --success: #28a745;
    --error: #dc3545;
    --light-gray: #f8f9fa;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --text-dark: #333;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body con color sólido de Zabbix */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--zabbix-dark-blue);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Contenedor principal */
.container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Títulos */
h1 {
    text-align: center;
    color: var(--zabbix-red);
    margin-bottom: 30px;
    font-size: 2rem;
}

.logo {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 20px;
}

/* ==============================================
   Setup Screen
   ============================================== */
.setup-screen {
    text-align: center;
}

.setup-screen h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.input-group {
    margin: 30px 0;
}

.input-group input {
    width: 200px;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--zabbix-bright-blue);
}

.question-select {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    background-color: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
}

.question-select:focus {
    outline: none;
    border-color: var(--zabbix-bright-blue);
}

.question-select:hover {
    border-color: var(--zabbix-bright-blue);
}

/* Botones */
.btn {
    background-color: var(--zabbix-red);
    color: var(--white);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.btn:hover {
    background-color: #b30000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    background-color: #8b0000;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mensajes */
.error-msg {
    color: var(--error);
    margin-top: 15px;
    font-weight: 500;
}

.info-msg {
    color: var(--dark-gray);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ==============================================
   Quiz Screen
   ============================================== */
.quiz-screen {
    display: none;
}

/* Barra de progreso */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--medium-gray);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--zabbix-bright-blue);
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Encabezado de pregunta */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-number {
    font-size: 0.9rem;
    color: var(--zabbix-bright-blue);
    font-weight: 600;
}

.question-score {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
}

/* Texto de la pregunta */
.question-text {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Opciones */
.options {
    margin-bottom: 30px;
}

.option {
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.option:hover {
    background: #e9ecef;
    border-color: var(--zabbix-bright-blue);
    transform: translateX(5px);
}

.option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--zabbix-red);
}

.option label {
    cursor: pointer;
    flex: 1;
}

.option.selected {
    background: var(--white);
    border-color: var(--zabbix-bright-blue);
    border-width: 3px;
    font-weight: 500;
}

.option.correct {
    background: #d4edda;
    border-color: var(--success);
    border-width: 3px;
    animation: pulse 0.5s;
}

.option.incorrect {
    background: #f8d7da;
    border-color: var(--error);
    border-width: 3px;
    animation: shake 0.5s;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Feedback */
.feedback {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.feedback.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid var(--success);
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid var(--error);
}

/* Grupo de botones */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ==============================================
   Results Screen
   ============================================== */
.results-screen {
    display: none;
    text-align: center;
}

.results-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.results-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.results-score {
    font-size: 3rem;
    color: var(--zabbix-red);
    font-weight: bold;
    margin-bottom: 10px;
}

.results-percentage {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 30px;
}

.results-message {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 30px;
}

/* ==============================================
   Loading Animation
   ============================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   Responsive Design
   ============================================== */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 3rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .results-score {
        font-size: 2.5rem;
    }

    .results-icon {
        font-size: 4rem;
    }
}