/* Modern Quiz Platform CSS - 2026 Design */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #06d6a0;
    --danger-color: #ef476f;
    --warning-color: #ffd166;
    --dark-color: #2b2d42;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: #f8fafc;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Quiz Card Special */
.quiz-card {
    position: relative;
    border: 1px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.quiz-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 5px;
}

/* Badges */
.badge {
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #06d6a0, #04b486);
    color: white;
}

/* Navigation */
.navbar {
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
}

.nav-link {
    font-weight: 600;
    padding: 10px 15px !important;
    border-radius: 8px;
    margin: 0 5px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color) !important;
}

/* Forms */
.form-control {
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Quiz Attempt Page */
.quiz-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
}

.question-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.option-card {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.option-card:hover {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
    transform: translateX(5px);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
}

.option-card.correct {
    border-color: var(--success-color);
    background: rgba(6, 214, 160, 0.1);
}

.option-card.wrong {
    border-color: var(--danger-color);
    background: rgba(239, 71, 111, 0.1);
}

.timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-block;
}

.timer.warning {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

/* Result Page */
.result-score {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.rank-badge {
    font-size: 1.2rem;
    padding: 10px 25px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: white;
    border-radius: 50px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
    padding-left: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .quiz-card {
        margin-bottom: 20px;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 10px 0;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animation Classes */
.animate-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-left {
    animation: slideInLeft 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; opacity: 0; }
.delay-2 { animation-delay: 0.4s; opacity: 0; }
.delay-3 { animation-delay: 0.6s; opacity: 0; }
.delay-4 { animation-delay: 0.8s; opacity: 0; }

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip-custom {
    position: relative;
}

.tooltip-custom:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}