.notes-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

/* Заголовок */
.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: #000;
    border-bottom: none;
}

.back-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #ff9500;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
}

.back-button svg {
    width: 20px;
    height: 20px;
    margin-right: 4px;
}

.options-button {
    background: none;
    border: none;
    color: #ff9500;
    padding: 0;
    cursor: pointer;
}

/* Заголовок Заметки */
.notes-title-container {
    padding: 0 16px;
    margin-bottom: 16px;
}

.notes-title {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    color: #fff;
}

/* Поиск */
.notes-search-container {
    padding: 0 16px;
    margin-bottom: 16px;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    gap: 8px;
}

.search-bar input {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.voice-search-button {
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
}

/* Контент заметок */
.notes-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    background-color: #000;
}

/* Список заметок */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 80px 0; /* Добавляем отступ снизу для кнопки добавления */
}

.note-item {
    background-color: #1c1c1e;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 16px;
}

.note-item.pinned::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff9500;
    position: absolute;
    right: 24px;
    top: 16px;
}

.note-item:active {
    background-color: #2c2c2e;
}

.note-item .note-preview h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item .note-preview p {
    display: flex;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* Кнопка добавления новой заметки */
.new-note-button {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.new-note-button svg {
    width: 30px;
    height: 30px;
}

.back-button-notes {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #ff9500;
    padding: 8px;
    cursor: pointer;
}

.back-button-notes svg {
    width: 24px;
    height: 24px;
    margin-right: 6px;
}

.back-button-notes span {
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
}

/* Редактор заметки */
.note-editor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.note-editor.hidden {
    display: none;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.done-button {
    color: #ff9500;
    background: none;
    border: none;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.editor-actions {
    display: flex;
    gap: 16px;
}

.editor-actions button {
    background: none;
    border: none;
    color: #ff9500;
    cursor: pointer;
    padding: 8px;
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
}

.editor-content input.note-title {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    outline: none;
}

.editor-content textarea.note-text {
    background: none;
    border: none;
    color: #fff;
    font-size: 17px;
    flex: 1;
    resize: none;
    outline: none;
    line-height: 1.5;
}

.editor-content input::placeholder,
.editor-content textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Модальное окно детального просмотра */
.note-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.note-details-modal.visible {
    opacity: 1;
    transform: translateX(0);
}

.note-details-modal.closing {
    opacity: 0;
    transform: translateX(100%);
}

.note-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: #1c1c1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.note-details-back-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #ff9500;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

.note-details-back-button svg {
    width: 20px;
    height: 20px;
    margin-right: 4px;
}

.note-details-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.note-details-action-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.note-details-action-button svg {
    width: 24px;
    height: 24px;
}

.note-details-content {
    flex: 1;
    background-color: #000;
    padding: 16px;
    overflow-y: auto;
    width: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
}

.note-details-title {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 16px 0;
}

.note-text-content {
    color: #fff;
    font-size: 17px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.note-details-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: #1c1c1e;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 48px;
}

.toolbar-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.toolbar-button svg {
    width: 24px;
    height: 24px;
}

.edit-button {
    padding: 8px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s;
}

.edit-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Форматирование нумерованного списка, как в iOS */
.note-text-content ol {
    padding-left: 24px;
    margin: 8px 0;
}

.note-text-content ol li {
    margin-bottom: 8px;
}

/* Стилизация для текста, который представляет собой нумерованный список без ol/li */
.note-text-content {
    counter-reset: item;
}

.note-text-content p {
    margin: 8px 0;
}

.close-details-button {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-details-button:hover {
    background-color: #0066CC;
}

/* Контекстное меню */
.note-context-menu {
    position: fixed;
    background-color: #2c2c2e;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    padding: 8px 0;
    z-index: 12000;
    min-width: 200px;
    transform-origin: top left;
    animation: scale-in 0.2s ease-out;
}

@keyframes scale-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.menu-item {
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pin-action {
    color: #ff9500;
}

.delete-action {
    color: #ff3b30;
}

.share-action {
    color: #007aff;
}

/* Информационное сообщение внизу */
.icloud-message {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1c1c1e;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding: 8px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.storage-link {
    color: #ff9500;
    text-decoration: none;
} 