:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6c757d;
    --hover-color: #3a5a8a;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
}

.app-header h1 i {
    margin-right: 10px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hover-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    opacity: 0.8;
}

.btn-icon {
    background: transparent;
    color: var(--secondary-color);
    padding: 5px;
}

.search-container {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

#search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.note {
    background-color: #fffacd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.2s ease;
    position: relative;
}

.note:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.note-title {
    font-weight: bold;
    font-size: 1.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.note-content {
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.note-actions i {
    margin-left: 10px;
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.note-actions i:hover {
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    margin-top: 50px;
    display: none;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-top: 20px;
}

.empty-image {
    max-width: 100%;
    height: auto;
    opacity: 0.7;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 112%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    background: none;
    border: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.color-picker {
    margin: 20px 0;
}

.color-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.color-option:hover {
    border-color: var(--border-color);
}

input[type="radio"]:checked + .color-option {
    border-color: var(--primary-color);
}

input[type="radio"] {
    display: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20% auto;
    }
}
