/* notes.css */
/* Стили для раздела конспектов */

/* Основные стили страницы */
.notes-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1a1a2e, #0f0f1c);
}

/* Фильтры */
.notes-filters {
  padding: 30px 0;
  background: rgba(26, 26, 46, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 70px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.filters-container {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters-main {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.filters-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-group label {
  color: #c8c8e8;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 16px;
  color: white;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
}

.filter-select:focus {
  border-color: #9b83ff;
  box-shadow: 0 0 0 2px rgba(155, 131, 255, 0.2);
}

/* Кнопки действий */
.add-note-btn {
  background: linear-gradient(135deg, #9b83ff, #667eea);
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.add-note-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(155, 131, 255, 0.3);
}

.search-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  color: #c8c8e8;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

/* Поисковая строка */
.search-container {
  display: none;
  animation: slideDown 0.3s ease;
}

.search-container.active {
  display: block;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 18px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 48px 12px 48px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #9b83ff;
  box-shadow: 0 0 0 2px rgba(155, 131, 255, 0.2);
}

.search-box input::placeholder {
  color: #888;
}

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.clear-search:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Основной контент */
.notes-content {
  padding: 40px 0 60px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.header-info h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.header-info h1 i {
  color: #9b83ff;
  font-size: 2.2rem;
}

.page-subtitle {
  color: #c8c8e8;
  font-size: 1.1rem;
  margin: 0;
}

.header-stats {
  display: flex;
  gap: 16px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 20px;
  color: #c8c8e8;
  font-size: 14px;
  font-weight: 500;
}

.stat-badge i {
  color: #9b83ff;
  font-size: 18px;
}

/* Сетка конспектов */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.note-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(155, 131, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.note-card:hover {
  transform: translateY(-8px);
  border-color: rgba(155, 131, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.note-card:hover::before {
  opacity: 1;
}

/* Заголовок карточки */
.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.note-subject {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.note-subject.math { background: rgba(74, 144, 226, 0.2); color: #4a90e2; }
.note-subject.physics { background: rgba(155, 131, 255, 0.2); color: #9b83ff; }
.note-subject.chemistry { background: rgba(45, 206, 137, 0.2); color: #2dce89; }
.note-subject.biology { background: rgba(247, 114, 98, 0.2); color: #f77262; }
.note-subject.history { background: rgba(245, 166, 35, 0.2); color: #f5a623; }
.note-subject.literature { background: rgba(156, 39, 176, 0.2); color: #9c27b0; }
.note-subject.english { background: rgba(33, 150, 243, 0.2); color: #2196f3; }
.note-subject.informatics { background: rgba(0, 188, 212, 0.2); color: #00bcd4; }

.note-grade {
  color: #888;
  font-size: 12px;
  font-weight: 500;
}

/* Контент карточки */
.note-content {
  margin-bottom: 20px;
}

.note-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.note-description {
  color: #c8c8e8;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 4px 10px;
  color: #c8c8e8;
  font-size: 11px;
  font-weight: 500;
}

/* Футер карточки */
.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.note-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.author-name {
  color: #c8c8e8;
  font-size: 13px;
  font-weight: 500;
}

.note-stats {
  display: flex;
  gap: 16px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #888;
  font-size: 12px;
  font-weight: 500;
}

.stat i {
  font-size: 14px;
}

/* Действия карточки */
.note-actions {
  display: flex;
  gap: 12px;
}

.btn-download, .btn-preview {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-download {
  background: linear-gradient(135deg, #9b83ff, #667eea);
  color: white;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(155, 131, 255, 0.3);
}

.btn-preview {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #c8c8e8;
}

.btn-preview:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Боковая панель */
.notes-sidebar {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(15, 15, 28, 0.95) 0%, rgba(26, 26, 46, 0.95) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Топ авторов */
.top-authors {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.top-authors h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.authors-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.author-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(155, 131, 255, 0.2);
  transform: translateX(8px);
}

.author-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #9b83ff, #667eea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-stats {
  font-size: 12px;
  color: #888;
}

.author-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9b83ff;
  font-weight: 600;
}

/* Статистика */
.notes-statistics {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.notes-statistics h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(155, 131, 255, 0.2);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9b83ff, #667eea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: #c8c8e8;
  font-weight: 500;
}

/* Кнопка загрузки */
.load-more {
  text-align: center;
}

/* Анимации */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-card {
  animation: fadeInUp 0.6s ease forwards;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .notes-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
  }
  
  .sidebar-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .filters-main {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .content-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .notes-content {
    padding: 20px 0 40px;
  }
  
  .notes-sidebar {
    padding: 40px 0;
  }
  
  .note-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .top-authors,
  .notes-statistics {
    padding: 24px 20px;
  }
  
  .author-item {
    padding: 12px;
  }
  
  .stat-item {
    padding: 16px;
  }
  
  .filters-actions {
    width: 100%;
    justify-content: center;
  }
  
  .add-note-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Дополнительные стили для исправления проблем */

/* Исправление структуры страницы */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.notes-page {
    flex: 1 0 auto;
    min-height: calc(100vh - 70px); /* Высота минус навбар */
}

/* Заглушка для аватаров */
.author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #9b83ff, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

/* Состояние когда нет конспектов */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #c8c8e8;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #9b83ff, #667eea);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(155, 131, 255, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c8c8e8;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Исправление для футера */
footer {
    flex-shrink: 0;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-box {
        max-width: 100%;
    }
    
    .notes-filters {
        position: static;
    }
}

/* Добавьте эти стили в конец notes.css */

/* Форма добавления конспекта */
.add-note-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #c8c8e8;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #9b83ff;
    box-shadow: 0 0 0 2px rgba(155, 131, 255, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #888;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .add-note-form {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Стили для просмотра конспекта */
.note-view-header {
    margin-bottom: 30px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.note-date {
    color: #888;
    font-size: 14px;
}

.note-view-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
}

.note-description-section,
.note-content-section,
.note-tags-section {
    margin-bottom: 40px;
}

.note-description-section h3,
.note-content-section h3,
.note-tags-section h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.note-description-section p {
    color: #c8c8e8;
    line-height: 1.6;
    font-size: 16px;
}

.note-content-text {
    color: #c8c8e8;
    line-height: 1.7;
    font-size: 16px;
    white-space: pre-wrap;
}

.note-actions {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Адаптивность для просмотра */
@media (max-width: 768px) {
    .note-view-content {
        padding: 24px;
    }
    
    .note-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .note-actions {
        flex-direction: column;
    }
    
    .note-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Стили для кнопок действий */
.note-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-danger {
    background: #f77262;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-danger:hover {
    background: #e05a4a;
}

/* Адаптивность для кнопок */
@media (max-width: 768px) {
    .note-actions {
        flex-direction: column;
    }
    
    .note-actions .btn {
        justify-content: center;
    }
}

/* Исправления для поисковой строки */
.search-container {
    display: none;
    animation: slideDown 0.3s ease;
    margin-top: 20px;
}

.search-container.active {
    display: block;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 100px 12px 16px; /* Увеличили правый отступ для кнопок */
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-box input:focus {
    border-color: #9b83ff;
    box-shadow: 0 0 0 2px rgba(155, 131, 255, 0.2);
}

.search-box input::placeholder {
    color: #888;
}

.clear-search {
    position: absolute;
    right: 50px; /* Сдвинули левее для кнопки поиска */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #9b83ff, #667eea);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.search-submit:hover {
    background: linear-gradient(135deg, #8a72ee, #5a6fd8);
    transform: translateY(-50%) scale(1.05);
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-box {
        max-width: 100%;
    }
    
    .search-box input {
        padding: 12px 90px 12px 16px;
    }
    
    .clear-search {
        right: 45px;
    }
    
    .search-submit {
        right: 8px;
    }
}

/* Убираем старые стили иконки поиска слева */
.search-box i.bx-search {
    display: none;
}