body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #fff;
    padding: 10px;
}

.note-container-scrollable {
    /* width: 98%; */
    max-width: 1000px;
    height: 80%;
    margin: auto;
    margin-top: 40px;
    border: 1px solid #333;
    border-radius: 5px;
    overflow-y: auto;
    padding: 10px;
    background-color: #1e1e1e;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.6);
}

textarea::-webkit-scrollbar {
    width: 6px; /* Độ rộng của scrollbar */
    height: 10px; /* Chiều cao của scrollbar ngang (nếu có) */
}

textarea::-webkit-scrollbar-thumb {
    background-color: #a7e9fd; /* Màu của thanh cuộn */
    border-radius: 5px; /* Bo góc thanh cuộn */
    border: 2px solid #1E1E1E; /* Tạo viền xung quanh thanh cuộn */
}

textarea::-webkit-scrollbar-track {
    background-color: #282828; /* Màu nền của scrollbar */
    border-radius: 5px; /* Bo góc track */
}

/* Tùy chọn màu khi hover vào thanh cuộn */
textarea::-webkit-scrollbar-thumb:hover {
    background-color: #76C796; /* Màu khi hover */
}

.note {
    border: 1px solid #444;
    border-radius: 5px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #282828;
}

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

.title {
    font-weight: bold;
    color: #f1f1f1;
    width: 90%; /* Allow for larger title width */
    font-size: 17px;
    color: #a7e9fd;
}

.content {
    width: 100%;
    /* chiều cao bằng độ cao của nội dung */
    min-height: 200px;

    border: 1px solid #444;
    border-radius: 5px;
    padding: 5px;
    resize: none;
    background-color: #1e1e1e;
    color: #fff;
    font-size: 15px;
}

.note-footer {
    margin-top: 5px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.up-down {
    width: 90%;
}

button, .note-header button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 3px;
    cursor: pointer;
}

button:hover, .note-header button:hover {
    background-color: #0056b3;
}

/* Cách thêm biểu tượng vào button */
.note-header i {
    font-size: 20px;
    cursor: pointer;
    margin: 0 5px;
    color: white;
}

.note-header i:hover {
    color: #ffcc00;
}

button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #218838;
}

/* Nút thêm ghi chú */
.add-note-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 1000;
}

.add-note-btn:hover {
    background-color: #218838;
}

/* Thay đổi màu khi rê chuột qua biểu tượng */
.add-note-btn i {
    pointer-events: none; /* Ngăn chặn sự kiện chuột trên biểu tượng */
}

/* toastr */

#toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.delete-icon {
    position: absolute;
    right: 0;
    cursor: pointer;
    color: #f98a69;
    font-size: 20px;
    z-index: 10;
}

.delete-icon:hover {
    color: #ff1100;
}


/* Định vị các button ở góc dưới trái */
.file-btn, .file-input {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
}

.file-btn-upload {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
}

.file-btn:hover {
    background-color: #0056b3;
}

.file-input {
    position: fixed;
    bottom: 20px;
    left: 100px; /* Cách nút lưu file một khoảng */
    display: none; /* Ẩn input file mặc định */
}

/* Thêm màu sắc cho biểu tượng */
.file-btn i {
    pointer-events: none; /* Ngăn chặn sự kiện chuột trên biểu tượng */
}

/* Thêm hiệu ứng hover */
.file-btn:hover i {
    color: #ffcc00;
}

/* Định vị các button ở góc dưới trái */
.file-btn {
    position: fixed;
    bottom: 20px;
    left: 100px;
    width: 60px;
    height: 60px;
    background-color: #a2af3c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
}

.file-btn:hover {
    background-color: #e33a80;
}

/* Ẩn input file, để khi nhấn nút Chọn File, nó sẽ mở hộp thoại chọn file */
.file-input {
    position: fixed;
    bottom: 20px;
    left: 100px; /* Cách nút lưu file một khoảng */
    display: none; /* Ẩn input file mặc định */
}

/* Thêm màu sắc cho biểu tượng */
.file-btn i {
    pointer-events: none; /* Ngăn chặn sự kiện chuột trên biểu tượng */
}

/* Thêm hiệu ứng hover */
.file-btn:hover i {
    color: #ffcc00;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #1E1E1E;
    color: #fff;
    resize: none;
    box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s, border-color 0.2s;
}

textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0px 0px 10px rgba(76, 175, 80, 0.7);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.toast {
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    font-size: 15px;
}

/* Image Container and Preview Styles */
.image-container {
    margin-top: 10px;
    padding: 10px;
    background-color: #1e1e1e;
    border-radius: 5px;
}

