@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0f172a; /* Azul noche profundo, más elegante */
    --secondary-color: #64748b; /* Gris azulado sofisticado */
    --accent-color: #3b82f6; /* Azul brillante para CTAs */
    --success-color: #10b981; /* Verde esmeralda */
    --warning-color: #f59e0b; /* Ámbar */
    --danger-color: #ef4444; /* Rojo vibrante */
    --light-color: #f1f5f9; /* Blanco humo */
    --dark-color: #1e293b; /* Gris oscuro */
    --text-color: #334155; /* Gris pizarra */
    --bg-body: #f8fafc; /* Fondo muy claro */
    --sidebar-bg: #0f172a; /* Coincide con primary */
    --sidebar-hover: rgba(255,255,255,0.08);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.025em;
}

/* Login Page Redesign */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(0,0,0,0) 70%);
    top: -25%;
    left: -25%;
    z-index: 0;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 1;
    transition: var(--transition);
}

.login-header h2 {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

/* Dashboard Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 280px;
    max-width: 280px;
    background: var(--sidebar-bg);
    color: #94a3b8;
    transition: var(--transition);
    min-height: 100vh;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-header {
    padding: 30px 25px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

#sidebar .sidebar-header h3 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#sidebar ul.components {
    padding: 20px 15px;
}

#sidebar ul p {
    color: #64748b;
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 5px;
}

#sidebar ul li {
    margin-bottom: 8px;
}

#sidebar ul li a {
    padding: 14px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 12px;
    font-weight: 500;
}

#sidebar ul li a i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: var(--transition);
}

#sidebar ul li a:hover {
    color: #fff;
    background: var(--sidebar-hover);
    transform: translateX(4px);
}

#sidebar ul li a:hover i {
    opacity: 1;
    color: var(--accent-color);
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--accent-color);
    background: linear-gradient(135deg, var(--accent-color) 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#content {
    width: 100%;
    padding: 2rem;
    min-height: 100vh;
    transition: var(--transition);
    background-color: var(--bg-body);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.5);
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-size: 1.25rem;
}

/* Cards & Components */
.card {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

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

.card-header {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.course-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-img {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-img {
    transform: scale(1.03);
}

.course-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    line-height: 1.4;
}

.course-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress {
    border-radius: 999px;
    background-color: #e2e8f0;
    overflow: hidden;
    height: 0.6rem;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-color) 0%, #2563eb 100%);
    border-radius: 999px;
}

/* Buttons */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
    letter-spacing: 0.3px;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Stats Cards */
.stat-card {
    color: white;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, #334155 100%);
}

.stat-card.bg-gradient-primary { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.stat-card.bg-gradient-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-card.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.bg-gradient-danger  { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.stat-card .card-body {
    padding: 2rem;
    z-index: 2;
    position: relative;
}

.stat-icon {
    font-size: 5rem;
    opacity: 0.15;
    position: absolute;
    right: -10px;
    bottom: -10px;
    z-index: 1;
    transform: rotate(-15deg);
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.25;
}

/* Course Player Area */
.course-player-wrapper {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    min-height: 80vh;
}

.video-area {
    flex: 1;
    background: #000;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    min-width: 60%;
}

.video-container {
    width: 100%;
    background: black;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.video-content {
    padding: 2.5rem;
    background: white;
    z-index: 10;
    flex-grow: 1;
}

.playlist-area {
    width: 400px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    height: auto;
    max-height: 100vh;
}

.playlist-header {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.playlist-item {
    border-left: 4px solid transparent;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.playlist-item:hover {
    background: #f1f5f9;
}

.playlist-item.active {
    background: #eff6ff;
    border-left-color: var(--accent-color);
}

/* Pulse Animation for Live Buttons */
.pulse-button {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Hover Scale Effect */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

/* Pricing Table Styles */
.pricing-card {
    transition: all 0.3s ease-in-out;
    border: 0;
    border-radius: 1rem;
    overflow: hidden; /* Ensure header bg respects border radius */
}

.pricing-header {
    padding: 2.5rem 1.5rem; /* More padding as requested */
    text-align: center;
    background-color: transparent; /* Default */
}

.pricing-header.bg-primary {
    background-color: var(--primary-color) !important;
}

.pricing-price {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 1rem 0;
    line-height: 1;
}

.pricing-features {
    text-align: left;
    padding-left: 1rem;
    padding-right: 1rem;
}

.pricing-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}
