.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.auth-modal[hidden] {
  display: none !important;
}
body.auth-modal-open {
  overflow: hidden;
}
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 18, 0.78);
  backdrop-filter: blur(8px);
}
.auth-modal__panel {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, #1a1238 0%, #120c28 55%, #0e0a1c 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.auth-modal--register .auth-modal__panel {
  width: min(520px, 100%);
  max-height: none;
}
.auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
  flex: 0 0 auto;
}
.auth-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.auth-modal__close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.auth-modal__close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.auth-modal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 16px 0;
  padding: 3px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}
.auth-modal__tab {
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-modal__tab.active {
  color: #fff;
  background: linear-gradient(135deg, #8b52ff, #6d3fd4);
  box-shadow: 0 6px 16px rgba(109, 63, 212, 0.3);
}
.auth-modal__body {
  padding: 10px 16px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 0 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.auth-modal--register .auth-modal__body {
  overflow-y: visible;
}
.auth-modal__form {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.auth-modal__form.active {
  display: flex;
}
.auth-reg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 8px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.auth-field--compact label {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-field--compact input,
.auth-field--compact select {
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 8px;
}
.auth-field label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}
.auth-field input,
.auth-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-field input[type="date"] {
  padding-right: 6px;
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: rgba(139, 82, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(139, 82, 255, 0.18);
}
.auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.32);
  font-size: 12px;
}
.auth-field--hint label span {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}
.auth-submit {
  margin-top: 2px;
  min-height: 40px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #9d5cff, #7b45e8);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(123, 69, 232, 0.32);
  transition: transform 0.1s, opacity 0.15s;
  flex: 0 0 auto;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
}
.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.auth-error {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ffb3bc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  flex: 0 0 auto;
  margin-bottom: 2px;
}
.auth-error[hidden] {
  display: none !important;
}
.auth-switch {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  padding-top: 2px;
}
.auth-switch button {
  border: none;
  background: none;
  color: #b794ff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
}
.auth-switch button:hover {
  text-decoration: underline;
}

/* Deneme bonusu */
.auth-deneme {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(139, 82, 255, 0.28);
  background: rgba(109, 63, 212, 0.1);
  transition: border-color 0.15s, background 0.15s;
}
.auth-deneme.is-accepted {
  border-color: rgba(139, 82, 255, 0.5);
  background: rgba(109, 63, 212, 0.16);
}
.auth-deneme__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-deneme__check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}
.auth-deneme__check.is-on {
  border-color: #9d5cff;
  background: linear-gradient(135deg, #9d5cff, #7b45e8);
}
.auth-deneme__check.is-on::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-deneme__open {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-deneme__label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-deneme__hint {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: #b794ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-deneme__info {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #c9b0ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.auth-deneme__info:hover,
.auth-deneme__info:focus {
  border-color: rgba(139, 82, 255, 0.65);
  background: rgba(139, 82, 255, 0.2);
  outline: none;
}

/* Deneme bonusu bilgi penceresi */
.auth-deneme-info {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-deneme-info[hidden] {
  display: none !important;
}
.auth-deneme-info__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 12, 0.72);
  backdrop-filter: blur(4px);
}
.auth-deneme-info__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(82vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, #221840 0%, #16102c 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.auth-deneme-info__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.auth-deneme-info__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  padding-right: 8px;
}
.auth-deneme-info__close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.auth-deneme-info__close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.auth-deneme-info__body {
  padding: 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 82, 255, 0.55) rgba(255, 255, 255, 0.06);
}
.auth-deneme-info__body::-webkit-scrollbar {
  width: 7px;
}
.auth-deneme-info__body::-webkit-scrollbar-track {
  margin: 4px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
.auth-deneme-info__body::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(157, 92, 255, 0.75), rgba(109, 63, 212, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-deneme-info__body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(183, 148, 255, 0.9), rgba(139, 82, 255, 0.85));
}
.auth-deneme-info__lead {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.auth-deneme-info__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.auth-deneme-info__stats div {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.auth-deneme-info__stats span {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 2px;
}
.auth-deneme-info__stats strong {
  font-size: 13px;
  color: #d4b8ff;
}
.auth-deneme-info__detail {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}
.auth-deneme-info__detail p {
  margin: 0 0 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}
.auth-deneme-info__note {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}
.auth-deneme-info__foot {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.auth-deneme-info__accept {
  width: 100%;
  min-height: 42px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #9d5cff, #7b45e8);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(123, 69, 232, 0.35);
}
.auth-deneme-info__accept:hover {
  filter: brightness(1.05);
}

@media (min-width: 521px) {
  .auth-modal--register .auth-reg-grid {
    column-gap: 14px;
    row-gap: 9px;
  }
}

@media (max-width: 520px) {
  .auth-modal {
    padding: 0;
    align-items: flex-end;
  }
  .auth-modal__panel,
  .auth-modal--register .auth-modal__panel {
    width: 100%;
    max-height: 94vh;
    border-radius: 14px 14px 0 0;
  }
  .auth-modal--register .auth-modal__body {
    overflow-y: auto;
  }
  .auth-reg-grid {
    grid-template-columns: 1fr;
  }
  .auth-deneme__label {
    white-space: normal;
  }
  .auth-deneme__open {
    flex-wrap: wrap;
  }
}
