body {
    background: linear-gradient(to right, #0f0c29, #302b63, #24243e);
    color: white;
    font-family: 'Tahoma', sans-serif;
    direction: rtl;
    transition: background 0.5s, color 0.5s;
    will-change: transform;
}

body.dark-mode {
    background: linear-gradient(to right, #121212, #1e1e1e, #2c2c2c);
    color: #e0e0e0;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: background 0.5s;
}

body.dark-mode .card {
    background: rgba(0, 0, 0, 0.5);
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-in {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.btn-primary {
    background: #007bff;
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 1.5s infinite;
    min-width: 120px;
    padding: 10px 20px;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #007bff;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.feedback-correct { color: green; animation: fadeIn 0.5s; }
.feedback-wrong { color: red; animation: fadeIn 0.5s; }

.progress { height: 10px; margin-bottom: 20px; }

.table { color: inherit; }
.table th, .table td { border-color: rgba(255,255,255,0.2); }
body.dark-mode .table { border-color: rgba(0,0,0,0.2); }

@media (max-width: 576px) {
    .btn { font-size: 1.1rem; padding: 12px; }
    .card { padding: 1rem; }
    .form-control { font-size: 1.1rem; }
}

@media (min-width: 768px) {
    .container { max-width: 90%; }
}