/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  font-family: "Segoe UI", sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #ffe5e5, #f9caca, #f7b0b0);
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Nu mai este nevoie să fie centrat pe orizontală */
  
}
/* MAIN CONTENT */
.app-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
 
  margin-top: 50px;
  z-index: 1;
}

/* LAYOUT */
.container {
  display: flex;
  height: 100vh;
}
/* Meniul lateral (fixat la stânga) */
.meniu-lateral {
  width: 60px;
  background-color: #b22222;
    color: white;
  transition: width 0.4s ease;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
  z-index: 10;
 
}

.meniu-lateral:hover {
  width: 220px; /* Lățimea meniului se va extinde la 200px pe hover */
}

.meniu-lateral ul {
  list-style: none;
  padding: 0;
  width: 100%;
  margin-top: 80px;
}

.meniu-lateral li {
  padding: 12px;
  border-bottom: 1px solid white;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.meniu-lateral li:hover {
  background-color: white;
  color: #b22222;
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.item-icon {
  font-size: 1.5rem;
}

.item-txt {
  margin-left: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}


.meniu-lateral:hover .item-txt {
  opacity: 1;
}


/* LIGHT/DARK SWITCHER */
#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 1.8rem;
  background: #fff;
  color: #8b0000;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 10000;
  transition: background-color 0.3s ease;
}

#theme-toggle:hover {
  background-color: #8b0000;
  color: #fff;
}

body.dark {
  background: linear-gradient(to right, #3b0a0a, #5a1f1f);
  color: white;
}

body.dark .main-content {
  background: rgba(255,255,255,0.05);
}

body.dark .sidebar {
  background: #3a0f0f;
  color: #eee;
}

body.dark .sidebar li:hover {
  background-color: #ffffff22;
  color: #fff;
}

/* LOADER CORTINĂ CU ADN */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#loader-left, #loader-right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background-image: url('assets/poze/fundal_rosu.png');
  background-repeat: no-repeat;
  background-size: 200% 100%;
  z-index: 2;
  transition: all 1s ease;
}

#loader-left {
  left: 0;
  background-position: left center;
}

#loader-right {
  right: 0;
  background-position: right center;
}

#loader-center {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
}

.site-title {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px #000;
}

#rotating-adn {
  width: 100px;
  height: 100px;
  animation: rotateADN 3s linear infinite;
  filter: drop-shadow(0 0 10px #ff4040);
}

@keyframes rotateADN {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-close #loader-left {
  transform: translateX(-100%);
}
.loader-close #loader-right {
  transform: translateX(100%);
}
.loader-close #loader-center {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Icona User în colțul din dreapta sus */
#user-icon {
  position: fixed;
  top: 10px;
  right: 20px;
  font-size: 5rem;
  color: #ffffff;
  cursor: pointer;
  z-index: 10000;
}

#user-toggle {
  position: fixed;
  top: 10px;
  right: 20px;
  font-size: 1.8rem;
  color: #eb3030; /* Culoare roșie pentru butonul care deschide meniul */
  cursor: pointer;
  z-index: 10001;
}

#user-toggle i {
  color: white; /* Setează culoarea iconiței de afisaj pe alb */
}

#user-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: rgb(198, 27, 27); /* Fundal roșu pentru meniu */
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  min-width: 140px;
  display: none;
  z-index: 10002;
}

#user-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#user-menu li {
  padding: 10px 14px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#user-menu li:hover {
  background-color: #f2f2f2;
}

#user-menu li i {
  font-size: 1.1rem;
  color: #eb3030; /* Iconițele din meniu vor fi roșii */
}

/* Show menu when active */
#user-menu.show {
  display: block;
}

/* Dark mode adaptation */
body.dark #user-menu {
  background: #3b0a0a;
  color: white;
}

body.dark #user-menu li:hover {
  background-color: #5a1f1f;
}

/* Meniu User cu efect de tranziție */
#user-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: white; /* Fundal alb pentru meniul de utilizator */
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  min-width: 140px;
  display: block;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10002;
}

#user-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Meniu User cu fundal alb pentru tema deschisă */
#user-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  min-width: 140px;
  display: block;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10002;
}

#user-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Logo Styles */
 .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    left: -6px;
    position: relative;
    
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    
}
.logo-img:hover {
    transform: scale(1.2);
}


.logo-preview {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    z-index: 100;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-color: white;
    padding: 5px;
    border-radius: 8px;
}
.logo-preview img {
    width: 200px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}
.logo:hover .logo-preview {
    display: block;
}


.top-menu {
  width: 100%;
  background-color: #c0392b; /* Roșu plăcut */
  padding: 7px 20px; /* Creștem puțin padding-ul pentru a face bara mai mare */
  color: white;
  font-size: 20px; /* Mărim puțin fontul */
  font-weight: bold;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px; /* Înalțimea barei este mai mare */
}

.top-menu h1 {
  margin: 0;
  font-size: 20px;
  padding-left: 40px; /* Adăugăm puțin spațiu la stânga pentru a muta titlul spre dreapta */
}


.top-menu .icon {
  font-size: 28px; /* Mărimea icon-ului mai mare */
  margin-left: 10px;
}
/* Stiluri pentru bara de meniu în Dark Mode */
body.dark .top-menu {
  background-color: #8e1f1f; /* O nuanță mai închisă de roșu, dar încă plăcută */
}

body.dark .top-menu h1 {
  color: white; /* Asigurăm că textul rămâne alb în dark mode */
}

body.dark .top-menu .icon {
  color: white; /* Facem și iconițele albe în dark mode */
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

button, .button {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.3s;
}

button:hover, .button:hover {
  transform: scale(1.05);
}






/* Aplicația (notițele) */
.app {
  display: flex;
  width: 90%;
  max-width: 1000px;
  height: 90vh;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  position: relative;
  left: 300px;
  margin-top: 60px;
}

/* Sidebar pentru notițe */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #f5b5b5, #e05e5e);
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #d0d0d0;
  overflow-y: auto;
}

#add-note {
  padding: 12px;
  font-weight: bold;
  background: #ffffff;
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#add-note:hover {
  background: #eb5151;
}

#notes-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Note Items */
.note-item {
  padding: 10px 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateX(-10px);
  animation: fadeInLeft 0.3s forwards;
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.note-item:hover {
  background: #f3f4f6;
}

.note-item.active {
  background: #dbeafe;
  border-color: #60a5fa;
}

/* Note Editor */
.note-editor {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #f9fafb;
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-editor input,
.note-editor textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.note-editor input:focus,
.note-editor textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .wrapper {
    flex-direction: column; /* Menținem meniul lateral și aplicația pe coloană pe dispozitive mai mici */
  }

  .meniu-lateral {
    width: 100%; /* Pe mobil, meniul lateral va ocupa întreaga lățime */
    height: auto;
    position: static; /* Meniul nu mai este fixat */
  }

  .app {
    margin-left: 0; /* Eliminăm marginile pentru dispozitive mai mici */
    height: auto;
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #d0d0d0;
  }
}
/* Stiluri pentru butonul de coș de gunoi */
.notes__delete-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  position: absolute;
  top: -3px;
  right: 0;
}

.notes__delete-btn:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

.notes__delete-btn:focus {
  outline: none;
}

/* Notes preview */
.notes__preview {
  flex: 1;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.notes__title,
.notes__body {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.notes__title:focus,
.notes__body:focus {
  border-color: #861abc;
}

/* Add some spacing between note preview and list */
.notes-sidebar + .notes__preview {
  margin-left: 20px;
}

