/* styles.css (Pro Version mit Kategorien & Toasts) */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s;
    z-index: 1000;
  }
  .toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  .toast-success {
    background-color: #28a745;
  }
  .toast-info {
    background-color: #17a2b8;
  }
  .toast-error {
    background-color: #dc3545;
  }
  
  body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: #333;
    animation: fadeIn 1s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  #app {
    max-width: 700px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
  }
  
  button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #00c6ff, #0072ff);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  button:hover {
    transform: scale(1.03);
  }
  
  #logout-btn {
    background: #dc3545;
    margin-top: 15px;
  }
  
  .hidden {
    display: none;
  }
  
  ul {
    list-style: none;
    padding: 0;
  }
  
  li.note-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background 0.3s;
  }
  
  li.note-item.completed {
    background: #e2e3e5;
    text-decoration: line-through;
    color: gray;
  }
  
  .note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #666;
  }
  
  .priority-icon {
    font-size: 1.2em;
    margin-left: 6px;
  }
  
  .error-message {
    color: red;
    font-size: 14px;
  }
  
  #search-input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    width: 100%;
    font-size: 16px;
    margin: 12px 0;
  }
  
  body.darkmode {
    background: linear-gradient(to right, #1e1e1e, #2c2c2c);
    color: #f1f1f1;
  }
  
  body.darkmode #app {
    background: #2a2a2a;
    color: #f1f1f1;
  }
  
  body.darkmode input,
  body.darkmode textarea,
  body.darkmode select {
    background-color: #444;
    color: #f1f1f1;
    border: 1px solid #666;
  }
  
  body.darkmode button {
    background: linear-gradient(to right, #444, #222);
  }
  
  body.darkmode li.note-item {
    background: #3a3a3a;
    color: #e0e0e0;
  }
  
  body.darkmode li.note-item.completed {
    background: #555;
    color: #aaa;
  }
  
  body.darkmode .note-meta {
    color: #bbb;
  }
  
  #darkmode-toggle {
    width: auto;
    padding: 6px 12px;
    font-size: 14px;
    background: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  #darkmode-toggle:hover {
    background: #ddd;
  }
  
  body.darkmode #darkmode-toggle {
    background: #444;
    color: #f1f1f1;
    border-color: #666;
  }
  
  body.darkmode #darkmode-toggle:hover {
    background: #555;
  }
  

.full-delete-btn {
  background-color: #ff6b6b;
  color: white;
  font-size: 13px;
  padding: 6px 10px;
  margin-top: 6px;
  max-width: 200px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s;
}
.full-delete-btn:hover {
  background-color: #ff4c4c;
}


#loading-screen {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  z-index: 2000;
  animation: fadeIn 0.5s ease-in-out;
}

.loader-text {
  font-weight: bold;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

footer {
  font-size: 13px;
  margin-top: 40px;
  text-align: center;
  color: #666;
}

footer::after {
  content: "Entwickelt und Powered by UNREAL GAMING";
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #999;
}


body.darkmode #loading-screen {
  background-color: rgba(0, 0, 0, 0.8);
  color: #f1f1f1;
}

.compact-delete-btn {
  background-color: #6c63ff;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  margin-top: 4px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s ease;
}

.compact-delete-btn:hover {
  background-color: #574fd6;
}


.note-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  padding: 16px;
  margin-bottom: 16px;
  transition: transform 0.2s ease-in-out;
}

.note-card:hover {
  transform: scale(1.02);
}

.note-card .note-meta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.note-card .note-text {
  font-size: 1em;
  margin-bottom: 12px;
}


body.darkmode .note-card {
  background: #3a3a3a;
  color: #e0e0e0;
}

body.darkmode .note-card .note-meta {
  color: #bbb;
}

.note-card.completed {
  background: #e2e3e5;
  color: #888;
  text-decoration: line-through;
}

body.darkmode .note-card.completed {
  background: #555;
  color: #aaa;
  text-decoration: line-through;
}


.note-card.low {
  border-left: 6px solid #007bff;
}

.note-card.medium {
  border-left: 6px solid #ffc107;
}

.note-card.high {
  border-left: 6px solid #dc3545;
}

#filter-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#filter-buttons button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  background-color: #f0f0f0;
  transition: background-color 0.2s;
}

#filter-buttons button.active {
  background-color: #007bff;
  color: white;
}

body.darkmode #filter-buttons button {
  background-color: #444;
  color: #f1f1f1;
}

body.darkmode #filter-buttons button.active {
  background-color: #0056b3;
}


.priority-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  color: white;
  backdrop-filter: blur(4px);
  opacity: 0.85;
  z-index: 1;
  text-transform: none;
}

.priority-badge.low {
  background-color: rgba(0, 123, 255, 0.7); /* Blau */
}

.priority-badge.medium {
  background-color: rgba(255, 193, 7, 0.7); /* Gelb */
}

.priority-badge.high {
  background-color: rgba(220, 53, 69, 0.7); /* Rot */
}

.note-card {
  position: relative;
  margin-top: 20px;
}



@keyframes fadeInNote {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOutNote {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

.note-card.fade-in {
  animation: fadeInNote 0.5s ease forwards;
}

.note-card.fade-out {
  animation: fadeOutNote 0.5s ease forwards;
}
