:root {
  --page: #03050c;
  --panel: rgba(9, 18, 36, 0.86);
  --panel-strong: rgba(12, 26, 51, 0.96);
  --line: rgba(165, 205, 255, 0.22);
  --text: #f5f8ff;
  --muted: #bac6d9;
  --cyan: #78e3ff;
  --blue: #62a9ff;
  --gold: #f4c35d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, #02030a 0%, #071226 48%, #03050c 100%);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    linear-gradient(90deg, rgba(5, 10, 24, 0.98) 0%, rgba(11, 25, 49, 0.98) 48%, rgba(31, 72, 116, 0.96) 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(100%, var(--max));
  min-height: 78px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  width: 224px;
}

.brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.24));
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex: 1 1 auto;
  color: #f6f9ff;
  font-size: 15px;
  font-weight: 700;
}

.nav-links a {
  opacity: 0.88;
  transition: color 160ms ease, opacity 160ms ease;
}

.nav-links a:hover {
  color: var(--cyan);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.language-form {
  margin: 0;
  flex: 0 0 auto;
}

.language-select {
  min-height: 44px;
  width: 148px;
  padding: 0 30px 0 13px;
  border-radius: 6px;
  border: 1px solid rgba(157, 203, 255, 0.48);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(29, 61, 103, 0.92), rgba(10, 26, 55, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.language-select:focus {
  outline: 2px solid rgba(120, 227, 255, 0.45);
  outline-offset: 2px;
}

.language-select option {
  color: #071226;
  background: #fff;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button {
  min-height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 6px;
  border: 1px solid rgba(157, 203, 255, 0.52);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(140, 225, 255, 0.9);
}

.button-primary {
  background:
    linear-gradient(180deg, rgba(79, 134, 199, 0.96), rgba(17, 44, 86, 0.98));
}

.button-ghost {
  background: rgba(22, 42, 77, 0.54);
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu__toggle {
  width: 50px;
  height: 50px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(157, 203, 255, 0.46);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.account-menu__toggle:hover,
.account-menu.open .account-menu__toggle {
  transform: translateY(-1px);
  border-color: rgba(140, 225, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
}

.account-menu__toggle:focus-visible {
  outline: 2px solid rgba(120, 227, 255, 0.45);
  outline-offset: 2px;
}

.account-menu__avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #61526e;
  background: linear-gradient(180deg, #f8f0eb 0%, #d7cedf 100%);
}

.account-menu__avatar::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #52d266;
  box-shadow: 0 2px 6px rgba(11, 17, 35, 0.3);
}

.account-menu__avatar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu__avatar-lg {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.account-menu__avatar-lg svg {
  width: 28px;
  height: 28px;
}

.account-menu__dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 258px;
  padding: 12px 0;
  border-radius: 12px;
  border: 1px solid rgba(118, 156, 231, 0.22);
  background: linear-gradient(180deg, rgba(14, 31, 73, 0.98) 0%, rgba(8, 20, 49, 0.98) 100%);
  color: #e8f0ff;
  box-shadow: 0 24px 56px rgba(5, 13, 31, 0.46);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.account-menu.open .account-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.account-menu__summary {
  padding: 0 18px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(162, 190, 255, 0.14);
}

.account-menu__identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-menu__identity strong,
.account-menu__identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__identity strong {
  font-size: 22px;
  line-height: 1.1;
  color: #f6f9ff;
}

.account-menu__identity span {
  color: #aab9d8;
  font-size: 14px;
  font-weight: 600;
}

.account-menu__list {
  padding-top: 8px;
}

.account-menu__item {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbe6fb;
  font-size: 16px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.account-menu__item:hover {
  background: rgba(111, 164, 255, 0.14);
  color: #ffffff;
}

.account-menu__item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu__item-danger:hover {
  background: rgba(224, 79, 95, 0.14);
  color: #ffd7dc;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 31, 61, 0.72);
  color: var(--text);
}

.menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: clamp(560px, 76svh, 760px);
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.66) 0%, rgba(3, 5, 12, 0.32) 42%, rgba(3, 5, 12, 0) 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(2, 3, 10, 0) 60%, rgba(3, 5, 12, 0.28) 100%),
    url("../img/hero-valtrixa-bright.webp") center bottom / cover no-repeat,
    #03050c;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: transparent;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(3, 5, 12, 0.08) 66%, rgba(3, 5, 12, 0.42) 100%);
}

.hero-copy {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 128px) 24px 190px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(32px, 3.65vw, 50px);
  line-height: 1.14;
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.58);
}

.lead {
  max-width: 520px;
  margin: 28px 0 30px;
  color: #f0f5ff;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.5;
}

.hero-cta {
  min-width: 212px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  position: relative;
  overflow: hidden;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(118, 202, 255, 0.34) 0%, rgba(38, 111, 174, 0.18) 12%, transparent 34%),
    radial-gradient(ellipse at 100% 18%, rgba(215, 169, 86, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(11, 17, 35, 0.98) 0%, rgba(12, 24, 48, 0.96) 46%, rgba(4, 13, 29, 0.98) 100%);
  border: 0;
  box-shadow: none;
}

.features::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow:
    inset 22px 0 34px rgba(3, 5, 12, 0.34),
    inset -28px 0 42px rgba(3, 5, 12, 0.44),
    inset 0 16px 24px rgba(3, 5, 12, 0.18),
    inset 0 -16px 24px rgba(3, 5, 12, 0.22);
}

.features::after {
  content: none;
}

.feature {
  min-height: 142px;
  padding: 30px 32px 34px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
}

.feature:first-child {
  border-radius: 0;
}

.feature:last-child {
  border-radius: 0;
}

.feature + .feature {
  border: 0;
}

.feature-icon {
  width: 44px;
  height: 44px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon.cyan {
  color: var(--cyan);
}

.feature-icon.gold {
  color: var(--gold);
}

.feature-icon.blue {
  color: #9dccff;
}

.feature h2 {
  margin: 0 0 11px;
  font-size: 21px;
  line-height: 1.18;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.42);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.auction {
  margin-top: 0;
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 118px 24px 76px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 5, 12, 0.18), rgba(3, 5, 12, 0.34)),
    url("../img/auction-bg-clean-light.webp") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.auction::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 5, 12, 0.48), rgba(3, 5, 12, 0.04), rgba(3, 5, 12, 0.48));
}

