/* 
 * Kruton Online E-Learning Platform
 * Custom Styles
 */

/* ===== Global Styles ===== */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.btn-floating:hover {
    transform: translateY(-5px);
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* ===== Navbar ===== */
.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ===== Course Card ===== */
.course-card {
    height: 100%;
    transition: var(--transition);
}

.course-card .card-body {
    display: flex;
    flex-direction: column;
}

.course-card .card-footer {
    margin-top: auto;
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-price.free {
    color: var(--success-color);
}

/* ===== Star Rating ===== */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating i {
    font-size: 0.875rem;
}

/* ===== Progress Bar ===== */
.progress {
    height: 8px;
    border-radius: 1rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 1rem;
    background: var(--gradient-success);
}

/* ===== Badge ===== */
.badge {
    padding: 0.35em 0.75em;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* ===== Form Controls ===== */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ===== Auth Pages ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 2rem 0;
}

.auth-card {
    max-width: 450px;
    width: 100%;
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 2rem;
    text-align: center;
}

.auth-body {
    padding: 2rem;
}

/* ===== Dashboard ===== */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== Video Player ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: #000;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Sidebar ===== */
.sidebar {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.lesson-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.lesson-item:hover {
    background: #f8f9fa;
}

.lesson-item.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.lesson-item.completed {
    border-left: 4px solid var(--success-color);
}

/* ===== Table ===== */
.table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

.table thead {
    background: #f8f9fa;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* ===== Utilities ===== */
.text-muted {
    color: #6c757d !important;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-warning {
    background: var(--gradient-warning) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .btn-floating {
        bottom: 20px;
        right: 20px;
    }
}

/* ===== Loading Spinner ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== 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;
}
