:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#quiz-container {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

button {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 1rem 0;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none;
}

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

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

#timer {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-weight: bold;
}

#timer.warning {
    color: var(--warning-color);
    animation: pulse 1s infinite;
}

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

#progress-bar {
    width: 100%;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}

#progress {
    width: 0%;
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.5s ease;
}

#question-text {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid var(--secondary-color);
}

#answers {
    display: grid;
    gap: 1rem;
}

.answer-btn {
    text-align: left;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    color: #000 !important;
}

.answer-btn:hover:not(:disabled) {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.correct {
    background-color: var(--success-color) !important;
    color: white !important;
    transform: scale(1.02);
}

.incorrect {
    background-color: var(--danger-color) !important;
    color: white !important;
}

#score {
    text-align: center;
    font-size: 1.8rem;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#recommendations {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

#recommendations h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

#recommendations ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

#recommendations li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

#recommendations li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.contact-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    margin-top: 2rem;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    display: block;
    padding: 1.2rem;
    color: white;
    border-radius: 5px;
}

.contact-btn:hover {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

.explanation {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f1f9ff;
    border-radius: 5px;
    color: var(--primary-color);
    font-size: 0.95rem;
    display: none;
}

.explanation.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#start-screen p {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.8;
}