.add-image-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.add-image-btn:hover {
    background-color: #0056b3;
}

.add-image-btn i {
    font-size: 16px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.delete-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.3s;
}

.delete-image-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

.delete-image-btn i {
    pointer-events: none;
}

/* Theme overrides */
:root {
    --bg-1: #070a12;
    --bg-2: #0b1220;
    --surface: rgba(12, 18, 30, 0.9);
    --surface-2: rgba(16, 24, 40, 0.95);
    --border: rgba(120, 255, 240, 0.18);
    --text: #eef6ff;
    --muted: #9fb0c9;
    --accent: #6df8ff;
    --accent-2: #9b7bff;
    --success: #62ffb5;
    --danger: #ff5fa2;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

body {
    font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: radial-gradient(1200px 600px at 8% -12%, rgba(109, 248, 255, 0.25), transparent 60%),
        radial-gradient(900px 520px at 92% 4%, rgba(155, 123, 255, 0.22), transparent 55%),
        radial-gradient(700px 520px at 50% 120%, rgba(98, 255, 181, 0.18), transparent 65%),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
    color: var(--text);
    padding: 90px 16px 32px;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 60%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.navbar {
    height: 64px;
    background: rgba(10, 14, 24, 0.86);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.home {
    font-family: "Fraunces", "Space Grotesk", serif;
    font-size: 22px;
    letter-spacing: 0.5px;
}

.nav-buttons button {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.9), rgba(255, 97, 97, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(255, 117, 76, 0.2);
}

.nav-buttons button:hover {
    background: linear-gradient(135deg, rgba(255, 179, 71, 1), rgba(255, 97, 97, 1));
}

.note-container-scrollable {
    max-width: 980px;
    height: auto;
    min-height: 60vh;
    background: var(--surface);
    border: 1px solid rgba(120, 255, 240, 0.25);
    box-shadow: var(--shadow), 0 0 40px rgba(109, 248, 255, 0.12);
    backdrop-filter: blur(16px);
}

.note {
    border: 1px solid rgba(120, 255, 240, 0.28);
    background: var(--surface-2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 26px rgba(109, 248, 255, 0.25);
    border-radius: 16px;
    padding: 16px;
    animation: note-fade 420ms ease;
}

.note::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    border: 1px solid rgba(155, 123, 255, 0.22);
    opacity: 0.6;
    pointer-events: none;
}

@keyframes note-fade {
    from {
        transform: translateY(10px);
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.title {
    color: var(--accent);
    font-size: 18px;
    text-shadow: 0 0 14px rgba(109, 248, 255, 0.6);
}

.content {
    border: 1px solid rgba(120, 255, 240, 0.26);
    background: rgba(10, 14, 22, 0.95);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.note-header i {
    color: var(--muted);
    transition: transform 0.2s, color 0.2s, text-shadow 0.2s;
}

.note-header i:hover {
    color: var(--accent);
    transform: translateY(-1px);
    text-shadow: 0 0 16px rgba(109, 248, 255, 0.8);
}

.delete-icon {
    color: var(--danger);
}

.add-note-btn {
    background: linear-gradient(135deg, var(--success), #00f5d4);
    box-shadow: 0 18px 36px rgba(0, 245, 212, 0.45), 0 0 18px rgba(0, 245, 212, 0.5);
}

.file-btn-upload {
    background: linear-gradient(135deg, #6df8ff, #7aa6ff);
    box-shadow: 0 14px 28px rgba(109, 248, 255, 0.45), 0 0 18px rgba(109, 248, 255, 0.5);
}

.file-btn {
    background: linear-gradient(135deg, #9b7bff, #ff5fa2);
    box-shadow: 0 14px 28px rgba(155, 123, 255, 0.45), 0 0 18px rgba(255, 95, 162, 0.5);
}

.add-image-btn {
    background: linear-gradient(135deg, #7aa6ff, #6df8ff);
    box-shadow: 0 8px 18px rgba(109, 248, 255, 0.45), 0 0 14px rgba(109, 248, 255, 0.4);
}

.image-container {
    background: rgba(10, 12, 18, 0.85);
    border: 1px solid rgba(120, 255, 240, 0.24);
    box-shadow: inset 0 0 16px rgba(109, 248, 255, 0.08);
}

.image-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    body {
        padding: 84px 12px 24px;
    }

    .note-container-scrollable {
        padding: 12px;
    }

    .note {
        padding: 14px;
    }

    .add-note-btn,
    .file-btn,
    .file-btn-upload {
        width: 54px;
        height: 54px;
    }
}