/* static/css/style.css */

/* ============= БАЗОВЫЕ СТИЛИ ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ============= САЙДБАР ============= */
.sidebar {
    width: 260px;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid #2d2d3d;
    transform: translateX(0);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    font-size: 24px;
    font-weight: 700;
    color: #6c5ce7;
    border-bottom: 1px solid #2d2d3d;
}

.logo i {
    font-size: 28px;
}

.nav-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #a0a0b0;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background: #2d2d3d;
    color: white;
}

.nav-menu a.active {
    background: #6c5ce7;
    color: white;
}

.nav-menu a i {
    width: 20px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #2d2d3d;
}

.subscription-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #2d2d3d;
    border-radius: 10px;
    margin-bottom: 12px;
    color: #fdcb6e;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #3d3d4d;
    border-radius: 10px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #d63031;
    border-color: #d63031;
    color: white;
}

/* ============= ОВЕРЛЕЙ ============= */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(3px);
}


/* ============= ХЕДЕР ============= */
.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0 0 0 260px;
    background: #1a1a2e;
    border-bottom: 1px solid #2d2d3d;
    position: sticky;
    top: 0;
    z-index: 500;
    width: calc(100% - 260px);
    box-sizing: border-box;
    transition: margin-left 0.3s ease, width 0.3s ease;
    min-height: 73px;
    flex-shrink: 0;
}


.sidebar.collapsed ~ .header {
    margin-left: 0;
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 24px;
    cursor: pointer;
    padding: 16px 20px;
    border-radius: 0;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: #2d2d3d;
}

.header-title {
    padding: 16px 0;
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin: 0;
    display: inline-block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 24px;
    flex-shrink: 0;
}

/* ============= ОСНОВНОЙ КОНТЕНТ ============= */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    width: calc(100% - 260px);
    max-width: calc(100% - 260px);
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0;
    background: #0f0f1a;
    /* Центрируем контент */
    display: flex;
    justify-content: center;
}


.sidebar.collapsed ~ .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
}

/* ============= СТИЛИ ДЛЯ КОРОНЫ И ПРОФИЛЯ ============= */
.subscription-crown {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #2d2d3d;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    outline: none;
}

.subscription-crown:hover {
    background: #3d3d4d;
}

.subscription-crown i {
    font-size: 16px;
}

.subscription-crown .crown-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.subscription-crown .fa-crown {
    filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.3));
}

.user-info.clickable {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #2d2d3d;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    outline: none;
}

.user-info.clickable:hover {
    background: #3d3d4d;
}

.user-info i {
    font-size: 20px;
    color: #6c5ce7;
}

/* ============= СТРАНИЦЫ ============= */
.page {
    padding: 24px;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
    box-sizing: border-box;
}

/* ============= АВТОРИЗАЦИЯ ============= */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 73px);
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.auth-card {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tabs button {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.auth-tabs button.active {
    color: #6c5ce7;
    border-bottom-color: #6c5ce7;
}

/* ============= ФОРМЫ ============= */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0b0;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #0f0f1a;
    border: 1px solid #2d2d3d;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6c5ce7;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ============= КНОПКИ ============= */
.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: #6c5ce7;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    background: #5b4bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 20px;
    background: #2d2d3d;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3d3d4d;
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #6c5ce7;
    border-radius: 8px;
    color: #6c5ce7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #6c5ce7;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 16px;
}

/* ============= ДАШБОРД ============= */
.dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section {
    width: 100%;
}

/* Центрируем заголовки и контент */
.section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: white;
    font-size: 20px;
}


/* ============= СТАТИСТИКА ============= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-card {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #2d2d3d;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #6c5ce7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.stat-info p {
    color: #a0a0b0;
    font-size: 14px;
}

/* ============= КАРТОЧКИ КУРСОВ ============= */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    width: 100%;
}

.course-card-large {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #2d2d3d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #6c5ce7;
}

.course-card-content h3 {
    color: white;
    margin-bottom: 12px;
    font-size: 18px;
}

.course-description {
    color: #a0a0b0;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #2d2d3d;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    color: #a0a0b0;
    font-size: 14px;
    min-width: 45px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2d2d3d;
}

.course-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.course-status.active {
    background: rgba(108, 92, 231, 0.2);
    color: #6c5ce7;
}

.course-status.completed {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.course-date {
    color: #a0a0b0;
    font-size: 13px;
}

/* ============= КНОПКА УДАЛЕНИЯ ============= */
.delete-course-btn {
    background: transparent;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
}

.course-card-large:hover .delete-course-btn {
    opacity: 1;
}

.delete-course-btn:hover {
    background: rgba(214, 48, 49, 0.2);
    color: #d63031;
}

/* ============= ВИТРИНА ============= */
.showcase-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    width: 100%;
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #1a1a2e;
    border-radius: 10px;
    border: 1px solid #2d2d3d;
}

