/* ========================================
   ARC Learning English - Main Styles
   Mobile-first responsive design
   ======================================== */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-secondary: #059669;
  --color-secondary-light: #d1fae5;
  --color-accent: #f59e0b;
  --color-accent-light: #fef3c7;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --color-success: #10b981;
  --color-error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-width: 1200px;
  --header-height: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.header__logo svg {
  width: 32px;
  height: 32px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header__nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-primary);
}

.header__menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--color-text);
}

.header__lang-switch {
  display: flex;
  gap: 0.25rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.header__lang-switch button {
  padding: 0.25rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all 0.2s;
}

.header__lang-switch button.active {
  background: var(--color-primary);
  color: white;
}

/* Mobile nav */
@media (max-width: 767px) {
  .header__menu-btn { display: block; }
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .header__nav.open { display: flex; }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.hero h1 { color: white; margin-bottom: 1rem; }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 800;
}

.hero__stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Progress Bar */
.progress-bar {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.progress-bar__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.progress-bar__track {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-secondary);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Search */
.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--color-surface);
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-box__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
}

/* Lesson Cards Grid */
.lessons-section {
  padding: 2rem 0 3rem;
}

.lessons-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.lesson-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.lesson-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-border);
  overflow: hidden;
}

.lesson-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-card__duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.lesson-card__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--color-success);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.lesson-card__body {
  padding: 1rem;
}

.lesson-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.lesson-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-card__meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lesson-card__tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 4px;
  font-weight: 600;
}

/* Lesson Page */
.lesson-page {
  padding: 1.5rem 0 3rem;
}

.lesson-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.lesson-page__back:hover { color: var(--color-primary); }

.lesson-page h1 {
  margin-bottom: 1rem;
}

