:root {
  --bg-color: #ffffff;
  --text-main: #1f1f1f;
  --text-muted: #5e5e5e;
  --accent-primary: #0b5f88; /* Primary Blue */
  --accent-secondary: #3aa57a; /* Primary Green */
  --card-bg: #ffffff;
  --border-radius-large: 24px;
  --border-radius-pill: 50px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Lato', sans-serif;
}

.translator-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem; /* Top padding accounts for fixed header */
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ─── Hero Section ────────────────────────────── */
.translator-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.brand-badge {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.translator-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

/* Optional: Gradient text effect for the title */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Grid & Cards ────────────────────────────── */
.translator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.translator-card {
  background: var(--card-bg);
  border: 1px solid #f0f0f0;
  border-radius: var(--border-radius-large);
  padding: 3rem 2.5rem;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03); /* Soft, luxurious shadow */
}

.translator-card:hover {
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transform: translateY(-5px);
  border-color: transparent;
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 2;
}

.card-header {
  margin-bottom: 1.5rem;
}

.translator-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.translator-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.card-action {
  margin-top: auto;
}

/* ─── Icons & Themes ────────────────────────────── */

.icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

/* Subtle animation on hover */
.translator-card:hover .icon-circle {
  transform: scale(1.1);
}

/* HOST THEME (Blue) */
.host-card-theme .icon-circle {
  background-color: #f0f7fa; /* Very pale blue */
  color: var(--accent-primary);
}

/* LISTENER THEME (Green) */
.listener-card-theme .icon-circle {
  background-color: #f0f9f4; /* Very pale green */
  color: var(--accent-secondary);
}

/* ─── Buttons & Inputs ────────────────────────── */

/* Standard Button Structure */
.translator-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.1rem 2rem;
  border-radius: var(--border-radius-pill);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
}

/* Host Button Logic */
.translator-btn.host-theme-btn {
  background: var(--text-main); /* Start dark/neutral */
  color: #fff;
}

.translator-btn.host-theme-btn:hover {
  background: var(--accent-primary); /* Reveal Blue on Hover */
  box-shadow: 0 8px 20px rgba(11, 95, 136, 0.2);
  filter: brightness(1.1);
}

/* Pill Input (Join Form) */
.pill-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: var(--border-radius-pill);
  padding: 0.35rem;
  transition: all 0.3s ease;
  box-shadow: none;
}

.pill-input-wrapper:focus-within {
  border-color: var(--accent-secondary); /* Green border when typing */
  box-shadow: 0 0 0 4px rgba(58, 165, 122, 0.1);
}

.pill-input-wrapper input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  outline: none;
  color: var(--text-main);
  font-family: 'Lato', sans-serif;
}

.pill-input-wrapper input::placeholder { color: #9aa0a6; }

/* Join Arrow Button */
.pill-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--text-main); /* Start dark */
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pill-btn.join-theme-btn:hover {
  background-color: var(--accent-secondary); /* Reveal Green on Hover */
  transform: rotate(-45deg); /* Playful indication of 'Go' */
}

.listener-join__status {
  margin-top: 0.75rem;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: #d93025;
  font-weight: 500;
  min-height: 1.2rem;
  line-height: 1.35;
}

.listener-join__helper {
  margin: 0.35rem 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.listener-join__helper a {
  color: var(--primary-blue);
  font-weight: 700;
  text-decoration: none;
}

.listener-join__helper a:hover {
  text-decoration: underline;
}

.listener-join__signin {
  display: inline-flex;
  align-items: center;
  margin: 0.65rem 0 0 1rem;
  color: var(--primary-blue);
  font-weight: 700;
  text-decoration: none;
}

.listener-join__signin[hidden] {
  display: none;
}

.listener-join__signin:hover {
  text-decoration: underline;
}

/* Shake Animation for Error */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.error-shake {
  animation: shake 0.3s ease-in-out;
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .translator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .translator-hero h1 {
    font-size: 2.5rem;
  }
}
