@font-face {
    font-family: "nazanin";
    src: url("./src/Far_Nazanin.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
html[dir="rtl"],
html[dir="rtl"] body,
html[dir="rtl"] * {
  font-family: "nazanin", Arial, sans-serif !important;
  text-align: left;
  font-size: 21px;
}
html[dir="rtl"] .chng-name label{
  height: auto;
  width: 130px;
  text-align: right;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--accent-primary);
  font-family: Arial, sans-serif;
}
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: blur(10px);
  transform: scale(1.05);
}
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 13, 0, 0.6);
  z-index: -1;
}
.auth-step {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  width: 100%;
  padding: 20px;
}
.auth-step-box {
  background: rgba(44, 30, 15, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  border: 1px solid rgba(138, 110, 36, 0.5);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  padding: 30px 28px;
  width: 100%;
  max-width: 440px;
  text-align: center;
}
.auth-step-box h2 {
  margin-bottom: 8px;
  color: var(--accent-primary);
}
.auth-step-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 15px;
}
.modal-auth-btn {
  width: 100%;
  height: 50px;
  border-radius: 30px;
  border: none;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-auth-btn:hover {
  background: #e6ae2e;
}


.input-box {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}
.input-box input {
  width: 100%;
  height: 50px;
  padding: 0 50px 0 15px;
  background: rgba(19, 13, 0, 0.7);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--accent-primary);
  font-size: 18px;
  outline: none;
  transition: 0.3s;
}
.input-box input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 8px var(--text-primary);
}
.input-box label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  padding: 0 8px;
  transition: 0.3s;
}
.input-box input:focus + label,
.input-box input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: var(--text-primary);
  background-color: rgba(44, 30, 15, 0.7);
  backdrop-filter: blur(14px);
  border-radius: 20px;
}
.input-box .eye {
  color: var(--text-muted);
  width: 25px;
  height: 25px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: 0.3s;
  display: none;
}
.input-box .eye:not(.hidden) {
  display: block;
}
.input-box .eye:hover {
  color: var(--text-primary);
}


.manage-cc {
  background: rgba(44, 30, 15, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  border: 1px solid rgba(138, 110, 36, 0.5);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  padding: 24px 28px;
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
}
.account-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.account-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.imgbord {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(-55deg, var(--bg-secondary) 40%, #1f2937 64%, var(--bg-primary) 80%);
  height: 80px;
  width: 80px;
  border-radius: 50%;
  border: solid rgba(138, 110, 36, 0.4) 2px;
  box-shadow: 0 0 10px rgba(255, 193, 68, 0.4);
  transition: all 0.3s ease;
  position: relative;
  cursor: default;
}
.imgbord.editable {
  cursor: pointer;
}
.imgbord.editable::before {
  content: "";
  position: absolute;
  height: 70px;
  width: 70px;
  border-radius: 50%;
  background-color: rgba(44, 30, 15, 0.6);
  backdrop-filter: blur(5px);
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
}
.imgbord.editable:hover::before {
  opacity: 1;
}
.imgbord.editable:hover svg {
  opacity: 1;
}
.imgbord img {
  object-fit: cover;
  height: 70px;
  width: 70px;
  border-radius: 50%;
}
.imgbord svg {
  position: absolute;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  color: var(--accent-primary);
  pointer-events: none;
}
.imgbord.editable svg {
  pointer-events: auto;
}
.remove-picture-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s;
}
.remove-picture-btn:hover:not(:disabled) {
  color: #ff6b5b;
  border-color: #AB3012;
  background: rgba(171, 48, 18, 0.12);
}
.name-section {
  flex:1;
  text-align: left;
}
.name-section h1 {
  font-size: 28px;
  margin:0;
  color: var(--accent-primary);
}
.account-id {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.7;
}
.account-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 16px;
  padding: 14px 18px;
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 14px;
  min-width: 80px;
}
.detail-value {
  color: var(--accent-primary);
  font-size: 15px;
  font-weight: 500;
  flex:1;
  text-align: left;
  margin-left: 10px;
}
.toggle-visibility-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.toggle-visibility-btn:hover {
  color: var(--text-primary);
}


