@import url('https://fonts.googleapis.com/css2?family=Gabriela&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --color-primary: #4338ca;
    --color-primary-light: #4f46e5;
    --color-bg: #f3f3f3;
    --color-bg-variant: #d4d4d4;
    --color-text-primary: #333;
    --color-text-secondary: #666;
    --color-controls-notes-model-bg: #fff;
    --color-white-black: #000;
    --color-box-shadow: rgba(0, 0, 0, 0.05)
}

.dark-mode {
    --color-primary: #4338ca;
    --color-primary-light: #4f46e5;
    --color-bg: #222;
    --color-bg-variant: #4d4d4d;
    --color-text-primary: #f3f3f3;
    --color-text-secondary: #ccc;
    --color-controls-notes-model-bg: #1b1b1b;
    --color-white-black: #fff;
    --color-box-shadow: rgba(255, 255, 255, 0.05)
}

::-webkit-scrollbar {
    display: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    padding: 10px 35px;
    transition: all 1s;
}

main {
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

#theme-switch {
    height: 50px;
    width: 50px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--color-bg-variant);
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    outline: none;
    position: fixed;
    top: 20px;
    right: 20px;
}

#theme-switch svg {
    fill: var(--color-text-secondary);
}

#theme-switch svg:last-child {
    display: none;
}

.dark-mode #theme-switch svg:first-child {
    display: none;
}

.dark-mode #theme-switch svg:last-child {
    display: block;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 12px;
    font-family: "Montserrat", sans-serif;
}

.header p {
    font-size: 1.3rem;
    color: var(--color-text-secondary);
    font-family: "Jost", sans-serif;
}

.body {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex: 1;
}

.note-container {
    width: 210%;
    font-family: "Montserrat", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    line-height: 1.6;
    /* min-height: 100vh; */
}

