/* Стили для личного кабинета */
.public-profile-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.practice-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}



.practice-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.practice-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 15px;
}

.practice-image {
  margin-bottom: 15px;
  text-align: center;
}

.practice-image img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.practice-footer {
  margin-top: auto;
  text-align: right;
}

.profile-url {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.profile-url span {
    flex: 1;
}

.copy-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    margin-left: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

.full-btn {
    text-align: center;
    width: 100%;
}

.dashboard-nav {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #4caf50; /* зелёный для success */
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.dashboard-nav .nav-menu {
    gap: 10px;
}

.dashboard-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.dashboard-nav .nav-link:hover,
.dashboard-nav .nav-link.active {
    background: var(--primary);
    color: white;
}

.dashboard-nav .nav-link i {
    font-size: 14px;
}

/* Профиль в навигации */
.nav-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.level-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
}

.xp-bar {
    width: 80px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.profile-menu:hover {
    background: var(--bg-secondary);
}

.avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

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

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border: 2px solid white;
    border-radius: 50%;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 15px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.profile-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 8px 0;
}

/* Основной контент дашборда */
.dashboard-main {
    padding: 100px 0 40px;
    background: var(--bg-primary);
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    color: white;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.quick-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 150px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.fire {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.stat-icon.star {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.stat-icon.trophy {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

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

/* Сетка дашборда */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}



.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-secondary);
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary);
    font-size: 18px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-dark);
}

/* Активные курсы */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.course-item:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
    transform: translateX(5px);
}

.course-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.course-info {
    flex: 1;
}

.course-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.course-progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.course-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.course-progress-fill {
    height: 100%;
    background: var(--gradient-success);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.course-next-lesson {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Прогресс */
.chart-controls {
    display: flex;
    gap: 5px;
}

.chart-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.chart-btn.active,
.chart-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* Задания */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
  display: flex;
  flex-direction: column; /* вместо row */
  gap: 10px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 15px;
}


.task-item.urgent {
    border-left-color: var(--danger);
}

.task-item.completed {
    border-left-color: var(--accent);
    opacity: 0.7;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.task-checkbox.checked {
    background: var(--primary);
    color: white;
}

.task-content {
    flex: 1;
}

.task-title {
  font-weight: 600;
  margin-bottom: 5px;
}
.form-like-input {
  margin-top: 8px;
}
.task-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.task-due {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-priority {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: var(--warning);
    color: white;
    border-radius: var(--radius-sm);
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.achievement-item {
    text-align: center;
    padding: 15px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
}

.achievement-item:hover {
    background: var(--bg-primary);
    transform: translateY(-3px);
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.achievement-badge {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.achievement-item.unlocked .achievement-badge {
    background: rgba(255, 255, 255, 0.2);
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.achievement-description {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Расписание */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.schedule-item:hover {
    background: var(--bg-primary);
}

.schedule-time {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.schedule-content {
    flex: 1;
}

.schedule-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.schedule-subject {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.schedule-status {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.schedule-status.live {
    background: var(--danger);
    color: white;
}

.schedule-status.upcoming {
    background: var(--warning);
    color: white;
}

.schedule-status.completed {
    background: var(--accent);
    color: white;
}

/* Рекомендации */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}

.recommendation-item:hover {
    background: var(--bg-primary);
    transform: translateX(3px);
}

.recommendation-type {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.recommendation-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.recommendation-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Модальное окно урока */
.lesson-modal .modal-content {
    max-width: 900px;
    padding: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.lesson-header {
    padding: 20px 30px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.lesson-body {
    padding: 30px;
}

.lesson-video {
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.video-placeholder:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
}

.lesson-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.tab-content.active {
    display: block;
}

.lesson-footer {
    padding: 20px 30px;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
}

/* Уведомление о достижении */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
}

.achievement-notification.show {
    right: 20px;
}

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

.achievement-notification .achievement-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.achievement-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.achievement-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.close-notification {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: var(--transition);
}

.close-notification:hover {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .quick-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 90px 0 20px;
    }
    
    .dashboard-header {
        margin-bottom: 25px;
        padding: 20px;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .nav-profile {
        flex-direction: column;
        gap: 10px;
    }
    
    .level-indicator {
        order: 2;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 15px;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .quick-stats {
        flex-direction: column;
        width: 100%;
    }
    
    .stat-card {
        min-width: auto;
        width: 100%;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .course-item,
    .task-item,
    .schedule-item {
        padding: 12px;
    }
    
    .lesson-modal .modal-content {
        margin: 5%;
        width: 90%;
    }
    
    .lesson-body {
        padding: 20px;
    }
}