:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
    color: #333;
}

/* Navbar customization */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
}

/* Card styling */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* Test difficulty badges */
.badge-difficulty-easy {
    background-color: var(--success-color);
}

.badge-difficulty-medium {
    background-color: var(--warning-color);
    color: #000;
}

.badge-difficulty-hard {
    background-color: var(--danger-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .footer .col-md-4, .footer .col-md-3 {
        margin-bottom: 2rem;
    }
}

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

.alert {
    animation: fadeIn 0.3s ease-out;
}

/* Test card styling */
.test-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.test-card .card-footer {
    background: transparent;
    border-top: none;
    margin-top: auto;
}

/* Progress bars */
.progress {
    height: 0.75rem;
    border-radius: 0.35rem;
}

.progress-bar {
    background-color: var(--primary-color);
}
/* Results Page Specific */
.question-result {
    transition: all 0.3s ease;
}

.question-result:hover {
    transform: translateX(5px);
}

.progress {
    position: relative;
}

.progress-bar {
    transition: width 1s ease-in-out;
}

.progress span {
    position: absolute;
    display: block;
    width: 100%;
    color: #000;
    font-weight: bold;
    text-shadow: 0 0 2px #fff;
}

/* Timeline for activity */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-icon {
    position: absolute;
    left: -50px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-content {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 0.35rem;
}

/* Answer key styling */
.explanation {
    border-left: 3px solid var(--info-color);
}

/* Leaderboard styling */
.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}