.chng-name {
  display: flex;
  position: relative;
  width: 100%;
  height: 55px;
  margin-bottom: 12px;
}
.chng-name input {
  width: 100%;
  height: 55px;
  padding: 0 50px 0 15px;
  background: rgba(19, 13, 0, 0.7);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--accent-primary);
  font-size: 18px;
  outline: none;
  transition: 0.3s;
}
.chng-name input:hover {
  border-color: var(--text-muted);
}
.chng-name input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 8px var(--text-primary);
}
.chng-name label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  padding: 0 8px;
  transition: 0.3s;
}
.chng-name input:focus + label,
.chng-name input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: var(--text-primary);
  background-color: rgba(44, 30, 15, 0.7);
  backdrop-filter: blur(14px);
  border-radius: 20px;
}
.chng-name .eye {
  color: var(--text-muted);
  width: 25px;
  height: 25px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: 0.3s;
  display: none;
}
.chng-name .eye:not(.hidden) {
  display: block;
}
.chng-name .eye:hover {
  color: var(--text-primary);
}
.hidden {
  display: none !important;
}
.error-text {
  position: absolute;
  left: 15px;
  bottom: -25px;
  font-size: 13px;
  color: #ab3012;
  opacity: 0;
  transform: translateY(-5px);
  transition: 0.3s;
  pointer-events: none;
}
.error-text.show {
  opacity: 1;
  transform: translateY(0);
}
.chng-name.error-input input {
  border-color: #ab3012;
  box-shadow: 0 0 8px rgba(171, 48, 18, 0.5);
}
.chng-name.error-input label {
  color: #ab3012 !important;
}
.status-line {
  position: static;
  display: block;
  opacity: 1;
  transform: none;
  margin-top: 5px;
  font-size: 14px;
  text-align: center;
}
.purchases-section {
  margin-top: 6px;
  text-align: center;
}
#purchasesContainer {
  margin-top: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 16px;
  padding: 16px;
  max-height: 260px;
  overflow-y: auto;
}
#purchasesContainer h3 {
  margin-bottom: 12px;
  color: var(--accent-primary);
  font-size: 18px;
}
#purchasesList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.purchase-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  border-left: 3px solid var(--text-primary);
}
.purchase-item .purchase-product {
  font-weight: bold;
}
.purchase-item .purchase-date {
  color: var(--text-muted);
  font-size: 12px;
}
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.primary-action-btn, .secondary-action-btn, .danger-action-btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: 0.2s;
}
.primary-action-btn {
  background: var(--text-primary);
  color: var(--bg-primary);
}
.primary-action-btn:hover {
  background: #e6ae2e;
}
.secondary-action-btn {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}
.secondary-action-btn:hover {
  background: #1f2937;
}
.danger-action-btn {
  background: transparent;
  color: #ab3012;
  border: 2px solid #ab3012;
}
.danger-action-btn:hover {
  background: rgba(171, 48, 18, 0.15);
}
.edit-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 13, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal-overlay.hidden {
  display: none;
}
.modal-box {
  background: rgba(44, 30, 15, 0.95);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 30px 25px;
  width: 360px;
  max-width: 92%;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}
.modal-box h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--accent-primary);
}
.modal-box p {
  color: var(--text-muted);
  font-size: 14px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.modal-btn-primary,
.modal-btn-secondary {
  flex: 1;
  height: 45px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
.modal-btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}
.modal-btn-secondary {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}
.modal-btn-primary.danger {
  background: #ab3012;
  color: var(--accent-primary);
}
.back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px 9px 13px;
    background: #211b12;
    color: #b89a58;
    border: 1px solid #8f743b;
    border-radius: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.back-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}
.back:hover {
    background: #2b2418;
    color: #d0b36b;
    border-color: #b89a58;
}
.back:active {
    background: #18130d;
}
.back:focus-visible {
    outline: 1px solid #b89a58;
    outline-offset: 3px;
}
.back1 {
  position: fixed;
  left: 10px;
  top: 10px;
  z-index: 100;
}
#skeleton-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;
}
#skeleton-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.skeleton-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 90%;
  max-width: 400px;
  padding: 30px;
  background: rgba(44,30,15,0.5);
  border-radius: 28px;
  backdrop-filter: blur(4px);
}
.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.skeleton-name {
  width: 160px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.skeleton-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.skeleton-input {
  width: 100%;
  height: 50px;
  background: #1f2937;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.skeleton-avatar::after,
.skeleton-name::after,
.skeleton-input::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 193, 68, 0.12), transparent);
  animation: shimmer 0.9s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
#errorState {
  color: #ab3012;
  margin-top: 100px;
}
#errorState a {
  color: var(--text-primary);
}


.otp-input {
  height: 55px;
  padding: 0 10px;
  background: rgba(19, 13, 0, 0.7);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--accent-primary);
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  outline: none;
}
.otp-input:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 8px var(--text-primary);
}

@media (max-width: 600px) {
  .manage-cc { padding: 16px; }
  .account-header { flex-direction: column; align-items: center; text-align: center; }
  .name-section { text-align: center; }
  .detail-row { flex-wrap: wrap; }
  .detail-value { margin-left: 0; text-align: center; }
  .action-bar { flex-direction: column; align-items: stretch; }
  .edit-actions { flex-direction: column; }
  .auth-step-box { padding: 20px 16px; }
  .back1 { left: 5px; top: 5px; }
  .back { padding: 6px 12px; font-size: 14px; }
  .input-box input { height: 45px; font-size: 16px; }
  .input-box .eye { width: 22px; height: 22px; right: 12px; }
  .chng-name input { height: 50px; }
  .chng-name .eye { width: 22px; height: 22px; right: 12px; }
}