/* Modern CSS with Gradient and Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Modern Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Navbar */
.navbar {
    background: white;
    padding: 20px 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    margin-left: 30px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.course-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.course-card.selected {
    border-color: #667eea;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.course-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.course-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Level Buttons */
.level-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.level-btn {
    flex: 1;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid transparent;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.level-btn.beginner {
    border-color: #4caf50;
}

.level-btn.intermediate {
    border-color: #ff9800;
}

.level-btn.advanced {
    border-color: #f44336;
}

.level-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

/* Test Interface */
.test-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
}

.timer {
    font-size: 24px;
    font-weight: 700;
    color: #f44336;
    text-align: right;
}

.question-number {
    background: #667eea;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 20px;
}

.question-text {
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.option.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

/* Results Page */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 20px auto;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.level-badge {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    margin: 20px 0;
}

.level-badge.beginner { background: #4caf50; color: white; }
.level-badge.intermediate { background: #ff9800; color: white; }
.level-badge.advanced { background: #f44336; color: white; }

/* Admin Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f5f5f5;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: #f9f9f9;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .navbar {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        margin-top: 15px;
    }
    
    .nav-links a {
        margin: 0 10px;
    }
    
    .level-buttons {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}