/* FBCourse.com - Main Stylesheet */
/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1877f2;
    --primary-dark: #166fe5;
    --secondary: #42b72a;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #27ae60;
    --dark: #1c1e21;
    --light: #f0f2f5;
    --white: #ffffff;
    --gray: #65676b;
    --gray-light: #e4e6eb;
    --border: #ddd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Sinhala', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-full {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Header */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    font-weight: bold;
    font-size: 20px;
}

.logo-icon {
    margin-right: 6px;
    font-size: 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-icon {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark);
}

#menu-toggle {
    display: none;
}



/* WhatsApp Banner */
.whatsapp-banner {
    background: linear-gradient(135deg, var(--warning), #e67e22);
    color: var(--white);
    padding: 12px 0;
    text-align: center;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.banner-icon {
    font-size: 24px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

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

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

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.price-tag {
    margin: 30px 0;
}

.old-price {
    font-size: 24px;
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 15px;
}

.new-price {
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 40px;
}

/* Demo Video */
.demo-section {
    background: var(--white);
    padding: 0;
    margin: 0;
}

.demo-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.demo-description {
    text-align: center;
    font-size: 17px;
    color: var(--dark);
    font-weight: 500;
    margin: 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e0e0e0;
}

.demo-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

/* Subtitle Container */
.subtitle-container {
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle-text {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .subtitle-container {
        padding: 12px 15px;
        min-height: 50px;
    }
    
    .subtitle-text {
        font-size: 16px;
        line-height: 1.5;
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-number {
    display: inline-block;
    padding: 8px 14px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
    .pagination {
        margin-top: 30px;
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .pagination-number {
        padding: 6px 10px;
        font-size: 14px;
        min-width: 35px;
    }
}

@media (max-width: 768px) {
    .demo-description {
        font-size: 15px;
        padding: 12px 15px;
        line-height: 1.5;
    }
}

@media (min-width: 769px) {
    .demo-wrapper {
        max-width: 900px;
        margin: 20px auto;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
}

/* Lessons Grid */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.lesson-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.lesson-card:hover:not(.locked) {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
}

.lesson-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.lesson-card.locked:hover {
    transform: none;
}

.lesson-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.lesson-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-size: 48px;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    font-size: 48px;
}

.lesson-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.lesson-info {
    padding: 20px;
}

.lesson-number {
    color: var(--primary);
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}

.lesson-title {
    font-size: 18px;
    margin: 10px 0;
    color: var(--dark);
}

.lesson-description {
    font-size: 14px;
    color: var(--gray);
}

/* Features */
.features {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-box {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background: var(--light);
    transition: transform 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-box h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* Enroll CTA */
.enroll-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
}

.cta-text {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Countdown Timer */
.countdown-timer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

.timer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.timer-label {
    font-weight: bold;
    font-size: 16px;
}

.timer-display {
    display: flex;
    gap: 15px;
}

.time-unit {
    text-align: center;
}

.time-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.time-label {
    font-size: 12px;
    opacity: 0.9;
}

.timer-cta {
    background: var(--white);
    color: #e74c3c;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s;
}

.timer-cta:hover {
    transform: scale(1.05);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    margin-bottom: 10px;
}

.instruction-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.instruction-box p {
    margin: 0;
    color: var(--dark);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--gray);
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Profile Page */
.profile-page {
    padding: 40px 0;
    min-height: 100vh;
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.profile-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid var(--primary);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    text-align: center;
    margin-bottom: 5px;
}

.profile-email {
    text-align: center;
    color: var(--gray);
    margin-bottom: 20px;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
}

.badge-admin {
    background: #fff3cd;
    color: #856404;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.card-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark);
}

.whatsapp-display {
    text-align: center;
}

.whatsapp-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.whatsapp-status {
    color: var(--success);
    margin-bottom: 15px;
}

.whatsapp-warning {
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--warning);
    margin-bottom: 20px;
}

.progress-stats {
    text-align: center;
}

.stat {
    margin-bottom: 20px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s;
}

.progress-percentage {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
}

.action-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-link {
    display: block;
    padding: 12px;
    background: var(--light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    transition: background 0.3s;
}

.action-link:hover {
    background: var(--gray-light);
}

/* Enrollment Page */
.enroll-page {
    min-height: 100vh;
    padding: 40px 0;
}

.enroll-container {
    max-width: 800px;
    margin: 0 auto;
}

.cart-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 30px;
}

.item-image {
    flex-shrink: 0;
}

.course-thumbnail {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.item-details {
    flex-grow: 1;
}

.item-details h3 {
    margin-bottom: 10px;
}

.course-includes {
    list-style: none;
    margin-top: 10px;
}

.course-includes li {
    color: var(--success);
    margin: 5px 0;
}

.item-price {
    text-align: right;
}

.original-price {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--gray);
}

.discount-price {
    font-size: 32px;
    font-weight: bold;
    color: var(--success);
}

.cart-summary {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.strike-price {
    text-decoration: line-through;
    color: var(--gray);
}

.discount-row {
    color: var(--success);
    font-weight: bold;
}

.total-row {
    font-size: 24px;
    font-weight: bold;
    padding-top: 15px;
    border-top: 2px solid var(--border);
}

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

.free-notice {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: var(--white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.notice-highlight {
    font-weight: bold;
    margin-top: 10px;
}

.trust-badges {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.badge-item {
    color: var(--success);
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray);
}

.close:hover {
    color: var(--dark);
}

/* Success Animation */
.success-animation {
    text-align: center;
    margin-bottom: 30px;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--success);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkmark {
    width: 50px;
    height: 50px;
    border-right: 5px solid var(--white);
    border-bottom: 5px solid var(--white);
    transform: rotate(45deg);
    margin-bottom: 10px;
}

.checkmark.draw {
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% { transform: rotate(45deg) scale(0); }
    50% { transform: rotate(45deg) scale(1.2); }
    100% { transform: rotate(45deg) scale(1); }
}

.success-message {
    font-size: 24px;
    color: var(--dark);
    margin: 20px 0;
}

.success-details {
    color: var(--gray);
    margin-bottom: 30px;
}

.confetti {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Lessons Page */
.lessons-page {
    min-height: 100vh;
    padding: 40px 0;
}

.lessons-list {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--dark);
    transition: background 0.3s;
}

.lesson-item:hover {
    background: var(--light);
}

.lesson-item.completed {
    background: #f0f9ff;
}

.lesson-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.lesson-thumbnail-small {
    width: 100px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.lesson-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lesson-details {
    flex-grow: 1;
}

.lesson-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.duration {
    color: var(--gray);
    font-size: 14px;
}

.completed-badge {
    background: var(--success);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.lesson-arrow {
    font-size: 24px;
    color: var(--primary);
}

/* Lesson Page */
.lesson-page {
    min-height: 100vh;
    padding: 40px 0;
}

/* Compact Lesson Page */
.lesson-page-compact {
    min-height: 100vh;
    background: #000;
}

.lesson-title-compact {
    background: #fff;
    margin: 0;
    padding: 12px 20px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.video-player-compact {
    background: #000;
    margin: 0;
    padding: 0;
}

.video-wrapper-16-9 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper-16-9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lesson-description-compact {
    background: #fff;
    padding: 15px 20px;
    margin: 0;
    border-top: 1px solid #eee;
}

.lesson-description-compact p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Article Layout Styles (for lessons without video) */
.article-thumbnail {
    background: #fff;
    padding: 20px;
    text-align: center;
}

.article-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content {
    background: #fff;
    padding: 30px 20px;
    line-height: 1.8;
    color: #333;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1c1e21;
    font-weight: 600;
}

.article-content h1 { font-size: 2em; }
.article-content h2 { font-size: 1.5em; }
.article-content h3 { font-size: 1.25em; }

.article-content p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.article-content a {
    color: #1877f2;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content blockquote {
    border-left: 4px solid #1877f2;
    padding-left: 20px;
    margin: 20px 0;
    color: #65676b;
    font-style: italic;
}

.article-content code {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #f0f2f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content table th,
.article-content table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.article-content table th {
    background: #f0f2f5;
    font-weight: 600;
}

@media (max-width: 768px) {
    .article-content {
        padding: 20px 15px;
    }
}

.lesson-actions-compact {
    background: #fff;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    border-top: 1px solid #eee;
}

.lesson-actions-compact .btn-sm {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop: 4 columns */
@media (min-width: 769px) {
    .lesson-actions-compact {
        grid-template-columns: repeat(4, 1fr);
        padding: 12px 20px;
        gap: 12px;
    }
    
    .lesson-actions-compact .btn-sm {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Tablet: 2 columns */
@media (max-width: 768px) and (min-width: 481px) {
    .lesson-actions-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 columns stacked */
@media (max-width: 480px) {
    .lesson-actions-compact {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
        gap: 8px;
    }
    
    .lesson-actions-compact .btn-sm {
        padding: 10px 8px;
        font-size: 12px;
    }
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.video-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.breadcrumb {
    margin-bottom: 20px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.lesson-title-main {
    font-size: 32px;
    margin-bottom: 20px;
}

.video-player {
    margin: 20px 0;
}

.lesson-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.lesson-description {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
}

/* Comments Section */
.comments-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
}

.comment-form-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form {
    flex-grow: 1;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    font-size: 12px;
    color: var(--gray);
}

.comments-list {
    margin-top: 30px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    margin-bottom: 8px;
}

.comment-time {
    color: var(--gray);
    font-size: 12px;
    margin-left: 10px;
}

.comment-text {
    color: var(--dark);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: var(--gray);
    padding: 40px;
}

/* Comments Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.page-info {
    color: var(--gray);
    font-size: 14px;
}

/* Admin Pages */
.admin-page {
    min-height: 100vh;
    padding: 40px 0;
    background: var(--light);
}

.admin-header {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 48px;
}

.stat-info {
    flex-grow: 1;
}

.admin-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
    position: relative;
}

.admin-btn:hover {
    background: var(--primary-dark);
}

.badge-notify {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.admin-table thead {
    background: var(--light);
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--gray);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.comment-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comments-list-admin {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item-admin {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
}

.comment-meta {
    font-size: 12px;
    color: var(--gray);
    margin-left: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-content h2 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 22px;
    line-height: 1.4;
}

.modal-content p {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .modal-content p {
        font-size: 15px;
    }
    
    .modal-icon {
        font-size: 48px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 10px 0;
        display: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links li {
        padding: 10px 0;
        text-align: center;
        border-bottom: 1px solid var(--light);
    }

    .menu-icon {
        display: block;
    }

    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }
    
    .timer-content {
        justify-content: center;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
    }
    
    body {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .timer-display {
        gap: 8px;
    }
    
    .time-value {
        font-size: 20px;
    }
}
