* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(to right, #DBEAFE, #EDE9FE);
}

.container {
    max-width: 950px;
    width: 90%;
}

.header-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.app-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin: 0;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

.app-title:hover {
    color: #1976d2;
}

.download-btn {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.download-btn:hover {
    background-color: rgba(25, 118, 210, 0.1);
    transform: scale(1.1);
}

.controls {
    display: flex;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.search-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
}

.btn-success {
    background-color: #388e3c;
    color: white;
}

.btn-success:hover {
    background-color: #2e7d32;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #c62828;
}

.file-input-hidden {
    display: none;
}

.gear-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-btn:hover {
    background-color: rgba(25, 118, 210, 0.1);
    transform: scale(1.1);
}

.options-text {
    font-size: 0.875rem;
    color: #000;
    cursor: pointer;
    transition: color 0.2s;
}

.options-text:hover {
    color: #1976d2;
}

.options-text.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.options-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1005;
    min-width: 120px;
}

.options-dropdown.hidden {
    display: none;
}

.options-dropdown button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: #000;
    transition: background-color 0.2s;
}

.options-dropdown button:hover {
    background-color: #f5f5f5;
}

.options-dropdown button:first-child {
    border-radius: 4px 4px 0 0;
}

.options-dropdown button:last-child {
    border-radius: 0 0 4px 4px;
}

.options-section {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.25rem 0;
}

.options-section.hidden {
    display: none;
}

.options-row {
    display: flex;
    align-items: center;
}

.folder-select-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.folder-select-content h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.folder-options {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
    background: #fafafa;
}

/* Scrollbar styling for better UX */
.folder-options::-webkit-scrollbar {
    width: 8px;
}

.folder-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.folder-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.folder-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.folder-option {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.folder-option:last-child {
    margin-bottom: 0;
}

.folder-option:hover {
    background: #f5f5f5;
    border-color: #1976d2;
}

.folder-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.notes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}

@media (min-width: 768px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .notes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.note-card {
    position: relative;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.note-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.note-card.dragging {
    opacity: 0.5;
    cursor: move !important;
}

.note-card.selected {
    border: 2px solid #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.note-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
    font-size: 12px;
    color: transparent;
    transition: all 0.2s;
}

.note-checkbox.checked {
    border-color: #1976d2;
    background: #1976d2;
    color: white;
}

.note-checkbox:hover {
    border-color: #1976d2;
}

.note-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000000;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.note-preview {
    flex-grow: 1;
    margin-bottom: 1rem;
    color: #000000;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.note-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.note-action {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.note-action:hover {
    background-color: #f5f5f5;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Base for overlays */
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    height: 60%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
}

.close-btn:hover {
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.form-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.form-input[readonly] {
    background-color: transparent !important;
    border: 1px solid #ddd !important;
    cursor: default;
}

.form-input[readonly]:focus {
    border-color: #ddd !important;
    box-shadow: none !important;
}

.form-textarea {
    flex-grow: 1;
    resize: none;
    min-height: 200px;
    font-family: inherit;
    overflow-y: auto;
}

/* Note creation modal layout */
.note-header-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.note-title-input {
    flex: 1;
    margin-bottom: 0 !important;
}

.folder-select {
    width: 20%;
    min-width: 120px;
    margin-bottom: 0 !important;
}

.hamburger-menu {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1003; /* Above sidebar */
    cursor: pointer;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease-in-out;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* Initially hidden */
    width: 250px;
    height: 100%;
    background-color: #f4f4f4;
    padding-top: 60px; /* Space for hamburger menu or title */
    transition: left 0.3s ease-in-out;
    z-index: 1002; /* Above modal, below hamburger */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.btn-sidebar-top {
    width: calc(100% - 30px);
    margin: 15px;
    padding: 10px;
    font-size: 1em;
    text-align: center;
}

.btn-sidebar-bottom {
    width: calc(100% - 30px);
    margin: 15px;
    padding: 10px;
    font-size: 1em;
    text-align: center;
    margin-top: auto;
}

/* Folder list in sidebar */
.folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.folder-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.folder-list li:hover {
    background-color: #e0e0e0;
}

.folder-list li.active {
    background-color: rgba(25, 118, 210, 0.15);
    color: #1976d2;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    border: 1px solid rgba(25, 118, 210, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.folder-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
    cursor: pointer;
}

.folder-name {
    flex-grow: 1;
}

.folder-menu {
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    opacity: 0.7;
}

.folder-menu:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

/* Folder dropdown menu */
.folder-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1005;
    min-width: 120px;
}

.folder-dropdown button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.folder-dropdown button:hover {
    background-color: #f5f5f5;
}

.folder-dropdown button:first-child {
    border-radius: 4px 4px 0 0;
}

.folder-dropdown button:last-child {
    border-radius: 0 0 4px 4px;
}

.selection-actions {
    display: flex;
    gap: 1.5rem;
    margin-left: 1rem;
}

.selection-actions.hidden {
    display: flex;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.pagination-controls.hidden {
    display: none;
}

.pagination-btn {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    min-width: 35px;
}

.pagination-btn:hover:not(:disabled) {
    background: #1565c0;
    transform: scale(1.05);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* Info button in sidebar */
.info-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    background: #f5f5f5ad;
    border: 0px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

/* Attribution modal */
.attribution-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Highest z-index */
}

.attribution-modal.hidden {
    display: none;
}

.attribution-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.attribution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.attribution-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.attribution-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attribution-links a {
    color: #1976d2;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    line-height: 1.4;
}

.attribution-links a:hover {
    background-color: #f5f5f5;
    text-decoration: underline;
} 