@import url('https://fonts.googleapis.com/css2?family=Poiret+One&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --blue:         #2A539E;
  --orange:       #FD7A22;
  --text:         #1a1a2e;
  --bg:           #ffffff;
  --bg-subtle:    #f8f9fc;
  --border:       rgba(42, 83, 158, 0.12);
  --font-display: 'Poiret One', cursive;
  --font-body:    'Montserrat', sans-serif;
}

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

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

h1, h2, h3 { font-family: var(--font-display); }

.logo { font-family: var(--font-display); font-size: 2rem; user-select: none; }
.logo .arrow { color: var(--orange); }
.logo .word  { color: var(--blue); }

.container { width: 100%; padding: 0 16px; }
@media (min-width: 768px) { .container { max-width: 720px; margin: 0 auto; padding: 0 24px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 100px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s ease; border: none; text-decoration: none;
}
.btn-orange { background: linear-gradient(135deg, #FD7A22, #d9630f); color: #fff; }
.btn-orange:hover { background: linear-gradient(135deg, #ff8c3a, #e06b1a); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(253,122,34,0.35); }
.btn-blue-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-blue-outline:hover { background: var(--blue); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #e53e3e, #c53030); color: #fff; }
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(229,62,62,0.3); }

.card { background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 4px 30px rgba(42,83,158,0.08); }

.timer { font-family: var(--font-display); font-size: clamp(3rem, 10vw, 6rem); color: var(--blue); letter-spacing: 0.05em; }

.fade-in-up { opacity: 0; transform: translateY(32px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.pulse { animation: pulse 2s ease-in-out infinite; }

.participant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; }
.participant-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: var(--bg-subtle); border: 1px solid var(--border); }
.participant-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; }
.participant-name { font-size: 13px; font-weight: 600; text-align: center; }

.video-grid { display: flex; flex-direction: column; gap: 8px; flex: 1; }
@media (min-width: 768px) {
  .video-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: calc(100vh - 120px); }
}
.video-tile { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #1a1a2e; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-label { position: absolute; bottom: 8px; left: 12px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.tile-avatar { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; }
.tile-avatar-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.audio-only-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 11px; display: none; }
.audio-only-badge.show { display: block; }

@media (max-width: 767px) {
  .video-grid { display: flex; flex-direction: column; height: 100vh; }
  .video-tile-main { flex: 1; min-height: 60vh; aspect-ratio: unset; }
  .video-tiles-secondary { display: flex; flex-direction: row; overflow-x: auto; gap: 8px; padding: 8px; height: 128px; flex-shrink: 0; }
  .video-tile-secondary { width: 160px; height: 112px; flex-shrink: 0; aspect-ratio: unset; }
}

.error-text { color: #e53e3e; font-size: 13px; margin-top: 8px; min-height: 20px; }
.page-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 24px; text-align: center; }
