body {
    background-color: #1e2329;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
  }
  
  .profile-container {
  display: flex;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  min-height: 100%;
  flex-direction: column;
}

  strong {
    font-family: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: normal;
  }
  
 
  .profile-box {
    width: 100%;
    max-width: 600px;  /* ✅ กำหนดความกว้างสูงสุด */
    margin: 0 auto;     /* ✅ จัดให้อยู่กลาง */
    border-radius: 12px;
    padding: 24px;
}

  
  .profile-title {
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    margin-top: -15px;
  }
  
  .profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .profile-label {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
  }
  
  .profile-email {
    margin-top: -5px;
    font-size: 12px;
    text-decoration: none;
    word-break: break-all;
  }
  a{
    word-break: break-all;
    text-decoration: none;
    color: white
  }
  
  .profile-email a:hover {
    text-decoration: underline;
  }
  
  .edit-button {
    background: none;
    border: none;
    font-size: 18px;
    color: #ffd900;
    cursor: pointer;
    font-size: 14px;
  }
  
  .balance-section {
    background-color: #ffffff;
    border-radius: 5px;
    padding: 1px;
  }
  
  .balance-label {
    font-size: 13px;
    color: #000000;
    margin-bottom: -5px;
    margin-left: 10px;
  }
  
  .balance-value {
    font-size: 15px;
    font-weight: bold;
    color: #000000;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: 10px;
  }
  
  .balance-currency {
    font-size: 12px;
    font-weight: 500;
  }
  
  .menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
  }
  
  .menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    color: #ffffff;
  }
  
  .icon-container {
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.08);
  }
  
  .icon-container i {
    font-size: 20px;
  }
  .menu-section{
    display: inline-flex;
  }

/* Contact list (public) */
.contact-list {
  margin: 16px auto;
  width: 100%;
  max-width: 600px;
  background: #0f141a;
  border-radius: 10px;
  padding: 12px;
}
.contact-item {
  display: grid;
  grid-template-columns: 1fr 60px; /* line id | QR */
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.contact-item:last-child { border-bottom: none; }
.contact-line-id { font-size: 12px; color: #fff; word-break: break-all; }
.contact-qr {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(255,255,255,0.08);
}

@media screen and (max-width: 480px) {
  .contact-item { grid-template-columns: 1fr 48px; }
  .contact-qr { width: 48px; height: 48px; }
}
  /* Responsive for mobile */
  @media screen and (max-width: 768px) {
  .profile-box {
    padding: 16px;
    max-width: 95%;
  }
}
    .icon-container {
      padding: 12px;
    }
  
    .menu-item span {
      font-size: 12px;
    }
  
  .menu-section {
    display: flex;
    justify-content: center;  /* จัดแนวนอนให้เมนูอยู่กลาง */
    align-items: center;      /* จัดแนวตั้งให้อยู่กลาง (ถ้าต้องการ) */
    padding: 20px;
    overflow-x: auto;         /* ให้ scroll ได้บนมือถือ */
  }
  
  .menu-grid {
    display: flex;
    gap: 20px;                /* ระยะห่างระหว่างปุ่ม */
    flex-wrap: nowrap;        /* ❗ ไม่ให้ลงแถวใหม่ */
    margin-top: -5px;
  }
  

  .menu-top a {
    display: block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #ffffff;
    font-size: 12px;
    text-align: left;
  }
  
  .menu-bottom {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .menu-bottom a {
    text-decoration: none;
    font-size: 12px;
    color: #ffffff;
  }

.menu-bottom {
    height: 20px;
    background-color: #777;
  color: #ffffff;
}
#profileName,
#profileEmail {
  color: white;
  margin-top: -15px;
  font-size: 12px;
}
 
  @media screen and (max-width: 480px) {
    .menu-grid {
      grid-template-columns: repeat(2, 1fr); /* มือถือเป็น 2 คอลัมน์ */
    }
  }
  
  
  /* Responsive */
  @media screen and (max-width: 480px) {
    .profile-title {
      font-size: 12px;
    }
    .edit-button {
      font-size: 12px;
    }
  
    .profile-box {
      padding: 12px;
    }
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    margin-top: -10px;
  }
  
  .menu-top {
    display: flex;
    flex-direction: column;
    gap: 0px;
  }
  
  .menu-top a {
    color: #ffffffcc;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
  }
  
  #editForm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1000;
  }
  
  #editForm input {
    padding: 8px;
    margin-bottom: 10px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
  }
  
  #editForm button {
    padding: 8px 12px;
    margin: 0 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  #editForm button:hover {
    background-color: #f0f0f0;
  }
  
  .toast {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
  }
  
  .toast.show {
    opacity: 1;
  }
  .hidden {
    display: none !important;
  }
  
  .edit-modal {
    background: #363636;
    padding: 20px;
    border-radius: 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    font-size: 12px;
    height: 80px;
    color: white;
  }
  h3 {
    font-size: 12px;
    margin-bottom: 10px;
  }
  button {
    background-color: #ffd900;
    font-size: 12px;
    padding: 5px;
    margin-top: 5px;
    border: none;
    border-radius: 5px;
    color: rgb(0, 0, 0);
    font-weight: bold;
  }


.logout-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #22c55e;
  color: white;
  padding: 15px 25px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logout-toast.show {
  opacity: 1;
}

.hidden {
  display: none;
}

/*/////////////////*/
.progress-block {
  margin-top: 3px;
  margin-left: 10px;
  margin-right: 10px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 8px;
  background-color: #444;
  margin-top: 4px;
  position: relative;
}

.progress-bar.yellow {
  background-color: #444;
}

.progress-bar.green {
  background-color: #444;
}

.progress-fill {
  height: 100%;
  border-radius: 8px;
}

.yellow .progress-fill {
  background-color: #facc15;
}

.green .progress-fill {
  background-color: #22c55e;
}

.progress-amount {
  text-align: right;
  font-size: 12px;
  font-weight: bold;
  color: rgb(0, 0, 0);
  margin-top: 2px;
  margin-right: 10px;
  margin: 5px;
}
label{
  color: rgb(0, 0, 0);
  font-size: 12px;
  margin-top: -5px;
}

/* ✅ ทำให้หน้าจอ scroll ได้ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #1e2329;
  color: #fff;
  height: 100vh;
  overflow-y: auto;
}

/* ✅ ให้ .profile-container ขยายตามเนื้อหา */
.profile-container {
  padding: 20px;
  box-sizing: border-box;
  min-height: 100%;
}
body, html {
  overflow: hidden;
}
body, html {
  overflow-y: auto;
}
html, body {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
}

/* Language Dropdown Styles */
.language-dropdown {
  position: relative;
  cursor: pointer;
  margin-bottom: 20px;
}

.selected-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  transition: background-color 0.3s;
}

.selected-lang:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.selected-lang img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

.selected-lang i {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.3s;
}

.language-dropdown.open .selected-lang i {
  transform: rotate(180deg);
}

.lang-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  margin-top: 4px;
  overflow: hidden;
}

.language-dropdown.open .lang-options {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.lang-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-option img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

.lang-option span {
  flex: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
  .selected-lang {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .lang-option {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* User ID Section */
.user-id-section {
  margin-bottom: 15px;
}

.user-id-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  margin-top: -8px;
}

.user-id-display span {
  font-size: 12px;
  color: #666;
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  height: 12px;
}

.copy-user-id-btn {
  margin-top:0px;
  background: #8f8f8f;
  color: white;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 21px;
}

.copy-user-id-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.copy-user-id-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.copy-user-id-btn i {
  font-size: 10px;
}

/* Toast notification for copy success */
.copy-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
}
