:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: rgba(20, 20, 20, 0.9);
  --surface-strong: rgba(18, 18, 18, 0.95);
  --text: #f7f7f7;
  --muted: #a7a7a7;
  --accent: transparent;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Tajawal", sans-serif;
  background-color: #050505;
  color: var(--text);
}

body {
  background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.04), transparent 20%),
    url("755732665_1040538398377098_4704626897185518505_n.jpg");
  background-size: cover;
  background-position: center;
}

.page-shell {
  min-height: 100vh;
  backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.46);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 32px;
}

.brand img {
  width: 90px;
  max-height: 70px;
  object-fit: contain;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.menu-item,
.button {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}

.menu-item {
  opacity: 0.88;
}

.menu-item.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.button {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

#signupTrigger,
#heroSignup,
.button.primary.full {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

#signupTrigger:hover,
#heroSignup:hover,
.button.primary.full:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
}

.audio-button {
  min-width: 146px;
}

.button.full {
  width: 100%;
}

.hidden {
  display: none !important;
}

.auth-panel.hidden {
  display: none;
}

.auth-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.settings-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 21;
}

.settings-box {
  width: min(420px, 100%);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  padding: 26px;
  position: relative;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
}

.ai-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 22;
}

.ai-box {
  width: min(520px, 100%);
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
}

.ai-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.ai-content {
  display: none;
}

.ai-content.active {
  display: block;
}

.chat-window {
  max-height: 330px;
  overflow-y: auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  margin-bottom: 18px;
}

.message {
  padding: 12px 14px;
  border-radius: 18px;
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 0.96rem;
}

.message.user {
  background: rgba(255, 255, 255, 0.08);
  align-self: flex-end;
  text-align: right;
}

.message.bot {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-box label {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.ai-box input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-preview img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.auth-box {
  width: min(420px, 100%);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  padding: 26px;
  position: relative;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
}

.auth-close {
  position: absolute;
  top: 16px;
  left: 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-tabs .tab {
  flex: 1;
  padding: 12px 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.auth-tabs .tab.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.auth-content {
  display: none;
}

.auth-content.active {
  display: block;
}

.auth-note {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-box label {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.auth-box input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.auth-message {
  min-height: 24px;
  margin-top: 14px;
  color: #f1c40f;
}

.hero {
  color: #fff;
}

.button.outline,
.button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.hero {
  display: grid;
  min-height: calc(100vh - 110px);
  align-items: center;
  padding: 0 30px 46px;
}

.hero-copy {
  max-width: 600px;
  gap: 18px;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0;
  color: #e7e7e7;
  opacity: 0.86;
  font-size: 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 5.5vw, 6rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.05;
  max-width: 680px;
}

.hero-text {
  margin: 0;
  color: var(--muted);
  max-width: 540px;
  font-size: 1rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 0 30px 34px;
}

.card {
  background: rgba(10, 10, 10, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 28px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: var(--text);
}

.card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }

  .menu {
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}
