/* Custom CSS for Mini Quiz Bankası - DaisyUI Compatible */

/* Override button colors to ensure dark blue theme */
.btn-primary {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.btn-primary:focus {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3) !important;
}

.btn-primary:active {
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

.btn-primary:disabled {
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
    opacity: 0.6 !important;
}

/* Secondary button colors - darker blue */
.btn-secondary {
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

.btn-secondary:focus {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.3) !important;
}

.btn-secondary:active {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
}

/* Accent button colors - lighter blue */
.btn-accent {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

.btn-accent:hover {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.btn-accent:focus {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

.btn-accent:active {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* Radio button colors - dark blue */
.radio-primary {
    --tw-ring-color: #1e40af !important;
}

.radio-primary:checked {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

.radio-primary:focus {
    --tw-ring-color: #1e40af !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3) !important;
}

/* Checkbox colors - dark blue */
.checkbox-primary {
    --tw-ring-color: #1e40af !important;
}

.checkbox-primary:checked {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

.checkbox-primary:focus {
    --tw-ring-color: #1e40af !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3) !important;
}

/* Range slider colors - dark blue */
.range-primary::-webkit-slider-thumb {
    background-color: #1e40af !important;
}

.range-primary::-moz-range-thumb {
    background-color: #1e40af !important;
}

.range-primary:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3) !important;
}

.range-primary:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3) !important;
}

/* Progress bar colors - dark blue */
.progress-primary {
    background-color: #1e40af !important;
}

/* Badge colors - dark blue */
.badge-primary {
    background-color: #1e40af !important;
    color: #ffffff !important;
}

/* Alert colors - dark blue for info */
.alert-info {
    background-color: rgba(30, 64, 175, 0.1) !important;
    border-color: #1e40af !important;
    color: #1e40af !important;
}

/* Link colors - dark blue */
.link-primary {
    color: #1e40af !important;
}

.link-primary:hover {
    color: #1d4ed8 !important;
}

/* Tab colors - dark blue */
.tab-primary {
    color: #1e40af !important;
    border-color: #1e40af !important;
}

.tab-primary.tab-active {
    background-color: #1e40af !important;
    color: #ffffff !important;
}

/* Tooltip colors - dark blue */
.tooltip-primary {
    background-color: #1e40af !important;
    color: #ffffff !important;
}

.tooltip-primary::before {
    border-top-color: #1e40af !important;
}

/* Icon colors - dark blue theme */
.fas.fa-play {
    color: #1e40af !important;
}

.fas.fa-play.text-primary {
    color: #1e40af !important;
}

.fas.fa-play.text-white {
    color: #ffffff !important;
}

/* Navigation menu icons */
.navbar .fas.fa-play {
    color: #1e40af !important;
}

.navbar .fas.fa-history {
    color: #6b7280 !important;
}

.navbar .fas.fa-cog {
    color: #6b7280 !important;
}

/* Navigation menu links */
.navbar a {
    color: #374151 !important;
    transition: color 0.2s ease-in-out;
}

.navbar a:hover {
    color: #1e40af !important;
}

.navbar a:hover .fas.fa-play {
    color: #1e40af !important;
}

.navbar a:hover .fas.fa-history {
    color: #1e40af !important;
}

.navbar a:hover .fas.fa-cog {
    color: #1e40af !important;
}

/* Dark mode navbar styles */
.dark .navbar a {
    color: #f9fafb !important;
}

.dark .navbar a:hover {
    color: #60a5fa !important;
}

.dark .navbar .fas.fa-play {
    color: #60a5fa !important;
}

.dark .navbar .fas.fa-history {
    color: #9ca3af !important;
}

.dark .navbar .fas.fa-cog {
    color: #9ca3af !important;
}

.dark .navbar a:hover .fas.fa-play {
    color: #60a5fa !important;
}

.dark .navbar a:hover .fas.fa-history {
    color: #60a5fa !important;
}

.dark .navbar a:hover .fas.fa-cog {
    color: #60a5fa !important;
}

/* Navbar brand/logo in dark mode */
.dark .navbar .btn-ghost {
    color: #f9fafb !important;
}

.dark .navbar .btn-ghost:hover {
    color: #60a5fa !important;
}

/* Mobile menu in dark mode */
.dark .navbar .dropdown-content a {
    color: #f9fafb !important;
}

.dark .navbar .dropdown-content a:hover {
    color: #60a5fa !important;
    background-color: rgba(96, 165, 250, 0.1) !important;
}

/* Button icons - ensure they match button colors */
.btn-primary .fas {
    color: #ffffff !important;
}

.btn-secondary .fas {
    color: #ffffff !important;
}

.btn-accent .fas {
    color: #ffffff !important;
}

/* Card icons - dark blue theme */
.card .fas.fa-play {
    color: #1e40af !important;
}

.card .fas.fa-history {
    color: #10b981 !important;
}

.card .fas.fa-cog {
    color: #f59e0b !important;
}


/* Custom Utilities & Overrides */
@layer utilities {
    .fade-in {
        animation: fadeIn 0.3s ease-out;
    }
}

/* Custom Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Custom Tooltip */
.tooltip-custom {
    position: fixed;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* Enhanced Card Hover Effect */
.card-hover {
    @apply transition-all duration-300 hover:shadow-xl hover:-translate-y-1;
}

/* Progress Bar Animation */
.progress-animated {
    @apply transition-all duration-500 ease-out;
}

/* Custom Scrollbar for Dark Mode */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    @apply bg-base-200;
}

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

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

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    #themeToggle {
        display: none !important;
    }
    
    body {
        @apply bg-white text-black;
    }
}

/* Responsive Helpers */
@media (max-width: 768px) {
    .responsive-text {
        @apply text-sm;
    }
    
    .responsive-card {
        @apply p-4;
    }
}

/* Loading Spinner */
.spinner-custom {
    @apply inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary;
}

/* Toast positioning fix */
.toast {
    z-index: 9999 !important;
}

/* Modal backdrop enhancement */
.modal-backdrop {
    @apply bg-black bg-opacity-50 backdrop-blur-sm;
}

/* Focus visible for accessibility */
*:focus-visible {
    @apply outline-2 outline-offset-2 outline-primary;
}

/* Smooth transitions for theme switching */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
}

