.single-note-page {
    padding: 2rem 0;
}

.back-button {
    margin-bottom: 2rem;
}

.full-content {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
/* Notes grid */
.notes-page {
    padding: 2rem 0;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto;
}
.note-card.flipped .note-card-inner {
    transform: rotateY(180deg);
}
/* Card container */
.note-card {
    perspective: 1000px;
    cursor: pointer;
    height: 300px; /* Увеличил высоту */
    min-height: 300px;
}
.note-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease; /* Время анимации переворота */
    transform-style: preserve-3d; /* Важно! Сохраняем 3D-пространство */
}
.note-card-front,
.note-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Скрываем обратную сторону во время поворота */
    backface-visibility: hidden;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.note-card-front {
    background: white;
    color: #333;
}
.note-card-back {
    background-color: #f1c40f;
    color: #333;
    transform: rotateY(180deg); 
}
/* Цвета для разных типов карточек */
.note-card-theory .note-card-front {
    border-left: 8px solid #2196f3;
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
}
.note-card-technique .note-card-front {
    border-left: 8px solid #9c27b0;
    background: linear-gradient(135deg, #fbf5fc 0%, #f3e5f5 100%);
}
.note-card-practice .note-card-front {
    border-left: 8px solid #4caf50;
    background: linear-gradient(135deg, #f5fbf5 0%, #e8f5e9 100%);
}
/* Верхняя панель с мета-информацией */
.note-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.note-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.note-info {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.note-id, .note-date, .note-category {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.6rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
/* Область контента */
.note-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
/* Область вопроса */
.note-question {
    font-size: 1.0rem;
    line-height: 1.5;
    font-weight: 500;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Ограничиваем количество строк */
    -webkit-box-orient: vertical;
    flex: 1;
}
/* Область ответа */
.note-answer {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.short-answer {
    flex: 1;
    overflow: hidden;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.5;
}
.short-answer:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, #f1c40f 70%);
    pointer-events: none;
}
.answer-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
/* Стили для изученных карточек */
.note-card.completed .note-card-front {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 8px solid #6c757d;
    filter: grayscale(0.3);
}

.note-card.completed .note-icon {
    background: #6c757d;
    color: white;
}

/* Анимации */
.note-card {
    transition: all 0.3s ease;
}

.note-card.completed .short-answer {
    opacity: 0.7;
}

/* Иконка для изученных карточек */
.note-card.completed .note-card-front::after {
    content: '✅';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.5rem;
}
/* Стили для AI-предупреждения */
.ai-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.ai-warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.ai-warning-content {
    flex: 1;
}

.ai-warning strong {
    color: #856404;
}

.ai-warning-small {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #856404;
    text-align: center;
    display: inline-block;
}

/* Стили для фильтров */
.notes-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Адаптивность фильтров */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-label {
        margin-bottom: 0.5rem;
    }
    
    .filter-btn {
        text-align: center;
    }
}

/* Анимация для привлечения внимания */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.ai-warning {
    animation: pulse 2s ease-in-out;
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    .ai-warning {
        background: linear-gradient(135deg, #332701, #4d3f04);
        border-color: #ffd54f;
        color: #ffecb5;
    }
    
    .ai-warning strong {
        color: #ffd54f;
    }
    
    .ai-warning-small {
        background: #332701;
        border-color: #ffd54f;
        color: #ffecb5;
    }
}
/* Адаптивность */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .note-card {
        height: 250px;
    }
    
    .note-meta {
        gap: 0.6rem;
    }
    
    .note-info {
        gap: 0.4rem;
    }
    
    .note-id, .note-date, .note-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
        max-width: 80px;
    }
}