/* Video Player */
.video-player {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.video-player video {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.video-player__youtube {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-player__youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-player__local video {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

/* Transcript Section */
.transcript-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.transcript-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.transcript-section h2 { margin: 0; }

.transcript-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.transcript-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.transcript-toggle-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.transcript-toggle-btn .eye-icon {
  flex-shrink: 0;
}

.transcript-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.transcript-tabs button {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  transition: all 0.2s;
}

.transcript-tabs button.active {
  background: var(--color-primary);
  color: white;
}

.transcript-line {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.transcript-line:last-child { border-bottom: none; }

.transcript-line__time {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
  min-width: 40px;
  padding-top: 2px;
  font-family: var(--font-mono);
}

.transcript-line__text {
  font-size: 1rem;
  line-height: 1.7;
}

.transcript-line__translation {
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Recorder */
.recorder-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.recorder-section h3 { margin-bottom: 0.75rem; }
.recorder-section p { color: var(--color-text-light); margin-bottom: 1rem; font-size: 0.9rem; }

.recorder-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--color-error);
  background: white;
  color: var(--color-error);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.recorder-btn:hover {
  background: var(--color-error);
  color: white;
}

.recorder-btn.recording {
  background: var(--color-error);
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

.recorder-playback {
  margin-top: 1rem;
}

.recorder-playback audio {
  width: 100%;
  max-width: 400px;
}

/* Exercises */
.exercises-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.exercises-section h2 { margin-bottom: 0.5rem; }

.exercises-section__focus {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.exercise {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.exercise__number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.exercise__question {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.exercise__options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.exercise__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95rem;
}

.exercise__option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.exercise__option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.exercise__option.correct {
  border-color: var(--color-success);
  background: var(--color-secondary-light);
}

.exercise__option.incorrect {
  border-color: var(--color-error);
  background: #fef2f2;
}

.exercise__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.exercise__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.exercise__input.correct { border-color: var(--color-success); }
.exercise__input.incorrect { border-color: var(--color-error); }

.exercise__check-btn {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.exercise__check-btn:hover {
  background: var(--color-primary-dark);
}

.exercise__feedback {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.exercise__feedback.show { display: block; }

.exercise__feedback.correct {
  background: var(--color-secondary-light);
  color: #065f46;
}

.exercise__feedback.incorrect {
  background: #fef2f2;
  color: #991b1b;
}

.exercises-score {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-top: 1rem;
  display: none;
}

.exercises-score.show { display: block; }

.exercises-score__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Completion Toggle */
.completion-toggle {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.completion-toggle__label {
  font-weight: 600;
  font-size: 1rem;
}

.completion-toggle__switch {
  position: relative;
  width: 52px;
  height: 28px;
}

.completion-toggle__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.completion-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s;
}

.completion-toggle__slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
  box-shadow: var(--shadow-sm);
}

.completion-toggle__switch input:checked + .completion-toggle__slider {
  background: var(--color-success);
}

.completion-toggle__switch input:checked + .completion-toggle__slider::before {
  transform: translateX(24px);
}

/* Method Section (Landing page) */
.method-section {
  padding: 3rem 0;
}

.method-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.method-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.method-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.method-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.method-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer a { color: rgba(255,255,255,0.9); }

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

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

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Tablet+ */
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .hero { padding: 4rem 0; }
  .lessons-section { padding: 3rem 0 4rem; }
  .method-section { padding: 4rem 0; }
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

.no-results__icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-light);
}

.loading__spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page Header (lessons page) */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  padding: 2.5rem 0;
  text-align: center;
}

.page-header h1 { color: white; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; font-size: 1.05rem; }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.pagination__btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination__btn:hover:not(.disabled) {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination__btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__pages {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.pagination__page {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination__page:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination__page.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination__ellipsis {
  padding: 0 0.25rem;
  color: var(--color-text-light);
}

.pagination__info {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

/* Conversation Practice */
.conversation-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.conversation-section h3 { margin-bottom: 0.75rem; }
.conversation-section > p {
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Conversation home section */
.conversation-home {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0;
}

.conversation-home__text {
  flex: 1;
}

.conversation-home__text h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.conversation-home__text p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.conversation-home__hint {
  font-size: 0.82rem !important;
  font-style: italic;
  color: var(--color-primary) !important;
}

.conversation-home__card {
  flex-shrink: 0;
  width: 300px;
}

@media (max-width: 680px) {
  .conversation-home {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 0;
  }
  .conversation-home__card {
    width: 100%;
  }
}

/* Call card (in lesson page) */
.conv-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.conv-card__left { flex-shrink: 0; }

.conv-card__avatar-img svg {
  border-radius: 50%;
  display: block;
}

.conv-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.conv-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.conv-card__hint {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.conv-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.conv-card__avatar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-light);
  transition: all 0.2s;
}

.conv-card__avatar-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.conv-card__call-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-secondary);
  color: white;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.conv-card__call-btn:hover {
  background: #048a5e;
  transform: scale(1.05);
}

/* Avatar picker overlay */
.avatar-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.avatar-picker {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.avatar-picker h4 {
  text-align: center;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.avatar-picker__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.avatar-picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-picker__item span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.avatar-picker__item:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
}

.avatar-picker__item.selected {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.avatar-picker__item.selected span {
  color: var(--color-primary);
}

.avatar-picker__item svg {
  border-radius: 50%;
}

@media (max-width: 480px) {
  .avatar-picker__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Call overlay (floating panel) */
.call-overlay {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.call-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 320px;
  padding: 1.5rem 1.25rem;
  position: relative;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

@media (max-width: 480px) {
  .call-overlay {
    bottom: 0;
    right: 0;
    left: 0;
  }
  .call-screen {
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem 1rem;
  }
}

.call-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}

.call-close-btn:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.call-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Call avatar */
.call-avatar {
  margin-bottom: 0.75rem;
  transition: all 0.3s;
}

.call-avatar svg {
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.call-avatar--ringing svg {
  animation: callRinging 1.5s ease-in-out infinite;
}

.call-avatar--listening svg {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.3), 0 0 20px rgba(239,68,68,0.15);
}

.call-avatar--speaking svg {
  box-shadow: 0 0 0 4px rgba(37,99,235,0.3), 0 0 20px rgba(37,99,235,0.15);
  animation: callSpeaking 1.2s ease-in-out infinite;
}

.call-avatar--thinking svg {
  opacity: 0.7;
  animation: callThinking 1.5s ease-in-out infinite;
}

@keyframes callRinging {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(8deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(6deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(0deg); }
}

@keyframes callSpeaking {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes callThinking {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.4; }
}

.call-name {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.call-state-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  min-height: 1.2em;
}

.call-timer {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

/* Call progress */
.call-progress-wrap {
  width: 100%;
  max-width: 260px;
  margin-top: 1rem;
  text-align: center;
}

.call-progress-text {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.call-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.call-progress-bar__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0;
}

/* Call subtitles */
.call-subtitles {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  text-align: center;
  max-width: 280px;
  line-height: 1.4;
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

/* Call controls */
.call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

.call-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  transition: all 0.2s;
  cursor: pointer;
}

.call-ctrl-btn--mic {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.15);
  color: white;
}

.call-ctrl-btn--mic:hover {
  background: rgba(255,255,255,0.25);
}

.call-ctrl-btn--mic.listening {
  background: var(--color-error);
  animation: pulse 1.5s infinite;
}

.call-ctrl-btn--end {
  width: 52px;
  height: 52px;
  background: var(--color-error);
  color: white;
}

.call-ctrl-btn--end:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Call consent (inside call overlay) */
.call-consent {
  text-align: center;
  color: white;
  max-width: 300px;
  padding: 0.5rem 0;
}

.call-consent__icon { margin-bottom: 0.75rem; }
.call-consent__icon svg { width: 40px; height: 40px; }
.call-consent h3 { color: white; margin-bottom: 0.5rem; font-size: 1.05rem; }
.call-consent p {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.call-consent ul {
  text-align: left;
  max-width: 260px;
  margin: 0 auto 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.call-consent li {
  padding: 0.3rem 0 0.3rem 1.25rem;
  position: relative;
}

.call-consent li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 700;
}

.call-consent__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.call-consent__accept {
  padding: 0.6rem 1.5rem;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.call-consent__accept:hover {
  background: #048a5e;
  transform: scale(1.02);
}

.call-consent__cancel {
  padding: 0.4rem 1.25rem;
  background: none;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.call-consent__cancel:hover {
  color: white;
  border-color: rgba(255,255,255,0.4);
}

/* Call ended */
.call-ended {
  text-align: center;
  color: white;
}

.call-ended__avatar {
  margin-bottom: 1rem;
  opacity: 0.6;
}

.call-ended__avatar svg {
  border-radius: 50%;
}

.call-ended__text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.call-ended__duration {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}
