:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --border-radius: 16px;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
    display: none !important;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background-gradient);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 700px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    text-align: center;
    color: var(--text-main);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background-color: white;
    color: var(--text-main);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.5);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.app-footer {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.app-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.app-footer a:hover {
    color: var(--primary-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.text-sm {
    font-size: 0.875rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.secondary-btn {
    background-color: #e5e7eb;
    color: var(--text-main);
    box-shadow: none;
}

.secondary-btn:hover {
    background-color: #d1d5db;
    box-shadow: none;
}

#about-content p {
    margin-bottom: 0.5rem;
}
    box-shadow: none;
}

.hidden {
    display: none;
}

#quiz-panel {
    margin-top: 1rem;
}

.question-card {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.4;
}

.options {
    list-style-type: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.option-item {
    background-color: white;
    border: 2px solid #e5e7eb;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.option-item:hover {
    border-color: var(--primary-color);
    background-color: #f5f7ff;
}

.option-item.selected {
    background-color: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.option-item.correct {
    background-color: #ecfdf5;
    border-color: var(--secondary-color);
    color: #065f46;
}

.option-item.incorrect {
    background-color: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.analysis {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

#controls button {
    flex: 1;
}

#controls button#prev-btn {
    background-color: white;
    color: var(--text-secondary);
    border: 2px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
}

#controls button#prev-btn:hover {
    border-color: var(--text-secondary);
    background-color: #f9fafb;
}

#controls button#prev-btn:disabled {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #d1d5db;
}

#progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 999px;
    margin-bottom: 2rem;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 999px;
}

#result-panel {
    text-align: center;
}

#result-panel h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

#result-panel p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#score {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.5rem;
}

#result-details {
    text-align: left;
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for result details */
#result-details::-webkit-scrollbar {
    width: 8px;
}
#result-details::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
#result-details::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
#result-details::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.result-item {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-question {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.result-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.status-correct {
    color: var(--secondary-color);
}

.status-incorrect {
    color: var(--danger-color);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    #controls {
        flex-direction: column;
    }
    
    #controls button {
        width: 100%;
    }
}

/* Text Button */
.modal-footer-actions {
    margin-top: 1rem;
    text-align: center;
}

.text-btn {
    background: none;
    border: none;
    color: #9ca3af;
    text-decoration: underline;
    font-size: 0.75rem;
    padding: 0.25rem;
    box-shadow: none;
    width: auto;
    display: inline-block;
    cursor: pointer;
}

.text-btn:hover {
    background: none;
    color: var(--text-secondary);
    transform: none;
    box-shadow: none;
}
