:root {
  --main-bg: #564a77;
  --sidebar-bg: #565e69;
  --content-bg: #ffffff;
  --border-color: #e0e0e0;
  --green-btn: #28a745;
  --red-btn: #dc3545;
  --text-dark: #333;
  --text-light: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Tajawal", sans-serif;
}

body {
  background-color: var(--main-bg);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.app-wrapper {
  width: 95%;
  max-width: 1000px;
  height: 85vh;
  min-height: 500px;
  background-color: var(--content-bg);
  display: flex;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

.sidebar {
  width: 35%;
  background-color: var(--sidebar-bg);
  color: var(--text-light);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.note-info {
  flex-grow: 1;
  text-align: right;
  padding-left: 10px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.left-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--green-btn);
}

.delete-icon {
  color: #ff6b6b;
  cursor: pointer;
  font-size: 18px;
}

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

.completed-task {
  text-decoration: line-through;
  color: #aaa;
}

.main-area {
  width: 65%;
  padding: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #aaa;
  text-align: center;
}

.editor-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.header-title {
  text-align: right;
  margin-bottom: 15px;
}
.header-title h2 {
  color: var(--text-dark);
  font-size: 22px;
}

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

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  outline: none;
  font-size: 16px;
  background-color: #fff;
  border-radius: 5px;
}

input {
  height: 45px;
}
textarea {
  flex-grow: 1;
  resize: none;
}
input:focus,
textarea:focus {
  border-color: #888;
}

.button-group {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

#save-btn {
  background-color: var(--green-btn);
  color: white;
  border: none;
  padding: 10px 30px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
}

#save-btn:hover {
  background-color: #218838;
}

.fab-btn {
  position: absolute;
  right: 32.5%;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: var(--red-btn);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transition: transform 0.3s;
}

.fab-btn:hover {
  background-color: #c82333;
  transform: translateY(-50%) scale(1.1);
}

@media screen and (max-width: 768px) {
  .app-wrapper {
    flex-direction: column;
    height: 95vh;
    width: 100%;
  }

  .sidebar {
    width: 100%;
    height: 35%;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-area {
    width: 100%;
    height: 65%;
    padding: 20px;
  }

  .fab-btn {
    right: 20px;
    bottom: 20px;
    top: auto;
    transform: none;
    width: 55px;
    height: 55px;
  }

  .fab-btn:hover {
    transform: scale(1.1);
  }

  .header-title h2 {
    font-size: 18px;
  }
  #save-btn {
    width: 100%;
  }
}
