* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #cf9aff, #95c0ff);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 i {
    font-size: 2.2rem;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 45px;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(to right, #9418fd, #571094);
    color: white;
    box-shadow: 0 4px 15px rgba(148, 24, 253, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(148, 24, 253, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #571094;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-options select {
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.notes-container {
    display: grid;
    gap: 25px;
}

.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.list-view {
    grid-template-columns: 1fr;
}

.note {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.note:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.note-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
}

.note-content {
    flex-grow: 1;
    color: #555;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.note-date {
    font-size: 0.8rem;
    color: #888;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.note-action {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.note-action:hover {
    color: #571094;
    transform: scale(1.1);
}

.note-priority {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-bottom-left-radius: 8px;
    color: white;
}

.priority-high {
    background: #f44336;
}

.priority-medium {
    background: #ff9800;
}

.priority-low {
    background: #4caf50;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.close {
    font-size: 1.8rem;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-body input, .modal-body textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    resize: none;
}

.modal-body input:focus, .modal-body textarea:focus {
    outline: none;
    border-color: #9418fd;
    box-shadow: 0 0 0 2px rgba(148, 24, 253, 0.2);
}

.modal-body textarea {
    min-height: 200px;
}

.note-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.color-picker, .priority-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker span, .priority-selector span {
    font-weight: 500;
    color: #555;
}

.color-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-container {
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .grid-view {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .note-options {
        flex-direction: column;
        gap: 15px;
    }
}
