/* assets/css/style.css - полная версия */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow: hidden;
}

/* ============================================
   Page Wrapper
   ============================================ */
.page-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ============================================
   Sidebar - компактная версия
   ============================================ */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Скрываем прокрутку, но оставляем возможность скроллить */
.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
    z-index: 10;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Sidebar Overlay (мобильная версия) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Logo Area - компактная
   ============================================ */
.logo-area {
    padding: 16px 16px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.logo-area .company-logo {
    max-width: 56px;
    max-height: 56px;
    width: auto;
    height: auto;
    margin: 0 auto 6px;
    display: block;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.logo-area .logo-placeholder {
    width: 56px;
    height: 56px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.logo-area .logo-placeholder .logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-area h3 {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.3px;
    margin: 0;
    word-break: break-word;
    line-height: 1.3;
}

/* ============================================
   Navigation - компактная
   ============================================ */
.sidebar .nav {
    flex: 1;
    padding: 8px 10px;
    overflow-y: visible;
    overflow-x: hidden;
}

.sidebar .nav-item {
    margin-bottom: 1px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 13px;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 18px;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar .nav-link .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 20px;
}

.sidebar hr {
    border-color: rgba(255, 255, 255, 0.05);
    margin: 4px 12px;
}

.sidebar .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Мобильная кнопка выхода (скрыта на десктопе) */
.mobile-logout-item {
    display: none;
}

.mobile-logout-item .nav-link {
    color: rgba(255, 100, 100, 0.8) !important;
}

.mobile-logout-item .nav-link:hover {
    color: #ff6b6b !important;
    background: rgba(255, 100, 100, 0.1);
}

/* ============================================
   Hamburger Button
   ============================================ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger-btn:hover span {
    background: var(--primary);
}

/* ============================================
   User Info in Sidebar - компактная (десктопная)
   ============================================ */
.user-info {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.user-info .avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.user-info .user-details {
    flex: 1;
    min-width: 0;
}

.user-info .user-details .name {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-details .role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.user-info .logout-btn {
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    text-decoration: none;
}

.user-info .logout-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* На мобильных устройствах показываем кнопку в меню и скрываем десктопную */
@media (max-width: 768px) {
    .mobile-logout-item {
        display: block;
    }
    
    .user-info {
        display: none !important;
    }
}

/* На десктопе скрываем мобильную кнопку */
@media (min-width: 769px) {
    .mobile-logout-item {
        display: none !important;
    }
    
    .user-info {
        display: block;
    }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
}

/* ============================================
   Navbar
   ============================================ */
.navbar-custom {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 14px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-custom h4 {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Content Area
   ============================================ */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    -webkit-overflow-scrolling: touch;
}

.content-area .container-fluid {
    padding: 0;
}

/* ============================================
   Cards
   ============================================ */
.card {
    border: none;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
}

.card-body {
    padding: 20px;
}

/* ============================================
   Stats Cards
   ============================================ */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
}

.stat-card:hover {
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
}

.stat-card .stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dark);
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Forms
   ============================================ */
.form-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 0;
}

.form-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-wrapper .form-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
}

.form-wrapper h2 {
    text-align: center;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.form-wrapper .subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--dark);
    margin-bottom: 4px;
}

.form-control {
    border-radius: var(--radius-sm);
    border: 2px solid #e2e8f0;
    padding: 10px 14px;
    transition: var(--transition);
    font-size: 14px;
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-text {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: #fff;
}

.btn-success:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #fff;
}

.btn-warning:hover {
    color: #fff;
}

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

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

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

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

/* Кнопка копирования */
.input-group .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group .btn i {
    font-size: 15px;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    padding: 14px 18px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   Badges
   ============================================ */
.badge-owner,
.badge-super_admin {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    padding: 4px 10px;
}

.badge-company_owner {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    padding: 4px 10px;
}

.badge-author {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 4px 10px;
}

.badge-moderator {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 4px 10px;
}

.badge-partner {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    padding: 4px 10px;
}

.badge-client {
    background: var(--gray);
    color: #fff;
    padding: 4px 10px;
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   Company Header
   ============================================ */
.company-header {
    padding: 40px 0 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    color: #fff;
    margin-bottom: 32px;
}

.company-header h1 {
    font-weight: 800;
    font-size: 34px;
    letter-spacing: -1px;
}

.company-header p {
    opacity: 0.9;
    font-size: 16px;
    margin-top: 6px;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
}

.toast {
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-hover);
    margin-bottom: 10px;
    background: var(--white);
}

.toast .toast-body {
    padding: 14px 18px;
    font-weight: 500;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

.spinner-border {
    width: 44px;
    height: 44px;
    border-width: 4px;
    color: var(--primary);
}

/* ============================================
   Logo Preview
   ============================================ */
.logo-preview {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-img {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 6px;
    background: #fff;
    object-fit: contain;
}

.logo-placeholder-big {
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
    width: 100%;
}

.logo-placeholder-big i {
    display: block;
    margin-bottom: 6px;
}

/* ============================================
   Custom Modal (для сообщений и ДЗ)
   ============================================ */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.custom-modal-overlay.active {
    display: flex;
}

.custom-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.custom-modal-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.custom-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.custom-modal-body {
    padding: 24px;
}

.custom-modal-body .form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.custom-modal-body .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-modal-body .message-info p {
    margin-bottom: 4px;
}

.custom-modal-body .message-body p {
    margin-bottom: 8px;
}

.custom-modal-body .comment-block {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #6366f1;
    margin: 8px 0 12px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.custom-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.custom-modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.custom-modal-footer .btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.custom-modal-footer .btn-secondary:hover {
    background: #e2e8f0;
}

.custom-modal-footer .btn-success {
    background: #22c55e;
    color: #fff;
}

.custom-modal-footer .btn-success:hover {
    background: #16a34a;
}

/* ============================================
   Course Cards
   ============================================ */
.course-card {
    transition: var(--transition);
    position: relative;
}

.course-card:hover {
    box-shadow: var(--shadow-hover);
}

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

.card-img-top {
    position: relative;
    overflow: hidden;
}

.card-img-top .bi-book {
    opacity: 0.3;
}

.course-meta {
    color: #6c757d;
}

/* ============================================
   Lessons List (в редактировании курса)
   ============================================ */
.lesson-list .lesson-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 4px;
    transition: all 0.2s;
    gap: 8px;
}

.lesson-list .lesson-item:hover {
    background: #f8fafc;
    border-color: #6366f1;
}

.lesson-list .lesson-item .order-badge {
    width: 30px;
    text-align: center;
    font-weight: 600;
    color: #94a3b8;
    flex-shrink: 0;
}

.lesson-list .lesson-item .lesson-info {
    flex: 1;
    padding: 0 8px;
    min-width: 0;
}

.lesson-list .lesson-item .lesson-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-list .lesson-item .lesson-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.lesson-list .lesson-item .lesson-actions .move-buttons {
    display: flex;
    gap: 1px;
}

.lesson-list .lesson-item .lesson-actions .btn {
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1;
}

.lesson-list .lesson-item .lesson-actions .btn i {
    font-size: 14px;
}

.lesson-list .lesson-item .lesson-actions .move-buttons .btn {
    padding: 4px 6px;
    min-width: 28px;
    text-align: center;
}

.lesson-list .lesson-item .lesson-actions .move-buttons .btn i {
    font-size: 14px;
}

.empty-lessons {
    padding: 40px;
    text-align: center;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
}

.empty-lessons .icon {
    font-size: 48px;
    color: #cbd5e1;
}

/* ============================================
   Lesson Sidebar (в просмотре курса)
   ============================================ */
.lesson-sidebar {
    position: sticky;
    top: 20px;
}

.lesson-nav-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-nav-item:hover {
    background: #f1f5f9;
}

.lesson-nav-item.active {
    background: #6366f1;
    color: #fff;
}

.lesson-nav-item.completed {
    background: #dcfce7;
    color: #166534;
}

.lesson-nav-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.lesson-nav-item .status-icon {
    float: right;
}

/* Стили для реферальных ссылок в просмотре урока */
.lesson-content .referral-link-wrapper {
    display: inline-block;
    background: #f5f3ff;
    border-radius: 6px;
    padding: 2px 8px;
    border: 1px dashed #8b5cf6;
}

.lesson-content .referral-link-active {
    color: #7c3aed;
    font-weight: 600;
    text-decoration: underline;
    padding: 2px 8px;
    background: #f5f3ff;
    border-radius: 4px;
    transition: all 0.2s;
}

.lesson-content .referral-link-active:hover {
    background: #ede9fe;
    color: #5b21b6;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.lesson-content .referral-link-disabled {
    color: #94a3b8;
    text-decoration: line-through;
    font-style: italic;
    cursor: not-allowed;
}

/* Скрываем плейсхолдер в уроке */
.lesson-content .referral-placeholder {
    display: none !important;
}

/* ============================================
   File List (в модальном окне ДЗ)
   ============================================ */
#fileList .list-group-item {
    padding: 8px 12px;
    font-size: 14px;
    border-left: none;
    border-right: none;
    background: #f8fafc;
}

#fileList .list-group-item:first-child {
    border-top: none;
}

#fileList .list-group-item .badge {
    font-size: 11px;
}

#fileList .list-group-item:hover {
    background: #f1f5f9;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 992px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .navbar-custom {
        padding: 12px 20px;
    }
    
    .content-area {
        padding: 16px 20px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .sidebar {
        width: 300px;
        min-width: 300px;
        transform: translateX(-100%);
        border-right: none;
        border-radius: 0 16px 16px 0;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
        font-size: 24px;
        padding: 8px 12px;
        top: 8px;
        right: 8px;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .hamburger-btn {
        display: flex;
        flex-shrink: 0;
        z-index: 101;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        height: 100vh;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }
    
    .content-area {
        padding: 12px 16px;
        overflow-y: auto;
        height: calc(100vh - 56px);
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-custom {
        padding: 10px 16px;
        flex-shrink: 0;
        gap: 8px;
        min-height: 56px;
        position: sticky;
        top: 0;
        z-index: 50;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .navbar-custom h4 {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .navbar-custom .text-muted {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .navbar-custom .text-muted i {
        display: none;
    }
    
    /* Увеличиваем шрифт в меню для мобильных */
    .sidebar .nav-link {
        font-size: 16px;
        padding: 12px 16px;
        font-weight: 500;
    }
    
    .sidebar .nav-link i {
        font-size: 18px;
        margin-right: 12px;
        width: 22px;
    }
    
    .sidebar .nav-link .badge {
        font-size: 12px;
        padding: 2px 8px;
    }
    
    .sidebar .text-muted {
        font-size: 11px;
        letter-spacing: 0.8px;
    }
    
    .logo-area .company-logo {
        max-width: 64px;
        max-height: 64px;
    }
    
    .logo-area .logo-placeholder {
        width: 64px;
        height: 64px;
    }
    
    .logo-area .logo-placeholder .logo-icon {
        font-size: 32px;
    }
    
    .logo-area h3 {
        font-size: 18px;
    }
    
    /* Мобильная кнопка выхода */
    .mobile-logout-item {
        display: block;
    }
    
    .user-info {
        display: none !important;
    }
    
    /* Кнопка копирования на мобильных */
    .input-group .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .input-group .btn i {
        font-size: 16px;
    }
    
    /* Custom modal на мобильных */
    .custom-modal {
        max-width: 100%;
        margin: 10px;
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .custom-modal-header {
        padding: 14px 16px;
    }
    
    .custom-modal-header h5 {
        font-size: 16px;
    }
    
    .custom-modal-body {
        padding: 16px;
    }
    
    .custom-modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .custom-modal-footer .btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .custom-modal-close {
        font-size: 24px;
        padding: 4px 6px;
    }
    
    .custom-modal-body .comment-block {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        min-width: 100%;
        border-radius: 0;
    }
    
    .sidebar-close {
        top: 6px;
        right: 6px;
        font-size: 20px;
        padding: 6px 10px;
    }
    
    .navbar-custom {
        padding: 8px 12px;
        min-height: 48px;
    }
    
    .navbar-custom h4 {
        font-size: 13px;
    }
    
    .navbar-custom .text-muted {
        font-size: 10px;
    }
    
    .content-area {
        padding: 10px 12px;
        height: calc(100vh - 48px);
    }
    
    .logo-area {
        padding: 12px 12px 10px;
    }
    
    .logo-area .company-logo {
        max-width: 48px;
        max-height: 48px;
        padding: 3px;
        margin-bottom: 4px;
    }
    
    .logo-area .logo-placeholder {
        width: 48px;
        height: 48px;
        margin-bottom: 4px;
    }
    
    .logo-area .logo-placeholder .logo-icon {
        font-size: 24px;
    }
    
    .logo-area h3 {
        font-size: 15px;
    }
    
    .sidebar .nav-link {
        font-size: 15px;
        padding: 10px 14px;
    }
    
    .sidebar .nav-link i {
        font-size: 16px;
        margin-right: 10px;
        width: 20px;
    }
    
    .sidebar .text-muted {
        font-size: 10px;
    }
    
    .form-wrapper {
        padding: 20px 16px;
    }
    
    .form-wrapper h2 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card .stat-number {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 14px;
    }
    
    .custom-modal {
        margin: 5px;
        border-radius: 10px;
        max-height: 98vh;
    }
    
    .custom-modal-header {
        padding: 10px 12px;
    }
    
    .custom-modal-body {
        padding: 12px;
    }
    
    .custom-modal-footer {
        padding: 10px 12px;
        flex-direction: column;
    }
    
    .custom-modal-footer .btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .custom-modal-close {
        font-size: 20px;
    }
    
    .lesson-list .lesson-item {
        flex-wrap: wrap;
        padding: 8px 10px;
    }
    
    .lesson-list .lesson-item .lesson-info {
        flex: 1 1 100%;
        padding: 4px 0;
    }
    
    .lesson-list .lesson-item .lesson-actions {
        flex-wrap: wrap;
        gap: 2px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    box-shadow: var(--shadow-hover);
}

.text-muted-light {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Стили для цветных меток в списке сообщений */
.text-success {
    color: #16a34a !important;
}

.text-danger {
    color: #dc2626 !important;
}

.footer {
    margin-top: auto;
    background: #fff !important;
    border-top: 1px solid #e2e8f0 !important;
}

.footer a.text-muted:hover {
    color: #6366f1 !important;
}

/* Убедитесь, что контент занимает всю высоту */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-area {
    flex: 1;
}


/* ============================================
   КАСТОМНЫЙ ВИДЕО-ПЛЕЕР
   ============================================ */

.custom-player {
    position: relative;
    margin: 20px 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 100%;
}

.custom-player video {
    width: 100%;
    display: block;
    background: #000;
    max-height: 600px;
    object-fit: contain;
    cursor: pointer;
}

/* Запрет выделения элементов плеера */
.custom-player * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.custom-player {
    display: block;
    outline: none;
}

.custom-player button,
.custom-player div,
.custom-player video {
    outline: none !important;
}

/* ============================================
   Центральная кнопка Play
   ============================================ */

.custom-player-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.custom-player-center-play:hover {
    background: rgba(99, 102, 241, 0.6);
    transform: translate(-50%, -50%) scale(1.05);
    border-color: #6366f1;
}

/* ============================================
   Кнопка удаления видео (только в редакторе)
   ============================================ */

.custom-player-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: none !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.custom-player-remove:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-player-remove:not(:disabled):hover {
    background: #ef4444;
    transform: scale(1.1);
}

.custom-player-remove:not(:disabled):active {
    transform: scale(0.9);
}

/* Показываем кнопку удаления только в режиме редактирования */
#lessonEditor .custom-player-remove {
    display: flex !important;
}

.custom-player-remove:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.custom-player-remove:active {
    transform: scale(0.9);
}

/* ============================================
   Элементы управления
   ============================================ */

.custom-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-player-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   Прогресс-бар
   ============================================ */

.custom-player-progress {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: height 0.2s;
}

.custom-player-progress:hover {
    height: 6px;
}

.custom-player-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
}

.custom-player-progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.custom-player-progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    left: 0%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.custom-player-progress:hover .custom-player-progress-thumb {
    opacity: 1;
}

/* ============================================
   Панель кнопок
   ============================================ */

.custom-player-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.custom-player-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-player-btn:active {
    transform: scale(0.95);
}

.custom-player-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-family: 'Inter', monospace;
    min-width: 90px;
    text-align: center;
    user-select: none;
    flex-shrink: 0;
}

.custom-player-spacer {
    flex: 1;
}

/* ============================================
   Громкость
   ============================================ */

.custom-player-volume-slider {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s;
    flex-shrink: 0;
}

.custom-player-volume-slider:hover {
    height: 5px;
}

.custom-player-volume-filled {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 100%;
    transition: width 0.05s;
}

/* ============================================
   Выпадающие меню
   ============================================ */

.custom-player-dropdown-wrapper {
    position: relative;
    flex-shrink: 0;
}

.custom-player-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    padding: 4px 0;
    min-width: 60px;
    display: none;
    flex-direction: column;
    gap: 1px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.custom-player-dropdown.open {
    display: flex;
}

.custom-player-dropdown-item {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    border-radius: 3px;
    white-space: nowrap;
}

.custom-player-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-player-dropdown-item.active {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* ============================================
   ПОЛНЫЙ ЭКРАН
   ============================================ */

.custom-player:fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:fullscreen .custom-player-controls {
    padding: 16px 24px 20px;
}

.custom-player:fullscreen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* WebKit */
.custom-player:-webkit-full-screen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-webkit-full-screen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-webkit-full-screen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* Firefox */
.custom-player:-moz-full-screen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-moz-full-screen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-moz-full-screen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* MS Edge */
.custom-player:-ms-fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-ms-fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-ms-fullscreen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   ОСОБЫЕ СЛУЧАИ ДЛЯ МОБИЛЬНЫХ
   ============================================ */

/* Для iOS Safari */
@supports (-webkit-touch-callout: none) {
    .custom-player:fullscreen video,
    .custom-player:-webkit-full-screen video {
        max-height: 100vh;
        max-width: 100vw;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* Для Android и мобильных браузеров */
@media screen and (max-width: 768px) {
    .custom-player:fullscreen,
    .custom-player:-webkit-full-screen,
    .custom-player:-moz-full-screen {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .custom-player:fullscreen video,
    .custom-player:-webkit-full-screen video,
    .custom-player:-moz-full-screen video {
        max-height: 100vh;
        max-width: 100vw;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
    .custom-player {
        border-radius: 8px;
        margin: 12px 0;
    }
    
    .custom-player video {
        max-height: 400px;
    }
    
    .custom-player-controls {
        padding: 6px 10px 10px;
    }
    
    .custom-player-panel {
        gap: 4px;
    }
    
    .custom-player-btn {
        font-size: 12px;
        padding: 2px 6px;
        height: 26px;
    }
    
    .custom-player-time {
        font-size: 10px;
        min-width: 70px;
    }
    
    .custom-player-volume-slider {
        width: 35px;
    }
    
    .custom-player-center-play {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .custom-player-dropdown-item {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .custom-player-remove {
        width: 24px;
        height: 24px;
        font-size: 14px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .custom-player video {
        max-height: 300px;
    }
    
    .custom-player-controls {
        padding: 4px 6px 8px;
    }
    
    .custom-player-panel {
        gap: 2px;
    }
    
    .custom-player-btn {
        font-size: 10px;
        padding: 1px 4px;
        height: 22px;
    }
    
    .custom-player-time {
        font-size: 9px;
        min-width: 55px;
    }
    
    .custom-player-volume-slider {
        width: 25px;
    }
    
    .custom-player-center-play {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .custom-player-dropdown-item {
        font-size: 9px;
        padding: 2px 8px;
    }
    
    .custom-player-remove {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: 4px;
        right: 4px;
    }
}

/* ============================================
   КНОПКА ВЫХОДА ИЗ ПОЛНОЭКРАННОГО РЕЖИМА (КРЕСТИК)
   ============================================ */

.custom-player-exit-fullscreen {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.8);
}

.custom-player-exit-fullscreen.visible {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

.custom-player-exit-fullscreen:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

.custom-player-exit-fullscreen:active {
    transform: scale(0.9);
}

.custom-player-exit-fullscreen svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   АДАПТИВНОСТЬ для кнопки выхода
   ============================================ */

@media (max-width: 768px) {
    .custom-player-exit-fullscreen {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }
    
    .custom-player-exit-fullscreen svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .custom-player-exit-fullscreen {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
    
    .custom-player-exit-fullscreen svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   ПОЛНЫЙ ЭКРАН (с кнопкой выхода)
   ============================================ */

.custom-player:fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:fullscreen .custom-player-controls {
    padding: 16px 24px 20px;
}

.custom-player:fullscreen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* WebKit */
.custom-player:-webkit-full-screen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-webkit-full-screen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-webkit-full-screen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* Firefox */
.custom-player:-moz-full-screen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-moz-full-screen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-moz-full-screen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* MS Edge */
.custom-player:-ms-fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-player:-ms-fullscreen video {
    max-height: 100vh;
    max-width: 100vw;
    width: auto;
    height: auto;
    object-fit: contain;
}

.custom-player:-ms-fullscreen .custom-player-exit-fullscreen {
    display: flex !important;
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   КНОПКА ПОЛНОЭКРАННОГО РЕЖИМА (В ПАНЕЛИ)
   ============================================ */

.custom-player-fullscreen-btn {
    font-size: 16px !important;
    padding: 4px 8px !important;
}

/* Анимация иконки полноэкранного режима */
.custom-player-fullscreen-btn .fullscreen-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 18px;
    line-height: 1;
}

.custom-player-fullscreen-btn:hover .fullscreen-icon {
    transform: scale(1.15);
}

.custom-player-fullscreen-btn:active .fullscreen-icon {
    transform: scale(0.9);
}

/* Плавная анимация прогресс-бара */
#videoProgressBar {
    transition: width 0.5s ease, background 0.5s ease;
}

/* Индикатор загрузки */
#videoUploadProgress {
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
}

#videoUploadProgress .progress-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

#videoProgressBar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease, background 0.5s ease;
}