.auction-content {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  text-align: center;
}

.auction h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.62);
}

.auction p {
  margin: 0 0 28px;
  color: #edf4ff;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
}

@media (min-width: 1600px) {
  .auction {
    min-height: 0;
    aspect-ratio: 2172 / 724;
    padding: clamp(60px, 4.4vw, 88px) 24px clamp(46px, 3vw, 62px);
  }
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(5, 10, 24, 0.98) 0%, rgba(11, 25, 49, 0.98) 48%, rgba(31, 72, 116, 0.96) 100%);
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 -10px 28px rgba(0, 0, 0, 0.18);
}

.site-footer__inner {
  width: min(100%, var(--max));
  min-height: 86px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer p {
  margin: 0;
  font-weight: 700;
}

.site-footer p:first-child {
  color: #f5f8ff;
}

@media (max-width: 980px) {
  .nav {
    gap: 18px;
  }

  .brand {
    width: 194px;
  }

  .nav-links {
    gap: 18px;
    font-size: 14px;
  }

  .nav-actions {
    gap: 10px;
  }

  .button {
    padding: 0 16px;
  }

  .hero {
    min-height: 680px;
    background-position: 62% bottom;
  }

  .hero-copy {
    padding-bottom: 250px;
  }

  .features {
    grid-template-columns: 1fr;
    margin-top: 0;
    padding: 0 24px;
  }

  .feature,
  .feature:first-child,
  .feature:last-child {
    border-radius: 0;
  }

  .feature + .feature {
    margin-top: 0;
    border-top: 0;
    border-left: 0;
  }
}

@media (max-width: 740px) {
  .site-header {
    position: relative;
  }

  .nav {
    min-height: auto;
    padding: 16px;
    flex-wrap: wrap;
  }

  .brand {
    width: 176px;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
  }

  .nav-links {
    order: 3;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 4px 0 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(13, 27, 52, 0.62);
    width: 100%;
  }

  .nav-actions {
    order: 4;
    display: none;
  }

  .nav-actions.active {
    display: grid;
    grid-template-columns: minmax(132px, 0.9fr) 1fr 1fr;
    gap: 10px;
  }

  .language-form {
    width: 100%;
  }

  .language-select {
    width: 100%;
  }

  .hero {
    min-height: 660px;
    background-position: 68% bottom;
  }

  .hero-copy {
    padding: 52px 18px 270px;
  }

  .hero h1 {
    max-width: 620px;
    font-size: clamp(32px, 10vw, 46px);
  }

  .lead {
    margin-top: 22px;
  }

  .features {
    padding: 0 16px;
  }

  .feature {
    min-height: 132px;
    padding: 22px 18px;
  }

  .auction {
    padding: 96px 18px 64px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 18px;
  }
}

@media (max-width: 460px) {
  .nav-actions {
    grid-template-columns: minmax(132px, 0.9fr) 1fr 1.35fr;
  }

  .language-select {
    width: 100%;
  }

  .nav-actions .button {
    padding: 0 12px;
  }

  .button {
    width: 100%;
  }

  .hero-copy {
    padding-bottom: 240px;
  }

  .feature {
    grid-template-columns: 1fr;
  }
}

/* --- RTL (Right-to-Left) Styles --- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .language-select {
  padding: 0 13px 0 30px;
}

[dir="rtl"] .button svg {
  transform: scaleX(-1);
}

[dir="rtl"] .hero {
  background:
    linear-gradient(270deg, rgba(3, 5, 12, 0.66) 0%, rgba(3, 5, 12, 0.32) 42%, rgba(3, 5, 12, 0) 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(2, 3, 10, 0) 60%, rgba(3, 5, 12, 0.28) 100%),
    url("../img/hero-valtrixa-bright.webp") center bottom / cover no-repeat,
    #03050c;
}

@media (max-width: 980px) {
  [dir="rtl"] .hero {
    background-position: 38% bottom;
  }
}

@media (max-width: 740px) {
  [dir="rtl"] .menu-button {
    margin-right: auto;
    margin-left: 0;
  }
  [dir="rtl"] .hero {
    background-position: 32% bottom;
  }
}

/* --- Modal Styling --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
  padding: 16px;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(9, 18, 36, 0.94);
  border: 1px solid rgba(157, 203, 255, 0.16);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 0 40px rgba(120, 227, 255, 0.05);
  overflow: hidden;
  transform: scale(0.94) translateY(10px);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms, color 160ms, transform 160ms;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: rotate(90deg);
}

.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(165, 205, 255, 0.12);
  background: rgba(5, 10, 22, 0.4);
}

.tab-btn {
  flex: 1;
  min-height: 52px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms, border-color 160ms;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgba(120, 227, 255, 0.03);
}

.modal-body {
  padding: 30px;
}

.modal-pane {
  display: none;
}

.modal-pane.active {
  display: block;
}

.modal-pane h2 {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.form-group input {
  min-height: 46px;
  padding: 0 14px;
  background: rgba(5, 10, 22, 0.6);
  border: 1px solid rgba(157, 203, 255, 0.22);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms, box-shadow 160ms;
}

.form-group input::placeholder {
  color: rgba(186, 198, 217, 0.45);
}

.form-group input:focus {
  outline: 0;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(120, 227, 255, 0.18);
}

.btn-full {
  width: 100%;
  margin-top: 6px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: rgba(186, 198, 217, 0.34);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(165, 205, 255, 0.12);
}

.divider:not(:empty)::before {
  margin-right: 12px;
}

.divider:not(:empty)::after {
  margin-left: 12px;
}

.social-logins {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(165, 205, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms, border-color 160ms, transform 120ms;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(165, 205, 255, 0.3);
}

.social-btn:active {
  transform: translateY(1px);
}

.form-footer {
  margin: 24px 0 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.form-footer a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 160ms;
}

.form-footer a:hover {
  opacity: 0.85;
}

.form-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(78, 166, 252, 0.08);
  border: 1px solid rgba(78, 166, 252, 0.2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* RTL Modals overrides */
[dir="rtl"] .modal-close {
  right: auto;
  left: 14px;
}

[dir="rtl"] .divider:not(:empty)::before {
  margin-right: 0;
  margin-left: 12px;
}

[dir="rtl"] .divider:not(:empty)::after {
  margin-left: 0;
  margin-right: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(13, 27, 52, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 4px solid var(--cyan);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  animation: toast-fade-in 0.3s ease forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-error {
  border-left-color: #ff5e5e;
}

.toast.toast-success {
  border-left-color: #4efc8d;
}

.toast.toast-warning {
  border-left-color: #ffb74d;
}

.toast.toast-info {
  border-left-color: var(--cyan);
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms;
}

.toast-close:hover {
  color: #fff;
}

@keyframes toast-fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RTL overrides for toast */
[dir="rtl"] .toast-container {
  right: auto;
  left: 24px;
}
[dir="rtl"] .toast {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 4px solid var(--cyan);
}
[dir="rtl"] .toast.toast-error {
  border-right-color: #ff5e5e;
}
[dir="rtl"] .toast.toast-success {
  border-right-color: #4efc8d;
}
[dir="rtl"] .toast.toast-warning {
  border-right-color: #ffb74d;
}
[dir="rtl"] .toast.toast-info {
  border-right-color: var(--cyan);
}

/* Logout confirmation modal */
.modal-card-sm {
  max-width: 440px;
}

.text-center {
  text-align: center;
}

.modal-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 14px 0 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions .button {
  flex: 1;
  min-height: 44px;
}

.oauth-popup-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #020814 0%, #0d2447 58%, #4d7fb4 100%);
  color: #fff;
}

.oauth-popup-status {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(78, 166, 252, 0.2), transparent 28%),
    linear-gradient(180deg, #031021 0%, #071933 48%, #0a1f3e 100%);
}

.profile-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 132px 0 72px;
}

.profile-hero {
  margin-bottom: 32px;
}

.profile-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(165, 205, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.profile-card {
  padding: 28px;
  border-radius: 12px;
  background: rgba(6, 19, 39, 0.88);
  border: 1px solid rgba(165, 205, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.profile-card__header {
  margin-bottom: 22px;
}

.profile-card__header h2 {
  margin-bottom: 10px;
}

.profile-card__header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-form select,
.profile-form textarea,
.profile-form input[type="text"],
.profile-form input[type="email"] {
  width: 100%;
}

.profile-form textarea {
  min-height: 140px;
  resize: vertical;
}

.field-error {
  margin-top: 8px;
  color: #ff9e9e;
  font-size: 12.5px;
  font-weight: 600;
}

.seller-status-box {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid rgba(165, 205, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.seller-status-box p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.seller-status-pending {
  border-color: rgba(255, 183, 77, 0.35);
}

.seller-status-approved {
  border-color: rgba(78, 252, 141, 0.35);
}

.seller-status-rejected {
  border-color: rgba(255, 94, 94, 0.35);
}

.toast-container-static {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0 0 24px;
}

@media (max-width: 920px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-layout {
    width: min(100% - 20px, 1180px);
    padding-top: 112px;
  }

  .profile-card {
    padding: 22px 18px;
  }
}