/* Disable transitions for motion-reduced preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom badge styles */
.badge-custom {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold;
}

/* Enhanced button states */
.btn-custom {
    @apply transition-all duration-200 active:scale-95;
}

/* Question choice hover effect */
.choice-item {
    @apply transition-all duration-200 cursor-pointer;
}

.choice-item:hover .card {
    @apply bg-base-300 shadow-md;
}

.choice-item.selected .card {
    @apply bg-primary text-primary-content border-2 border-primary;
}

.choice-item.correct .card {
    @apply bg-success text-success-content border-2 border-success;
}

.choice-item.incorrect .card {
    @apply bg-error text-error-content border-2 border-error;
}

/* Radio button styling */
.choice-item input[type="radio"] {
    @apply mr-3;
}

.choice-item.selected input[type="radio"] {
    @apply radio-primary;
}

/* Stats card animation */
.stat-card {
    @apply transition-all duration-300 hover:scale-105;
}

/* Custom range slider (for difficulty rating) */
input[type="range"] {
    @apply w-full h-2 bg-base-300 rounded-lg appearance-none cursor-pointer;
}

input[type="range"]::-webkit-slider-thumb {
    @apply appearance-none w-4 h-4 bg-primary rounded-full cursor-pointer hover:scale-125 transition-transform;
}

input[type="range"]::-moz-range-thumb {
    @apply w-4 h-4 bg-primary rounded-full cursor-pointer hover:scale-125 transition-transform;
}

/* Skeleton loading for future use */
.skeleton {
    @apply animate-pulse bg-base-300 rounded;
}

/* Course card styles */
.course-card {
    @apply card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow duration-300;
}

/* Exam progress indicator */
.exam-progress {
    @apply relative overflow-hidden;
}

.exam-progress::before {
    content: '';
    @apply absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Alert enhancements */
.alert {
    @apply shadow-lg;
}

/* Table enhancements for dark mode */
.table :where(thead, tfoot) {
    @apply bg-base-200;
}

.table :where(tbody tr):hover {
    @apply bg-base-200;
}

/* Dropdown menu enhancements */
.dropdown-content {
    @apply shadow-xl border border-base-300;
}

/* Form input enhancements */
.form-control .label {
    @apply font-medium;
}

input.input-error,
textarea.input-error,
select.input-error {
    @apply border-error focus:border-error focus:ring-error;
}

/* Glass effect for hero sections */
.glass-effect {
    @apply bg-base-100/80 backdrop-blur-lg border border-base-300/50;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Icon container */
.icon-container {
    @apply flex items-center justify-center rounded-full transition-all duration-300;
}

.icon-container:hover {
    @apply scale-110 rotate-6;
}

/* Slow spin animation for cog icon */
.animate-spin-slow {
    animation: spin 3s linear infinite;
}

/* Enhanced icon effects */
.icon-glow {
    position: relative;
}

.icon-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(8px);
    opacity: 0.3;
    z-index: -1;
}

/* Icon hover effects */
.icon-hover-effect {
    @apply transition-all duration-300 hover:scale-110 hover:rotate-12;
}

/* Gradient icon backgrounds */
.icon-gradient-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #3b82f6 100%);
}

.icon-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #10b981 100%);
}

.icon-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
}

.icon-gradient-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #ef4444 100%);
}

/* Icon shadow effects */
.icon-shadow-primary {
    box-shadow: 0 10px 25px -5px rgba(30, 64, 175, 0.3), 0 4px 6px -2px rgba(30, 64, 175, 0.1);
}

.icon-shadow-success {
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

.icon-shadow-warning {
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3), 0 4px 6px -2px rgba(245, 158, 11, 0.1);
}

.icon-shadow-error {
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3), 0 4px 6px -2px rgba(239, 68, 68, 0.1);
}

/* Pulse animation for icon backgrounds */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}

/* Icon bounce effect */
@keyframes iconBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.icon-bounce {
    animation: iconBounce 1s ease-in-out;
}

/* Icon wiggle effect */
@keyframes iconWiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

.icon-wiggle {
    animation: iconWiggle 1s ease-in-out;
}

