/* Custom styles for the platform */

/* Brand Colors */
:root {
    --primary-orange: #FF8C00;
    --primary-yellow: #FDB913;
    --gradient-start: #FDB913;
    --gradient-end: #FF8C00;
    --dark-gray: #1F2937;
    --light-gray: #F9FAFB;
    --border-gray: #E5E7EB;
}

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

/* Aspect ratio for video containers */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, transform, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.bg-gradient-primary-soft {
    background: linear-gradient(135deg, rgba(253, 185, 19, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
}

/* Modern card styles */
.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-modern:hover {
    box-shadow: 0 10px 30px rgba(255, 140, 0, 0.15);
    transform: translateY(-4px);
}

/* Modern buttons */
.btn-primary-modern {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.btn-primary-modern:hover {
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    transform: translateY(-2px);
}

.btn-secondary-modern {
    background: white;
    color: var(--primary-orange);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: 2px solid var(--primary-orange);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-modern:hover {
    background: var(--primary-orange);
    color: white;
}

/* Progress bar modern */
.progress-modern {
    height: 8px;
    background: #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-modern {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* Badge modern */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(253, 185, 19, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
    color: var(--primary-orange);
}

/* Input modern */
.input-modern {
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: white;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Sidebar modern */
.sidebar-modern {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    border-right: 1px solid var(--border-gray);
}

/* Nav modern */
.nav-modern {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4F46E5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Prose styles for lesson descriptions */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1em;
}

.prose ul, .prose ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.prose li {
    margin-bottom: 0.5em;
}

/* Alert animations */
@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-enter {
    animation: slideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

button:focus, a:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Disabled state */
button:disabled, input:disabled, select:disabled, textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
}