.search-box i {
    color: #a0a0b0;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
}

.filter-select {
    padding: 10px 16px;
    background: #1a1a2e;
    border: 1px solid #2d2d3d;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.template-card {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #2d2d3d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #6c5ce7;
}

.template-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fdcb6e;
    color: #1a1a2e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.template-card h3 {
    color: white;
    margin-bottom: 12px;
    padding-right: 100px;
}

.template-card p {
    color: #a0a0b0;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.template-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    color: #a0a0b0;
    font-size: 13px;
}

.template-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-card .btn-primary {
    margin-top: 8px;
}

/* ============= МОДАЛКИ ============= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-large .modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #2d2d3d;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    color: white;
    font-size: 20px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #a0a0b0;
    font-size: 28px;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: white;
}

.modal-body {
    padding: 24px;
}

/* ============= ДНИ КУРСА ============= */
.days-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.day-item {
    background: #0f0f1a;
    border-radius: 12px;
    border: 1px solid #2d2d3d;
    overflow: hidden;
}

.day-item.completed {
    border-color: #00b894;
}

.day-item.today {
    border-color: #fdcb6e;
}

.day-header {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.day-header:hover {
    background: #2d2d3d;
}

.day-number {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    font-weight: 600;
    color: white;
}

.today-badge {
    padding: 2px 8px;
    background: #fdcb6e;
    color: #1a1a2e;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.day-title {
    flex: 1;
    color: #e0e0e0;
}

.day-status {
    margin-right: 16px;
}

.day-content {
    padding: 16px;
    border-top: 1px solid #2d2d3d;
    background: #1a1a2e;
}

.task-text {
    color: #e0e0e0;
    margin-bottom: 16px;
    line-height: 1.6;
}

.task-resources {
    margin: 16px 0;
}

.resource-item {
    margin-bottom: 12px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2d2d3d;
    border-radius: 8px;
    color: #6c5ce7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.resource-link:hover {
    background: #3d3d4d;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* ============= ОТЧЁТЫ ============= */
.report-form {
    background: #0f0f1a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.report-form h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 16px;
}

.score-select {
    width: 100%;
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #2d2d3d;
    border-radius: 8px;
    color: white;
}

.report-summary {
    background: #0f0f1a;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #e0e0e0;
}

.summary-item i {
    width: 20px;
    color: #6c5ce7;
}

.summary-text {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2d2d3d;
    color: #a0a0b0;
}

/* ============= ПРОФИЛЬ ============= */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
}

.profile-card,
.subscription-card {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #2d2d3d;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    font-size: 80px;
    color: #6c5ce7;
    margin-bottom: 16px;
}

.profile-header h2 {
    color: white;
    margin-bottom: 8px;
}

.profile-email {
    color: #a0a0b0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #2d2d3d;
}

.info-row .label {
    color: #a0a0b0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.subscription-card h3 {
    color: white;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.plan-status {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.plan-status.trial {
    background: rgba(253, 203, 110, 0.2);
    color: #fdcb6e;
}

.plan-status.active {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.plan-dates {
    color: #a0a0b0;
    margin-bottom: 20px;
}

.no-subscription {
    text-align: center;
    padding: 40px 0;
}

.no-subscription p {
    color: #a0a0b0;
    margin-bottom: 20px;
}

/* ============= ПЛАТЕЖИ ============= */
.payment-plans {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.payment-plan {
    padding: 20px;
    background: #0f0f1a;
    border: 2px solid #2d2d3d;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-plan:hover {
    border-color: #6c5ce7;
}

.payment-plan.selected {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.1);
}

.payment-plan h4 {
    color: white;
    margin-bottom: 8px;
}

.price {
    font-size: 24px;
    font-weight: 700;
    color: #6c5ce7;
}

.price-yearly {
    color: #a0a0b0;
    font-size: 14px;
    margin-top: 4px;
}

.payment-period {
    margin-bottom: 24px;
}

.payment-period label {
    display: block;
    margin-bottom: 12px;
    color: #a0a0b0;
}

.period-buttons {
    display: flex;
    gap: 12px;
}

.period-buttons button {
    flex: 1;
    padding: 12px;
    background: #0f0f1a;
    border: 1px solid #2d2d3d;
    border-radius: 10px;
    color: #a0a0b0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-buttons button.active {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: white;
}

/* ============= ПУСТЫЕ СОСТОЯНИЯ ============= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0a0b0;
}

.empty-state i {
    font-size: 48px;
    color: #3d3d4d;
    margin-bottom: 20px;
}

.empty-state p {
    margin-bottom: 20px;
}

.empty-state.small {
    padding: 30px 20px;
}

.empty-state.small i {
    font-size: 32px;
}

/* ============= ДОСТИЖЕНИЯ ============= */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2d2d3d;
}

.achievement-card i {
    font-size: 32px;
    color: #fdcb6e;
}

.achievement-info h4 {
    color: white;
    font-size: 14px;
    margin-bottom: 4px;
}

.achievement-info p {
    color: #a0a0b0;
    font-size: 12px;
}

/* ============= АДАПТИВНОСТЬ ============= */

/* Планшеты */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
        width: 280px;
    }

    .sidebar.collapsed {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar.collapsed ~ .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    /* ХЕДЕР В ОДНУ СТРОКУ */
    .header {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 12px 0 0;
        flex-wrap: nowrap;
        min-height: 60px;
        position: sticky;
        top: 0;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1;
        justify-content: center;
    }

    /* Кнопка меню - компактная */
    .menu-toggle {
        display: block;
        width: auto;
        padding: 16px;
        border-bottom: none;
        text-align: center;
        flex-shrink: 0;
    }

    /* Заголовок - по центру */
    .header-title {
        padding: 0 8px;
        width: auto;
        flex: 1;
        text-align: center;
        overflow: hidden;
    }

    .header-title h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Действия - справа */
    .header-actions {
        padding: 0;
        width: auto;
        justify-content: flex-end;
        border-bottom: none;
        gap: 6px;
        flex-shrink: 0;
    }

    /* Компактные кнопки */
    .subscription-crown {
        padding: 6px 10px;
    }

    .subscription-crown i {
        font-size: 14px;
    }

    .user-info {
        padding: 6px 10px;
    }

    .user-info i {
        font-size: 18px;
    }

    .page {
        padding: 16px;
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .courses-grid,
    .templates-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-card {
        padding: 24px;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .day-header {
        flex-wrap: wrap;
        padding: 12px;
    }

    .day-number {
        min-width: auto;
        width: 100%;
        margin-bottom: 8px;
    }

    .day-title {
        width: 100%;
        margin-bottom: 8px;
    }

    .showcase-filters {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .template-card h3 {
        padding-right: 0;
    }

    .template-badge {
        position: static;
        display: inline-block;
        margin-bottom: 12px;
    }

    .delete-course-btn {
        opacity: 1;
    }

    .subscription-crown .crown-text {
        display: none;
    }

    .user-info span {
        display: none;
    }

    .video-embed {
        border-radius: 8px;
    }

    .course-card-large {
        width: 100%;
        overflow: hidden;
    }

    .course-card-content {
        width: 100%;
    }

    .progress-bar {
        min-width: 0;
    }
}

/* ============= АНИМАЦИИ ============= */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* ============= УТИЛИТЫ ============= */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.w-100 { width: 100%; }

/* ============= ГЕНЕРИРУЕМЫЕ КУРСЫ ============= */
.generating-courses {
    margin-bottom: 30px;
    background: #1a1a2e;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #2d2d3d;
}

.generating-title {
    color: #a0a0b0;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
}

.generating-card {
    background: #0f0f1a;
    border: 1px solid #2d2d3d;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

.generating-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.generating-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.generating-info {
    flex: 1;
    min-width: 200px;
}

.generating-info h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 4px;
    word-break: break-word;
}

.generating-meta {
    color: #a0a0b0;
    font-size: 13px;
}

.generating-progress {
    flex: 2;
    min-width: 150px;
}

.mini-progress-bar {
    width: 100%;
    height: 6px;
    background: #2d2d3d;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.mini-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mini-progress-fill.status-pending {
    background: #fdcb6e;
}

.mini-progress-fill.status-processing {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
}

.mini-progress-fill.status-completed {
    background: #00b894;
}

.mini-progress-fill.status-failed {
    background: #d63031;
}

.progress-label {
    font-size: 12px;
    color: #a0a0b0;
}

/* ============= ГЕНЕРИРУЕМЫЕ КУРСЫ (дополнения) ============= */
.generating-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dismiss-btn {
    background: transparent;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.dismiss-btn:hover {
    background: #2d2d3d;
    color: #d63031;
}

.generating-error {
    margin-top: 12px;
    padding: 12px;
    background: rgba(214, 48, 49, 0.1);
    border-radius: 8px;
    color: #d63031;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.generating-error i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ============= УВЕДОМЛЕНИЯ ============= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.notification-success {
    background: rgba(0, 184, 148, 0.95);
    color: white;
}

.notification-error {
    background: rgba(214, 48, 49, 0.95);
    color: white;
}

.notification-info {
    background: rgba(108, 92, 231, 0.95);
    color: white;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Адаптивность для уведомлений */
@media (max-width: 768px) {
    .notification {
        min-width: auto;
        left: 16px;
        right: 16px;
        max-width: none;
    }

    .generating-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .generating-progress {
        width: 100%;
    }
    .auth-container {
        padding: 16px;
        max-width: 100%;
    }
    .generating-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* ============= ПОДПИСКА - НОВЫЕ СТИЛИ ============= */
.subscription-empty {
    text-align: center;
    padding: 20px 0;
}

.trial-available {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
    border: 2px solid #6c5ce7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.trial-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.trial-info i {
    font-size: 40px;
    color: #fdcb6e;
    filter: drop-shadow(0 0 10px rgba(253, 203, 110, 0.3));
}

.trial-info h4 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 18px;
}

.trial-info p {
    color: #a0a0b0;
    margin: 0;
    font-size: 14px;
}

.btn-trial {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    font-size: 16px;
    padding: 14px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-trial:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.trial-used {
    padding: 20px;
    color: #a0a0b0;
}

.trial-used i {
    font-size: 48px;
    color: #3d3d4d;
    margin-bottom: 16px;
    display: block;
}

.plan-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

.plan-badge.trial {
    background: rgba(253, 203, 110, 0.2);
    color: #fdcb6e;
}

.plan-badge.active {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.subscription-dates {
    margin: 20px 0;
    padding: 16px;
    background: #0f0f1a;
    border-radius: 12px;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #a0a0b0;
    font-size: 14px;
}

.date-info i {
    width: 20px;
    color: #6c5ce7;
}

.date-info.date-warning i {
    color: #fdcb6e;
}

.date-info.date-warning span {
    color: #fdcb6e;
}

.days-left {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(0, 184, 148, 0.1);
    border-radius: 8px;
    color: #00b894;
    font-weight: 600;
    font-size: 16px;
}

.days-left.days-critical {
    background: rgba(214, 48, 49, 0.1);
    color: #d63031;
    animation: pulse-warning 2s infinite;
}

.btn-renew {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #6c5ce7;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-renew:hover {
    background: #5b4bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.btn-renew-urgent {
    background: linear-gradient(135deg, #d63031, #e17055);
    animation: pulse-urgent 2s infinite;
    font-size: 18px;
    padding: 18px 24px;
}

.btn-renew-urgent:hover {
    background: linear-gradient(135deg, #c0392b, #d63031);
    box-shadow: 0 8px 25px rgba(214, 48, 49, 0.4);
}

.auto-renew-toggle {
    margin-top: 16px;
    padding: 12px;
    background: #0f0f1a;
    border-radius: 8px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 14px;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============= УВЕДОМЛЕНИЯ ПРИЛОЖЕНИЯ ============= */
.app-notification {
    cursor: default;
    user-select: none;
}

.app-notification:hover {
    transform: translateX(0) scale(1.02) !important;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-urgent {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(214, 48, 49, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(214, 48, 49, 0.5);
    }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .app-notification {
        min-width: auto;
        left: 16px;
        right: 16px;
        max-width: none;
    }

    .trial-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Мультимедийный контент в курсах */
.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 16px 0;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Галерея изображений */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a2e;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .delete-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-item .delete-media:hover {
    background: #d63031;
}

/* Встраиваемые видео */
.embed-item {
    margin: 16px 0;
}

/* Редактор контента (админка) */
.content-editor {
    background: #0f0f1a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 16px;
}

.editor-toolbar button {
    padding: 8px 12px;
    background: #2d2d3d;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-toolbar button:hover {
    background: #6c5ce7;
}

.editor-content {
    min-height: 300px;
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-item img {
        height: 120px;
    }

    .editor-toolbar {
        gap: 4px;
    }

    .editor-toolbar button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Медиа галерея */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
    border: 1px solid #2d2d3d;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item video {
    width: 100%;
    max-height: 200px;
}

.delete-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.delete-media:hover {
    background: #d63031;
}

.content-editor {
    background: #0f0f1a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 16px;
}

.editor-toolbar button {
    padding: 8px 12px;
    background: #2d2d3d;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-toolbar button:hover {
    background: #6c5ce7;
}

.editor-content {
    width: 100%;
    background: #1a1a2e;
    border: 1px solid #2d2d3d;
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-family: monospace;
    resize: vertical;
}

.proof-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #2d2d3d;
    border-radius: 8px;
    font-size: 13px;
}

.proof-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.proof-item i {
    font-size: 24px;
    color: #6c5ce7;
}

.proof-item button {
    background: none;
    border: none;
    color: #d63031;
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 16px 0;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.content-video {
    width: 100%;
    max-height: 300px;
    border-radius: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-item img {
        height: 120px;
    }

    .editor-toolbar {
        gap: 4px;
    }

    .editor-toolbar button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .proof-thumbnails {
        flex-direction: column;
    }
}