/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.btn.secondary:hover {
    background: #e9ecef;
}

.btn.danger {
    background: #dc3545;
    color: white;
}

.btn.danger:hover {
    background: #c82333;
}

.btn.small {
    padding: 5px 10px;
    font-size: 0.9em;
}

/* Notes container */
.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Note card */
.note-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.note-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    flex-grow: 1;
    margin-right: 10px;
}

.note-actions {
    display: flex;
    gap: 5px;
}

.note-actions .btn {
    padding: 5px 8px;
    font-size: 0.8em;
}

/* Todo list */
.todo-list {
    max-height: 300px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    padding-left: 5px;
    padding-right: 5px;
    margin-left: -5px;
    margin-right: -5px;
}

.todo-checkbox {
    margin-right: 10px;
    transform: scale(1.2);
}

.todo-text {
    flex-grow: 1;
    font-size: 1em;
    color: #495057;
    transition: all 0.2s ease;
}

.todo-text.completed {
    text-decoration: line-through;
    color: #6c757d;
    opacity: 0.7;
}

.todo-actions {
    display: flex;
    gap: 5px;
}

.todo-actions .btn {
    padding: 3px 6px;
    font-size: 0.7em;
}

/* Add todo section */
.add-todo {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f8f9fa;
}

.add-todo input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 10px;
}

.add-todo input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #000;
}

.modal h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 20px;
}

.modal input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.modal .btn {
    width: 100%;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2em;
    margin-top: 50px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    h1 {
        font-size: 2em;
    }

    .notes-container {
        grid-template-columns: 1fr;
    }

    .note-card {
        padding: 15px;
    }

    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .note-actions {
        align-self: flex-end;
    }
}

/* Scrollbar styling */
.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.todo-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
