/* Custom CSS for Ferga */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Code block styling */
pre {
    background: #1e293b !important;
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid #334155;
}

code {
    font-family: 'JetBrains Mono', monospace;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation for slide in */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

/* Pulse glow for current level */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Quiz option selected state */
.quiz-option.selected {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.1) !important;
}

/* Timer warning states */
.timer-warning {
    color: #f97316;
    animation: pulse 1s infinite;
}

.timer-danger {
    color: #ef4444;
    animation: pulse 0.5s infinite;
}

/* Code editor container */
.code-editor-container {
    font-family: 'JetBrains Mono', monospace;
    tab-size: 4;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #334155;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Glass effect cards */
.glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Notification container */
#notification-container > div {
    opacity: 0;
    transform: translateX(100%);
}

/* Progress bar animation */
.progress-bar-animate {
    transition: width 0.5s ease-out;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .level-node {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    .level-node span,
    .level-node i {
        font-size: 1rem !important;
    }
}
