:root {
  --bg: #07111d;
  --bg-2: #0d1d2d;
  --panel: rgba(12, 22, 34, 0.88);
  --panel-strong: rgba(17, 30, 42, 0.96);
  --card: rgba(19, 31, 46, 0.92);
  --card-hover: rgba(24, 40, 58, 0.96);
  --primary: #edf4ff;
  --primary-soft: #cfe0f6;
  --muted: #8aa6bd;
  --accent: #57d7ff;
  --accent-strong: #1bb7df;
  --accent-soft: rgba(87, 215, 255, 0.18);
  --line: rgba(160, 188, 214, 0.2);
  --shadow: rgba(0, 0, 0, 0.35);
  --glow: rgba(87, 215, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(87, 215, 255, 0.14), transparent 30%),
    radial-gradient(circle at bottom left, rgba(18, 163, 255, 0.1), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.app-shell {
  width: min(100%, 430px);
  position: relative;
  z-index: 1;
}

.video-frame {
  width: 100%;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 70px var(--shadow), 0 0 60px var(--glow);
  padding: 18px 14px 16px;
  position: relative;
  overflow: hidden;
}

.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(87, 215, 255, 0.06), transparent 38%, rgba(87, 215, 255, 0.04));
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 1;
  padding: 4px 6px 2px;
  text-align: center;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(87, 215, 255, 0.28);
  border-radius: 999px;
  background: rgba(87, 215, 255, 0.08);
  padding: 7px 12px;
  margin-bottom: 12px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(87, 215, 255, 0.8);
}

.brand-text {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--primary-soft);
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(87, 215, 255, 0.12), rgba(87, 215, 255, 0.06));
  border: 1px solid rgba(87, 215, 255, 0.3);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 14px 0 8px;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--primary);
}

.subtitle {
  margin: 0 auto 18px;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.word-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.word-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card) 0%, rgba(18, 31, 45, 0.98) 100%);
  border: 1px solid rgba(139, 160, 180, 0.18);
  border-radius: 18px;
  padding: 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.word-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(87, 215, 255, 0.06), transparent);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}

.word-card:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 215, 255, 0.35);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.2);
}

.word-card:hover::before {
  transform: translateX(120%);
}

.word-card.is-playing {
  border-color: rgba(87, 215, 255, 0.7);
  background: linear-gradient(135deg, rgba(87, 215, 255, 0.12), rgba(18, 31, 45, 0.98));
  box-shadow: 0 10px 30px rgba(87, 215, 255, 0.16), inset 0 0 0 1px rgba(87, 215, 255, 0.15);
}

.word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.arabic-word,
.german-word {
  min-width: 0;
  line-height: 1.5;
  font-weight: 700;
}

.arabic-word {
  flex: 1 1 48%;
  font-size: 1.05rem;
  color: var(--primary);
}

.german-word {
  flex: 1 1 42%;
  font-size: 1.18rem;
  text-align: center;
  color: var(--primary-soft);
}

.sound-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(87, 215, 255, 0.25);
  background: linear-gradient(135deg, rgba(87, 215, 255, 0.12), rgba(87, 215, 255, 0.04));
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sound-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 22px rgba(87, 215, 255, 0.18);
}

.sound-btn:active {
  transform: scale(0.98);
}

.word-card.is-playing .sound-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06202e;
  box-shadow: 0 0 0 6px rgba(87, 215, 255, 0.12);
}

@media (max-width: 430px) {
  body {
    padding: 12px 8px 18px;
  }

  .video-frame {
    border-radius: 22px;
    padding: 16px 10px 14px;
  }

  .subtitle {
    font-size: 0.83rem;
  }

  .word-card {
    padding: 12px 10px;
  }

  .word-row {
    gap: 6px;
  }

  .arabic-word {
    font-size: 0.96rem;
  }

  .german-word {
    font-size: 1.02rem;
  }

  .sound-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}
