/* Custom CSS for Interactive Training Dashboard */

/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Navigation Styles */
.nav-link {
    @apply text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}

.nav-link.active {
    @apply text-blue-600 bg-blue-50;
}

.mobile-nav-link {
    @apply text-gray-500 hover:text-gray-900 block px-3 py-2 rounded-md text-base font-medium transition-colors duration-200;
}

.mobile-nav-link.active {
    @apply text-blue-600 bg-blue-50;
}

/* Section Content */
.section-content {
    @apply transition-all duration-300 ease-in-out;
}

/* Progress Bars */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2 overflow-hidden;
}

.progress-bar-fill {
    @apply h-full transition-all duration-500 ease-out;
}

.progress-bar-fill.blue {
    @apply bg-gradient-to-r from-blue-500 to-blue-600;
}

.progress-bar-fill.green {
    @apply bg-gradient-to-r from-green-500 to-green-600;
}

.progress-bar-fill.purple {
    @apply bg-gradient-to-r from-purple-500 to-purple-600;
}

.progress-bar-fill.orange {
    @apply bg-gradient-to-r from-orange-500 to-orange-600;
}

/* Course Cards */
.course-card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 hover:shadow-md transition-shadow duration-200 cursor-pointer overflow-hidden;
}

.course-card:hover {
    @apply transform -translate-y-1 shadow-lg;
}

.course-thumbnail {
    @apply w-full h-40 object-cover bg-gradient-to-br from-blue-400 to-purple-500;
}

.course-difficulty-badge {
    @apply px-2 py-1 text-xs font-medium rounded-full;
}

.difficulty-beginner {
    @apply bg-green-100 text-green-800;
}

.difficulty-intermediate {
    @apply bg-yellow-100 text-yellow-800;
}

.difficulty-advanced {
    @apply bg-red-100 text-red-800;
}

/* Badge Styles */
.badge-item {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 p-4 text-center transition-transform duration-200 hover:scale-105;
}

.badge-item.earned {
    @apply border-yellow-300 bg-yellow-50;
}

.badge-item.locked {
    @apply opacity-60;
}

.badge-icon {
    @apply text-4xl mb-2;
}

.badge-filter-btn {
    @apply px-4 py-2 text-sm font-medium rounded-lg border border-gray-300 text-gray-700 hover:bg-gray-50 transition-colors duration-200;
}

.badge-filter-btn.active {
    @apply bg-blue-600 text-white border-blue-600;
}

/* Quiz Styles */
.quiz-item {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 p-6;
}

.quiz-question {
    @apply mb-6;
}

.quiz-option {
    @apply block w-full text-left p-3 border border-gray-200 rounded-md mb-2 hover:bg-gray-50 transition-colors duration-200;
}

.quiz-option.selected {
    @apply bg-blue-50 border-blue-300 text-blue-900;
}

.quiz-option.correct {
    @apply bg-green-50 border-green-300 text-green-900;
}

.quiz-option.incorrect {
    @apply bg-red-50 border-red-300 text-red-900;
}

/* Leaderboard Styles */
.leaderboard-item {
    @apply flex items-center justify-between p-4 hover:bg-gray-50 transition-colors duration-200;
}

.leaderboard-rank {
    @apply flex items-center space-x-4;
}

.rank-number {
    @apply w-8 h-8 flex items-center justify-center rounded-full font-bold text-white text-sm;
}

.rank-1 {
    @apply bg-yellow-500;
}

.rank-2 {
    @apply bg-gray-400;
}

.rank-3 {
    @apply bg-orange-400;
}

.rank-other {
    @apply bg-gray-300 text-gray-700;
}

/* Podium Styles */
.podium-item {
    @apply text-center;
}

.podium-1 {
    @apply order-2;
}

.podium-2 {
    @apply order-1;
}

.podium-3 {
    @apply order-3;
}

.podium-avatar {
    @apply w-16 h-16 rounded-full mx-auto mb-2 border-4;
}

.podium-1 .podium-avatar {
    @apply border-yellow-400;
}

.podium-2 .podium-avatar {
    @apply border-gray-400;
}

.podium-3 .podium-avatar {
    @apply border-orange-400;
}

/* Modal Styles */
.modal {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-overlay {
    @apply fixed inset-0 bg-black bg-opacity-50 transition-opacity duration-300;
}

.modal-container {
    @apply relative mx-auto my-20 max-w-3xl bg-white rounded-lg shadow-2xl;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification Styles */
.notification {
    @apply fixed top-4 right-4 px-6 py-3 rounded-lg shadow-lg text-white font-medium z-50 transition-all duration-300;
}

.notification.success {
    @apply bg-green-500;
}

.notification.error {
    @apply bg-red-500;
}

.notification.info {
    @apply bg-blue-500;
}

.notification.warning {
    @apply bg-yellow-500;
}

/* Loading Spinner */
.spinner {
    @apply inline-block w-6 h-6 border-2 border-gray-300 border-t-blue-600 rounded-full animate-spin;
}

/* Subscription Tier Styles */
.subscription-tier {
    @apply border-2 rounded-lg p-6 text-center transition-all duration-200 hover:shadow-lg cursor-pointer;
}

.tier-free {
    @apply border-gray-300 hover:border-gray-400;
}

.tier-basic {
    @apply border-blue-300 hover:border-blue-400;
}

.tier-premium {
    @apply border-purple-300 hover:border-purple-400 bg-purple-50;
}

.tier-lifetime {
    @apply border-yellow-300 hover:border-yellow-400 bg-yellow-50;
}

.tier-popular {
    @apply relative border-blue-500 bg-blue-50;
}

.tier-popular::before {
    content: 'Most Popular';
    @apply absolute -top-3 left-1/2 transform -translate-x-1/2 bg-blue-500 text-white px-3 py-1 rounded-full text-sm font-medium;
}

/* Video Player Styles */
.video-player {
    @apply w-full aspect-video bg-black rounded-lg overflow-hidden;
}

/* Chart Container */
.chart-container {
    @apply relative w-full;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        @apply mx-4 my-10 max-w-none;
    }
    
    .podium-item {
        @apply mb-4;
    }
    
    .course-card {
        @apply mb-4;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-300 rounded;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400;
}

/* Focus States */
button:focus,
input:focus,
select:focus,
textarea:focus {
    @apply outline-none ring-2 ring-blue-500 ring-offset-2;
}

/* Utility Classes */
.text-gold-500 {
    color: #f59e0b;
}

.bg-gold-500 {
    background-color: #f59e0b;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .bg-white {
        @apply bg-gray-800;
    }
    
    .dark-mode .text-gray-900 {
        @apply text-white;
    }
    
    .dark-mode .border-gray-200 {
        @apply border-gray-700;
    }
}