.controls {
    background-color: var(--color-controls-notes-model-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--color-box-shadow);
    padding: 20px;
    margin-bottom: 32px;
    transition: all 1s;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .controls-container {
        flex-direction: row;
    }
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.add-btn {
    background-color: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #4338ca;
}

.notes-grid {
    /* display: grid; */
    /* grid-template-columns: 1fr; */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}

@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 {
    background-color: var(--color-controls-notes-model-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--color-box-shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 250px;
    width: 400px;
    transition: all 1s;

    ::-webkit-scrollbar {
        display: none;
    }
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.note-content {
    padding: 20px;
    max-height: 250px;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.note-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

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

.delete-btn {
    color: var(--color-text-secondary);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.delete-btn:hover {
    color: #ef4444;
}

.note-text {
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    white-space: pre-line;
    max-height: 130px;
    /* background: red; */
    overflow-x: hidden;
    text-overflow: ellipsis;
}

.note-footer {
    width: 90%;
    display: flex;
    /* gap: 10px; */
    align-items: center;
    justify-content: space-between;
    position: absolute;
    bottom: 12px;
}

.note-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    gap: 8px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-work {
    background-color: #e0e7ff;
    color: #4338ca;
}

.tag-personal {
    background-color: #ede9fe;
    color: #7c3aed;
}

.tag-ideas {
    background-color: #ecfdf5;
    color: #047857;
}

.tag-reminders {
    background-color: #fef3c7;
    color: #b45309;
}

.note-date {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.6;
    display: none;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--color-controls-notes-model-bg);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 20px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

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

.modal-header h3 {
    color: var(--color-white-black);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--color-text-secondary);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.tag-option {
    position: relative;
}

.tag-radio {
    position: absolute;
    opacity: 0;
}

.tag-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tag-radio:checked+.tag-label {
    color: #fff;
}

.tag-radio:checked+.tag-work {
    background-color: #4f46e5;
}

.tag-radio:checked+.tag-personal {
    background-color: #7c3aed;
}

.tag-radio:checked+.tag-ideas {
    background-color: #10b981;
}

.tag-radio:checked+.tag-reminders {
    background-color: #f59e0b;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #4338ca;
}

.confirmation-modal .modal-body {
    text-align: center;
}

.confirmation-text {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.confirmation-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.confirm-btn {
    background-color: #ef4444;
    color: #fff;
    border: none;
}

.confirm-btn:hover {
    background-color: #dc2626;
}

.cancel-btn {
    background-color: #e5e7eb;
    color: var(--color-text-primary);
    border: none;
}

.cancel-btn:hover {
    background-color: #d1d5db;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.todo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    font-family: "Jost", sans-serif;
}

.todo-app {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 30px;
    border-radius: 20px;
    /* box-shadow: 0 0 15px rgba(0, 0, 0, 0.15); */
    box-shadow: 0 0 12px var(--color-box-shadow);
    /* border: 3px solid rgba(255, 255, 255, 0.18); */
    background-color: var(--color-controls-notes-model-bg);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 150px;
    transition: all 1s;
}

.todo-app h1 {
    font-size: 2rem;
}

.stat-container {
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 50px var(--color-box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.details {
    width: 100%;
}

.details h3 {
    color: var(--color-text-primary);
}

#progress-bar {
    width: 100%;
    height: 7px;
    /* background-color: rgba(255, 194, 209, 0.302); */
    background-color: rgba(79, 70, 229, 0.5);
    border-radius: 20px;
    position: relative;
    margin-top: 15px;
}

#progress {
    width: 0%;
    height: 100%;
    /* background-color: #ff6193; */
    background-color: #4f46e5;
    border-radius: 20px;
    transition: width 0.3s ease;
}

#numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #4f46e5;
    border: 2px solid rgba(79, 70, 229, 0.3);
    font-weight: bold;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #fff;
}

.input-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.input-area input {
    flex: 1;
    padding: 10px 16px;
    font-size: 1.1rem;
    border: none;
    outline: none;
    border-radius: 22px;
    background: rgba(79, 70, 229, 0.3);
    /* color: #000; */
}

.input-area input::placeholder {
    color: var(--color-text-secondary);
}

.input-area button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    padding: 8px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    /* background-color: rgba(255, 194, 209, 0.3); */
    background-color: rgba(79, 70, 229, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-area button:hover {
    transform: scale(1.1);
    /* background-color: #ff6193; */
    background-color: #4f46e5;
}

.todo-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.todo-wrapper img {
    width: 300px;
}

#task-list {
    width: 100%;
}

#task-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* background-color: rgba(255, 194, 209, 0.3); */
    background-color: rgba(79, 70, 229, 0.5);
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 30px;
    font-size: 1.2rem;
    /* color: #4f46e5; */
    position: relative;
    transition: box-shadow 0.2s ease;
}

#task-list li:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#task-list li .checkbox {
    min-width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
    border-radius: 50%;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#task-list li .checkbox:checked {
    /* background-color: #ff6193; */
    background-color: #4f46e5;
    transform: scale(1.1);
}

#task-list li .checkbox:checked::before {
    content: '\2713';
    color: #fff;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

#task-list li span {
    flex: 1;
    margin-left: 10px;
    word-wrap: break-word;
}

#task-list li.completed span {
    text-decoration: 2px line-through rgba(0, 0, 0, 0.8);
    color: rgba(0, 0, 0, 0.8);
}

.task-buttons {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

.task-buttons button {
    /* background-color: rgba(255, 194, 209, 0.3); */
    background-color: rgba(79, 70, 229, 0.3);
    border: 0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.task-buttons button:hover {
    transform: scale(1.2);
}

.task-buttons .todo-edit-btn {
    background-color: #ffbf00;
}

.task-buttons .todo-delete-btn {
    /* background-color: #ff7092; */
    background-color: #ef4444;
}

@media (max-width: 600px) {
    .todo-container {
        margin: 0 20px;
        padding: 0 10px;
    }

    .todo-app {
        padding: 1.5rem;
        gap: 20px;
    }

    #numbers {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    .input-area input {
        font-size: 1rem;
    }

    #task-list li {
        font-size: 1rem;
    }
}