/* Notes Page - Minimalist Clean Theme */

/* Page Header */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #ecf0f1 0%, #f0f3f7 100%);
    border-radius: 0;
}

.page-header h1 {
    font-size: 44px;
    margin-bottom: 15px;
    color: #1f2937;
}

.page-header p {
    font-size: 18px;
    color: #6b7280;
}

/* Add Note Section */
.add-note-section {
    padding: 40px 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.btn-add-note {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-add-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 12px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 16px;
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 40px 20px;
}

.note-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-5px);
    border-color: #10b981;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.note-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}

.note-header h3 {
    font-size: 18px;
    color: #1f2937;
    flex: 1;
    margin: 0;
}

.category-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
}

.category-tag.math {
    background: #fef3c7;
    color: #92400e;
}

.category-tag.science {
    background: #ecfdf5;
    color: #065f46;
}

.category-tag.history {
    background: #fce7f3;
    color: #831843;
}

.category-tag.language {
    background: #dbeafe;
    color: #0c2340;
}

.category-tag.biology {
    background: #d1fae5;
    color: #065f46;
}

.category-tag.chemistry {
    background: #fee2e2;
    color: #7f1d1d;
}

.note-preview {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

.note-footer small {
    color: #9ca3af;
    font-size: 12px;
}

.btn-expand {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-expand:hover {
    background: #059669;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    transition: var(--transition);
}

.modal-close:hover {
    color: #1f2937;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 10px 25px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1f2937;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }

    .add-note-section {
        flex-direction: column;
    }

    .btn-add-note,
    .search-box {
        width: 100%;
    }

    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .note-card {
        padding: 20px;
    }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .note-card {
        padding: 15px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }

    .note-header {
        flex-direction: column;
    }

    .category-tag {
        width: fit-content;
    }
}
