html {
  /* easy calculation for REM /
  / font-size: 10px; /
  / 10PX/16PX=0.625=62.5% /
  / Percentage of user's browser font-size /
  
  / WORKS IF ITS NOTHING ABSOLUTE POSITIONING TO THE BODY */
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 62.5%;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Fredoka", sans-serif;
  line-height: 1;
  font-weight: 600;
  color: #555;
  overflow-x: hidden;
  background-color: #7678ed;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* important pentru footer jos */
}

/* AUTH SECTION */
.auth-section {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* USER PROFILE DROPDOWN */
.user-profile {
  position: relative;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 1rem 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1000;
  margin-top: 0.8rem;
  border: 1px solid #e9ecef;
}

.user-profile:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
  font-size: 1.4rem;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #7678ed;
}

.dropdown-item.logout:hover {
  background-color: #ffe6e6;
  color: #dc3545;
}

.dropdown-item .material-symbols-rounded {
  font-size: 2rem;
  opacity: 0.7;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 0.5rem 0;
}

/* ============================
   CONȚINUT MY ACCOUNT
============================ */
#loading {
  text-align: center;
  font-size: 1.8rem;
  padding: 50px 0;
}

#accountContent {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 3rem;
}

#accountContent-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

#accountContent h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 2.4rem;
  color: #222;
}

.account-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group {
  width: 100%;
  margin-bottom: 2.4rem;
  display: flex;
  flex-direction: column;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1.6rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #7678ed;
}

/* BUTOANE FORM */
#formActions {
  display: none;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 2rem;
  width: 100%;
  max-width: 60rem;
}

#formActions button {
  flex: 1; /* ambele butoane au aceeași lățime */
  padding: 1.8rem; /* butoane mai mari */
  font-size: 1.6rem;
  font-weight: 600;
  min-width: 15rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.button-group {
  display: flex;
  flex-direction: row;
  gap: 2rem; /* spațiu între butoane */
  justify-content: space-between;
  margin-top: 2rem;
}

.button-group button {
  flex: 1; /* ocupă toată lățimea egală */
  min-width: 15rem; /* ca textul să încapă pe un rând */
  padding: 1.5rem 2rem; /* mai mult spațiu intern */
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap; /* împiedică spargerea textului */
  overflow: hidden;
  text-overflow: ellipsis; /* dacă textul e prea lung */
}

.editBtn {
  width: 50%;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ff69b4, #ff69b4);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px #ff69b4;
  max-height: 4rem;
}

.editBtn:hover {
  transform: translateY(-2px);
  background-color: #ff69b4;
}

.changePasswordBtn {
  width: 50%;
  padding: 1.5rem;
  background: linear-gradient(135deg, #7678ed, #7678ed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px #7678ed;
  max-height: 4rem;
}

.changePasswordBtn:hover {
  background-color: #7678ed;
  transform: translateY(-2px);
}

.saveBtn {
  width: 50%;
  padding: 1.5rem;
  color: black;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 4rem;
}

.saveBtn:hover {
  background-color: #cbc6ca;
  transform: translateY(-2px);
}

.cancelBtn {
  width: 50%;
  padding: 1.5rem;
  color: black;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 4rem;
}

.cancelBtn:hover {
  background-color: #cbc6ca;
  transform: translateY(-2px);
}

/* ============================
   MODAL SCHIMBARE PAROLA
============================ */
#passwordModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

#passwordModal .modal-content {
  background-color: #fff;
  padding: 3rem 2rem;
  border-radius: 20px;
  max-width: 350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#passwordModal h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #333;
}

#passwordModal input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1.6rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

#passwordModal input:focus {
  outline: none;
  border-color: #7678ed;
  background-color: #fff;
}

.form-group-modal {
  width: 100%;
  margin-bottom: 2.4rem;
  display: flex;
  flex-direction: column;
}

.modal-title {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.8rem;
  font-size: 2rem;
  width: 100%;
}

.form-label-modal {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  width: 100%;
}
/* butoane */

.modal-actions {
  display: flex;
  flex-direction: row;
  gap: 2rem; /* spațiu între butoane */
  justify-content: space-between;
  margin-top: 2rem;
}

.modal-actions button {
  flex: 1; /* ocupă toată lățimea egală */
  min-width: 15rem; /* ca textul să încapă pe un rând */
  padding: 1.5rem 2rem; /* mai mult spațiu intern */
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap; /* împiedică spargerea textului */
  overflow: hidden;
  text-overflow: ellipsis; /* dacă textul e prea lung */
}

.btn-btn-primary {
  width: 50%;
  padding: 1.5rem;
  color: black;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 4rem;
}

.btn-btn-primary:hover {
  background-color: #cbc6ca;
  transform: translateY(-2px);
}

.btn-btn-secondary {
  width: 50%;
  padding: 1.5rem;
  color: black;
  border: none;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 4rem;
}

.btn-btn-secondary:hover {
  background-color: #cbc6ca;
  transform: translateY(-2px);
}

/* Buton închidere modal */
#closeModal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #666;
  transition: color 0.3s;
}

#closeModal:hover {
  color: #dc3545;
}

html,
body {
  height: 100%;
  background-color: #7678ed !important; /* forțează albastru */
}

/* Responsive */
@media (max-width: 480px) {
  #passwordModal .modal-content {
    padding: 2rem 1rem;
  }

  #passwordModal input,
  #passwordModal button {
    font-size: 1.4rem;
    padding: 1rem;
  }
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 768px) {
  .header {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 1.6rem;
  }

  .logo {
    height: 8rem;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 1.4rem;
  }

  #accountContent {
    margin: 180px 20px 50px;
    padding: 20px;
  }
}

#myAccountMessageProfile {
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  display: none; /* ascuns implicit */
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

#myAccountMessageProfile.loading {
  display: block;
  background-color: #ffcc00;
  color: #333;
}

#myAccountMessageProfile.success {
  display: block;
  background-color: #4caf50;
  color: white;
}

#myAccountMessageProfile.error {
  display: block;
  background-color: #ff4d4d;
  color: white;
}

#myAccountMessagePassword {
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  display: none; /* ascuns implicit */
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

#myAccountMessagePassword.loading {
  display: block;
  background-color: #ffcc00;
  color: #333;
}

#myAccountMessagePassword.success {
  display: block;
  background-color: #4caf50;
  color: white;
}

#myAccountMessagePassword.error {
  display: block;
  background-color: #ff4d4d;
  color: white;
}
