/* ================================================
   GEMINI MEETING - GLOBAL STYLESHEET
   ================================================
   Consolidated CSS for all views:
   - Display Screen
   - Mobile Attendee App
   - Admin Controller
   ================================================ */

/* ==================== CSS VARIABLES ==================== */

:root {
  /* Brand Colors */
  --primary: #001E61;
  --primary-light: #003399;
  --secondary: #FF6B35;
  --accent: #FFD93D;
  
  /* Background Colors */
  --bg-light: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-track: #E8ECF0;
  
  /* Text Colors */
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  
  /* Status Colors */
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  
  /* Medal Colors */
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;
  
  /* UI Colors */
  --border: #E5E7EB;
  
  /* Layout */
  --tab-height: 64px;
  --header-height: 60px;
}

/* ==================== RESET & BASE ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

/* ==================== ICON UTILITIES ==================== */

.icon-inline {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  display: inline-block;
}

.icon-trophy {
  width: 48px;
  height: 48px;
  vertical-align: middle;
  stroke: var(--gold);
}

.schedule-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--primary);
}

.shake-horse svg {
  width: 60px;
  height: 60px;
  fill: var(--primary);
}

.progress-horse svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

.race-intro-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.race-intro-icon svg {
  width: 80px;
  height: 80px;
  stroke: var(--primary);
}

/* ==================== BUTTONS ==================== */

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: 14px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(0, 30, 97, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary.warning {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* ==================== SCREEN SYSTEM ==================== */

.screen {
  display: none;
  height: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.display-mode {
  display: none;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.display-mode.active {
  display: flex;
}

/* Prevent flash of wrong content before JS initializes state */
body.app-initializing {
  visibility: hidden;
}

body.app-initializing .screen,
body.app-initializing .display-mode {
  display: none !important;
}

body.app-initializing .screen.active,
body.app-initializing .display-mode.active {
  display: none !important;
}

/* ==================== TAB BAR ==================== */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: none;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}

/* Only show tab bar when main app screen is active */
#mainAppScreen.active .tab-bar,
#adminScreen.active .tab-bar {
  display: flex;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
  position: relative;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon svg {
  width: 24px;
  height: 24px;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 24px);
  background: var(--success);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
}

/* ==================== TAB CONTENT ==================== */

.tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-panel.active {
  display: block;
}

/* ==================== MODALS ==================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 320px;
  text-align: center;
}

.modal-large {
  max-width: 400px;
  max-height: 80vh;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.modal-fullscreen {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.modal-fullscreen .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-fullscreen .modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.modal-fullscreen .modal-close {
  margin-left: auto;
  flex-shrink: 0;
  margin-right: 0;
}

#connectedUsersModal {
  padding: 0;
  align-items: stretch;
}

.modal-fullscreen .connected-users-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.connected-users-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.connected-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
}

.connected-user-item .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.connected-user-item .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connected-user-item .user-avatar svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-secondary);
}

.connected-user-item .user-details {
  flex: 1;
}

.connected-user-item .user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.connected-user-item .user-status {
  display: flex;
  align-items: center;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-content h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-content button {
  width: 100%;
  margin-bottom: 8px;
}

/* ==================== CONNECTION STATUS ==================== */

.connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}

.connection-dot.disconnected {
  background: var(--danger);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.status-dot.connected { background: var(--success); }
.status-dot.disconnected { background: var(--warning); }

/* ==================== AVATARS ==================== */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-light);
}

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

/* ==================== GEMINI LOADER ==================== */

.gemini-loader {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loader-logo {
  width: 24px;
  height: 24px;
  z-index: 10;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.05); opacity: 1; }
}

.loader-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loader-ring-1 {
  width: 36px;
  height: 36px;
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: spin 2.5s linear infinite;
}

.loader-ring-2 {
  width: 46px;
  height: 46px;
  border-bottom-color: rgba(0, 30, 97, 0.25);
  border-left-color: rgba(0, 30, 97, 0.25);
  animation: spin 4s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== WAITING DOTS ==================== */

.waiting-dots {
  display: inline-block;
  width: 18px;
  text-align: left;
}

.waiting-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F0F0F0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #CCCCCC;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #AAAAAA;
}

/* ==================== UTILITIES ==================== */

.hidden {
  display: none !important;
}

/* Touch feedback */
button:active {
  opacity: 0.9;
}

/* Safe area for bottom tabs */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .tab-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ==================== ANIMATIONS ==================== */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==================================================
   LOGIN SCREEN STYLES (Mobile & Admin)
   ================================================== */

/* Login screen - inherits display:flex from .screen.active */
.login-screen.active {
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary) 0%, #0A3380 50%, var(--primary-light) 100%);
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 360px;
  padding: 40px 28px;
  background: white;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

/* Logo Section */
.logo {
  margin-bottom: 36px;
}

.logo-icon-img {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.logo h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.logo h1 span {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.logo .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form .input-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  display: block;
}

.login-form .code-input {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 12px;
  outline: none;
  transition: all 0.25s;
  font-family: inherit;
  width: 100%;
}

.login-form .code-input:focus {
  border-color: var(--primary);
  background: white;
}

.login-form .code-input.error {
  border-color: var(--danger);
  animation: shake 0.4s ease;
}

.login-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ==================================================
   ONBOARDING STYLES
   ================================================== */

.onboarding-container {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: 28px;
  padding: 36px 28px;
}

.onboarding-header {
  margin-bottom: 32px;
  text-align: center;
}

.onboarding-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.onboarding-steps {
  margin-bottom: 32px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
  margin-bottom: 12px;
  background: var(--bg-light);
  border-radius: 16px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.onboarding-step.active {
  border-color: var(--primary);
  background: rgba(0, 30, 97, 0.03);
}

.onboarding-step.completed {
  background: rgba(16, 185, 129, 0.08);
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.onboarding-step.completed .step-number {
  background: var(--success);
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.step-status {
  width: 28px;
  height: 28px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.step-action {
  flex-shrink: 0;
}

.step-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.step-btn:active {
  transform: scale(0.96);
}

.step-btn.done {
  background: var(--success);
}

#onboardingScreen.active {
  justify-content: center;
  align-items: center;
  background: linear-gradient(160deg, var(--primary) 0%, #0A3380 50%, var(--primary-light) 100%);
  padding: 24px;
}

#onboardingContinue {
  width: 100%;
  margin-top: 8px;
}

/* ==================================================
   WECHAT STYLES
   ================================================== */

.wechat-warning-screen {
  justify-content: flex-start;
  align-items: center;
  min-height: 100%;
  background: linear-gradient(160deg, var(--primary) 0%, #0A3380 50%, var(--primary-light) 100%);
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wechat-warning-screen .wechat-container {
  margin: auto;
}

.wechat-container {
  width: 100%;
  max-width: 360px;
  padding: 32px 24px;
  background: white;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.wechat-message {
  margin: 20px 0;
}

.wechat-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.wechat-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.wechat-qr {
  margin: 16px auto;
  padding: 12px;
  background: white;
  border-radius: 16px;
  border: 2px solid var(--border);
  display: inline-block;
}

.wechat-qr canvas {
  display: block;
}

.wechat-qr.copied {
  animation: qrPulse 0.3s ease;
}

@keyframes qrPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.wechat-tap-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  transition: all 0.2s ease;
}

.wechat-tap-hint.copied {
  color: var(--success);
  font-weight: 600;
}

.wechat-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.wechat-toast.show {
  opacity: 1;
}

/* WeChat Floating Window Guide */
.pwa-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 97, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pwa-install-overlay.active {
  opacity: 1;
}

.pwa-install-overlay.wechat-guide {
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.wechat-arrow-container {
  position: absolute;
  top: 12px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, -5px); }
}

.wechat-arrow-pointer {
  transform: rotate(45deg);
}

.wechat-arrow-pointer svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.wechat-arrow-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wechat-arrow-label .step-badge {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.wechat-menu-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.wechat-menu-image {
  width: 100%;
  display: block;
}

.wechat-arrow-container.step2 {
  position: absolute;
  top: 20px;
  left: 5%;
  right: auto;
  flex-direction: column;
  animation: arrowBounceDown 1s ease-in-out infinite;
}

.wechat-arrow-container.step2 .wechat-arrow-pointer {
  transform: rotate(45deg);
  margin-left: -40px;
}

.wechat-arrow-container.step2 .wechat-arrow-pointer svg path {
  stroke: var(--primary);
}

@keyframes arrowBounceDown {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, 5px); }
}

/* ==================================================
   SCHEDULE STYLES
   ================================================== */

.schedule-item {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
}

.schedule-item.current {
  border-color: var(--primary);
  background: linear-gradient(to right, rgba(0, 30, 97, 0.03), white);
  box-shadow: 0 4px 20px rgba(0, 30, 97, 0.1);
}

.schedule-item.past {
  opacity: 0.5;
}

.schedule-time {
  min-width: 60px;
  text-align: center;
}

.schedule-time .time {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.schedule-time .duration {
  font-size: 11px;
  color: var(--text-secondary);
}

.schedule-content {
  flex: 1;
}

.schedule-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.schedule-presenter {
  font-size: 12px;
  color: var(--text-secondary);
}

.schedule-type {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.schedule-type.presentation { background: rgba(0, 30, 97, 0.1); color: var(--primary); }
.schedule-type.activity { background: rgba(255, 107, 53, 0.1); color: var(--secondary); }
.schedule-type.break { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.schedule-type.external { background: rgba(107, 114, 128, 0.1); color: var(--text-secondary); }

.schedule-container {
  padding-bottom: calc(var(--tab-height) + 16px);
}

.schedule-header {
  padding: 16px;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.schedule-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
}

.day-tabs {
  display: flex;
  gap: 8px;
}

.day-tab {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

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

.schedule-list {
  padding: 16px;
}

/* ==================================================
   POLL STYLES
   ================================================== */

.poll-badge {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
  animation: pulse 1.5s ease infinite;
}

.poll-question {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.3;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.poll-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.poll-option:active {
  transform: scale(0.98);
}

.poll-option.selected {
  border-color: var(--primary);
  background: rgba(0, 30, 97, 0.05);
}

.poll-option .option-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poll-option.selected .option-circle {
  border-color: var(--primary);
  background: var(--primary);
}

.poll-option.selected .option-circle::after {
  content: '✓';
  color: white;
  font-size: 12px;
}

.poll-option .option-text {
  font-size: 15px;
  font-weight: 500;
}

.poll-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==================================================
   COUNTDOWN STYLES
   ================================================== */

.countdown-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.countdown-overlay.active {
  display: flex;
}

.countdown-content {
  text-align: center;
}

.countdown-number {
  font-family: 'Orbitron', monospace;
  font-size: 180px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  animation: countdownPop 1s ease-in-out infinite;
}

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

.countdown-text {
  font-size: 20px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 4px;
}

.countdown-container {
  text-align: center;
}

/* ==================================================
   BREAK STATE STYLES
   ================================================== */

.break-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.break-icon svg {
  width: 80px;
  height: 80px;
  stroke: var(--primary);
}

.break-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.break-minutes {
  font-size: 72px;
  font-weight: 900;
  color: var(--primary);
}

.break-label {
  font-size: 16px;
  color: var(--text-secondary);
}

.break-container {
  text-align: center;
}

.break-container h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* ==================================================
   RESULTS/PODIUM STYLES
   ================================================== */

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  height: 320px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: podiumRise 0.5s ease-out backwards;
}

.podium-place:nth-child(1) { animation-delay: 0.4s; }
.podium-place:nth-child(2) { animation-delay: 0.2s; }
.podium-place:nth-child(3) { animation-delay: 0.6s; }

@keyframes podiumRise {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.podium-avatar {
  font-size: 56px;
  margin-bottom: 12px;
}

.podium-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-stand {
  width: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  font-size: 42px;
  font-weight: 900;
  padding-bottom: 16px;
}

.podium-stand.first {
  height: 180px;
  background: linear-gradient(180deg, var(--gold) 0%, #B8860B 100%);
  color: #1A1A2E;
}

.podium-stand.second {
  height: 140px;
  background: linear-gradient(180deg, var(--silver) 0%, #808080 100%);
  color: #1A1A2E;
}

.podium-stand.third {
  height: 100px;
  background: linear-gradient(180deg, var(--bronze) 0%, #8B4513 100%);
  color: #1A1A2E;
}

.results-container {
  text-align: center;
  max-width: 320px;
}

.results-container h2 {
  font-size: 28px;
  font-weight: 900;
  color: white;
  margin-bottom: 24px;
}

.your-result {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.result-rank {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: white;
}

.result-details {
  text-align: left;
}

.result-nickname {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.result-stats {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* ==================================================
   PWA INSTALL MODAL
   ================================================== */

.pwa-install-modal {
  background: white;
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.pwa-install-overlay.active .pwa-install-modal {
  transform: translateY(0);
}

.pwa-install-header {
  margin-bottom: 24px;
}

.pwa-install-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.pwa-install-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pwa-install-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.pwa-install-steps {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.pwa-install-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pwa-install-step:last-child {
  border-bottom: none;
}

.pwa-install-step .step-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.pwa-install-step .step-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pwa-install-step .step-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.pwa-install-note {
  font-size: 12px;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.pwa-install-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-install-actions .btn-install {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pwa-install-actions .btn-install:hover {
  background: var(--primary-light);
}

.pwa-install-actions .btn-skip {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.pwa-install-actions .btn-skip:hover {
  color: var(--text-primary);
}

/* ==================================================
   DISPLAY SCREEN STYLES
   ================================================== */

#mainDisplay {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
}

/* Display Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: var(--primary);
  flex-shrink: 0;
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.header-logo {
  height: 44px;
  width: auto;
}

.header-center {
  flex: 1;
  text-align: center;
}

.meeting-title {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.current-time {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: baseline;
}

.time-main {
  font-size: 36px;
  letter-spacing: 2px;
  min-width: 145px;
  text-align: right;
}

.time-seconds {
  font-size: 22px;
  letter-spacing: 1px;
  opacity: 0.8;
  min-width: 52px;
}

/* Welcome Mode */
#welcomeMode {
  flex-direction: column;
}

.welcome-layout {
  display: flex;
  width: 100%;
  flex: 1;
  padding: 20px 40px 40px;
  gap: 40px;
}

.qr-section {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 20px;
}

/* Welcome Title Banner */
.welcome-title-banner {
  width: 100%;
  text-align: center;
  padding: 40px 40px 0;
  flex-shrink: 0;
}

.welcome-title {
  font-size: 64px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

.welcome-subtitle {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 4px;
}

.qr-container {
  text-align: center;
}

.qr-branding {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #E8E8E8;
}

.qr-branding .gemini-loader {
  width: 64px;
  height: 64px;
}

.qr-branding .loader-logo {
  width: 32px;
  height: 32px;
}

.qr-branding .loader-ring-1 {
  width: 48px;
  height: 48px;
}

.qr-branding .loader-ring-2 {
  width: 62px;
  height: 62px;
}

.qr-branding .status-message {
  font-size: 18px;
}

/* WeChat Instructions */
.wechat-instructions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.wechat-step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
}

.wechat-step .step-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.wechat-step .step-text {
  color: var(--text-secondary);
}

.wechat-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.wechat-plus-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
}

.qr-code {
  width: 340px;
  height: 340px;
  background: white;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0, 30, 97, 0.15);
  border: 2px solid #E0E0E0;
}

.qr-code canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-instruction {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.qr-url {
  font-size: 16px;
  color: var(--primary);
  font-family: monospace;
}

.info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.attendee-panel {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 28px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.panel-background-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.panel-background-loader .gemini-loader {
  width: 300px;
  height: 300px;
}

.panel-background-loader .loader-logo {
  width: 120px;
  height: 120px;
}

.panel-background-loader .loader-ring {
  border-width: 4px;
}

.panel-background-loader .loader-ring-1 {
  width: 200px;
  height: 200px;
}

.panel-background-loader .loader-ring-2 {
  width: 260px;
  height: 260px;
}

.attendee-grid {
  position: relative;
  z-index: 1;
}

.status-message {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.attendee-grid,
.attendee-list {
  flex: 1;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 0;
  overflow-y: auto;
  padding: 8px 0;
}

.attendee-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  width: calc(50% - 20px);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.attendee-chip.visible {
  opacity: 1;
  transform: translateX(0);
}

.attendee-chip .attendee-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.attendee-chip .attendee-avatar-emoji {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #F0F0F0;
  border-radius: 50%;
}

.attendee-chip .attendee-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.attendee-chip .attendee-team {
  display: flex;
  align-items: center;
  background: transparent;
  padding: 0;
  margin-left: 4px;
}

.attendee-chip .attendee-team-flag {
  width: 18px;
  height: 13px;
  object-fit: contain;
}

.attendee-chip .attendee-team-emoji {
  font-size: 14px;
}

/* Slide Mode */
.slide-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.slide-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 60px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  min-height: 0;
}

/* Remove padding for video background slides */
.slide-content:has(.video-background-slide) {
  padding: 0;
}

.slide-content.align-top {
  align-items: flex-start;
}

.slide-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 40px;
  background: var(--bg-card);
  border-top: 1px solid #E0E0E0;
}

.slide-indicator {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.presentation-title {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* Slide Types */
.slide-type-title {
  text-align: center;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slide-type-title h1 {
  font-size: 72px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  line-height: 1.1;
}

/* Auto-fit title - dynamically sized by JavaScript */
.slide-type-title h1.auto-fit-text {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

.slide-type-title .subtitle {
  font-size: 32px;
  color: var(--text-secondary);
}

/* Subtitle also auto-fit */
.slide-type-title .subtitle.auto-fit-text {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

/* Video Background Title Slide */
.slide-type-title.video-background-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide-type-title.video-background-slide .video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.slide-type-title.video-background-slide .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.slide-type-title.video-background-slide .video-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 40px;
  box-sizing: border-box;
}

.slide-type-title.video-background-slide .video-content h1 {
  color: var(--primary);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.slide-type-title.video-background-slide .video-content .subtitle {
  color: var(--text-primary);
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}

.slide-type-bullets {
  max-width: 800px;
}

.slide-type-bullets.keyword-grid {
  position: relative;
  max-width: 1200px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.slide-type-bullets.keyword-grid .keyword-grid-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
}

.slide-type-bullets.keyword-grid h1 {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
  width: auto;
  max-width: 100%;
  overflow: visible;
}

.slide-type-bullets.keyword-grid .keyword-grid-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
  align-items: stretch;
  flex: 1;
  width: 100%;
}

.slide-type-bullets.keyword-grid .keyword-grid-item {
  border: 3px solid rgba(0, 30, 97, 0.15);
  border-radius: 28px;
  padding: 20px 28px 24px;
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 30, 97, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}

.slide-type-bullets.keyword-grid .keyword-icon {
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-type-bullets.keyword-grid .keyword-icon svg {
  width: 100%;
  height: 100%;
  stroke: #000000;
  color: #000000;
  stroke-width: 1.5;
}

/* Icon Animations */

/* 1. Opportunity icon - arrow moving back and forth */
.icon-opportunity .arrow-group {
  transform-origin: 38px 10px;
  animation: arrow-wobble 2s ease-in-out infinite;
}

@keyframes arrow-wobble {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(4px, -4px);
  }
}

/* 2. Presentation icon - blinking caret */
.icon-presentation .caret-blink {
  animation: caret-blink 1s ease-in-out infinite;
}

@keyframes caret-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* 3. Data icon - animated chart bars */
.icon-data .bar-1 {
  transform-origin: 29px 28px;
  animation: bar-grow-1 1.8s ease-in-out infinite;
}

.icon-data .bar-2 {
  transform-origin: 37px 28px;
  animation: bar-grow-2 1.8s ease-in-out infinite 0.3s;
}

.icon-data .bar-3 {
  transform-origin: 45px 28px;
  animation: bar-grow-3 1.8s ease-in-out infinite 0.6s;
}

@keyframes bar-grow-1 {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.6);
  }
}

@keyframes bar-grow-2 {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.3);
  }
}

@keyframes bar-grow-3 {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.75);
  }
}

/* 4. Connections icon - pulsing dots traveling along lines */
.icon-connections .pulse-dot {
  opacity: 0;
}

.icon-connections .pulse-dot-1 {
  animation: pulse-travel-1 2s ease-in-out infinite;
}

.icon-connections .pulse-dot-2 {
  animation: pulse-travel-2 2s ease-in-out infinite 0.6s;
}

.icon-connections .pulse-dot-3 {
  animation: pulse-travel-3 2s ease-in-out infinite 1.2s;
}

@keyframes pulse-travel-1 {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes pulse-travel-2 {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-5px, 4px);
  }
}

@keyframes pulse-travel-3 {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(5px, 4px);
  }
}

.icon-connections .center-node {
  animation: center-pulse 2s ease-in-out infinite;
}

@keyframes center-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.slide-type-bullets.keyword-grid .keyword-text {
  font-size: 38px;
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  max-width: 100%;
}

/* ==================== ICON BULLETS LAYOUT ==================== */

.slide-type-bullets.icon-bullets {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.slide-type-bullets.icon-bullets .icon-bullets-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.slide-type-bullets.icon-bullets h1 {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  max-width: 100%;
  display: inline-block;
  width: auto;
  flex-shrink: 0;
}

.slide-type-bullets.icon-bullets .icon-bullets-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  flex: 1;
  justify-content: center;
}

.slide-type-bullets.icon-bullets .icon-bullet-item {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  border: 2px solid rgba(0, 30, 97, 0.1);
  box-shadow: 0 4px 20px rgba(0, 30, 97, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slide-type-bullets.icon-bullets .icon-bullet-item:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 24px rgba(0, 30, 97, 0.1);
}

.slide-type-bullets.icon-bullets .bullet-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-type-bullets.icon-bullets .bullet-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--primary);
  color: var(--primary);
  stroke-width: 1.5;
}

.slide-type-bullets.icon-bullets .bullet-text {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Icon Animations for Let's Play slide */
.icon-shake .shake-lines {
  animation: shake-vibrate 0.5s ease-in-out infinite;
  transform-origin: center;
}

@keyframes shake-vibrate {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.icon-horse .horse-legs {
  animation: horse-gallop 0.4s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes horse-gallop {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.85); }
}

.icon-trophy .trophy-star {
  animation: trophy-shine 1.5s ease-in-out infinite;
}

@keyframes trophy-shine {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.icon-go .flag-check {
  animation: flag-wave 0.8s ease-in-out infinite;
}

@keyframes flag-wave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==================== KEYWORD GRID ANIMATED NETWORK ==================== */

.slide-type-bullets.keyword-grid .keyword-grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.slide-type-bullets.keyword-grid .keyword-grid-canvas canvas {
  width: 100%;
  height: 100%;
}

/* Fallback static elements when canvas not supported */
.slide-type-bullets.keyword-grid .keyword-grid-bg {
  position: absolute;
  inset: -60px -40px -40px -40px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.slide-type-bullets.keyword-grid .keyword-grid-bg .shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 30, 97, 0.03);
}

.slide-type-bullets.keyword-grid .keyword-grid-bg .shape-1 {
  width: 280px;
  height: 280px;
  top: 5%;
  left: 8%;
  animation: float-shape 12s ease-in-out infinite;
}

.slide-type-bullets.keyword-grid .keyword-grid-bg .shape-2 {
  width: 200px;
  height: 200px;
  top: 15%;
  right: 12%;
  animation: float-shape 15s ease-in-out infinite reverse;
  animation-delay: -3s;
}

.slide-type-bullets.keyword-grid .keyword-grid-bg .shape-3 {
  width: 240px;
  height: 240px;
  bottom: 10%;
  left: 15%;
  animation: float-shape 18s ease-in-out infinite;
  animation-delay: -6s;
}

.slide-type-bullets.keyword-grid .keyword-grid-bg .shape-4 {
  width: 180px;
  height: 180px;
  bottom: 20%;
  right: 8%;
  animation: float-shape 14s ease-in-out infinite reverse;
  animation-delay: -2s;
}

@keyframes float-shape {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(15px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-10px, 10px) scale(0.95);
  }
  75% {
    transform: translate(20px, 15px) scale(1.02);
  }
}

/* Animated orbiting rings - representing interconnectedness */
.slide-type-bullets.keyword-grid .keyword-grid-orbits {
  position: absolute;
  inset: -100px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.slide-type-bullets.keyword-grid .orbit-ring {
  position: absolute;
  border-radius: 50%;
  animation: orbit-rotate 60s linear infinite;
}

.slide-type-bullets.keyword-grid .orbit-ring-1 {
  width: 500px;
  height: 500px;
  top: -180px;
  left: -120px;
  border: 2px dashed rgba(0, 30, 97, 0.12);
  animation-duration: 45s;
}

/* Orbit marker on ring 1 */
.slide-type-bullets.keyword-grid .orbit-ring-1::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  opacity: 0.35;
  box-shadow: 0 0 8px rgba(0, 30, 97, 0.3);
}

.slide-type-bullets.keyword-grid .orbit-ring-2 {
  width: 450px;
  height: 450px;
  bottom: -140px;
  right: -100px;
  border: 2px dashed rgba(0, 30, 97, 0.1);
  animation-duration: 55s;
  animation-direction: reverse;
}

/* Orbit marker on ring 2 */
.slide-type-bullets.keyword-grid .orbit-ring-2::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.3;
  box-shadow: 0 0 6px rgba(0, 30, 97, 0.25);
}

.slide-type-bullets.keyword-grid .orbit-ring-3 {
  width: 650px;
  height: 650px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 30, 97, 0.06);
  animation-duration: 80s;
}

/* Orbit marker on ring 3 */
.slide-type-bullets.keyword-grid .orbit-ring-3::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.2;
}

@keyframes orbit-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Center-positioned rotating gear/cog element (subtle) */
.slide-type-bullets.keyword-grid .keyword-grid-orbits::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(0, 30, 97, 0.08);
  border-radius: 50%;
  animation: gear-pulse 8s ease-in-out infinite;
}

.slide-type-bullets.keyword-grid .keyword-grid-orbits::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(0, 30, 97, 0.12);
  border-radius: 50%;
  animation: gear-pulse 8s ease-in-out infinite reverse;
}

@keyframes gear-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.2;
  }
}

/* Animated connection nodes - representing people/connections */
.slide-type-bullets.keyword-grid .keyword-grid-network {
  position: absolute;
  inset: -20px;
  z-index: 1;
  pointer-events: none;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: node-pulse 3s ease-in-out infinite;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.25;
  animation: node-ring 3s ease-in-out infinite;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  opacity: 0.1;
  animation: node-ring 3s ease-in-out infinite 0.3s;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-1 {
  top: 12%;
  left: 8%;
  animation-delay: 0s;
  width: 14px;
  height: 14px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-2 {
  top: 8%;
  right: 12%;
  animation-delay: 0.8s;
  width: 16px;
  height: 16px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-3 {
  bottom: 18%;
  left: 5%;
  animation-delay: 1.6s;
  width: 10px;
  height: 10px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-4 {
  bottom: 12%;
  right: 8%;
  animation-delay: 2.4s;
  width: 14px;
  height: 14px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-5 {
  top: 50%;
  left: 2%;
  animation-delay: 0.4s;
  width: 8px;
  height: 8px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .node-6 {
  top: 45%;
  right: 3%;
  animation-delay: 2s;
  width: 10px;
  height: 10px;
}

@keyframes node-pulse {
  0%, 100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@keyframes node-ring {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Animated connecting lines - representing connections between nodes */
.slide-type-bullets.keyword-grid .keyword-grid-network .link {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 30, 97, 0.25) 20%,
    rgba(0, 30, 97, 0.35) 50%,
    rgba(0, 30, 97, 0.25) 80%,
    transparent 100%
  );
  transform-origin: left center;
  border-radius: 1px;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .link-1 {
  width: 350px;
  top: 15%;
  left: 10%;
  transform: rotate(3deg);
  animation: link-travel 6s ease-in-out infinite;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .link-2 {
  width: 400px;
  top: 52%;
  left: 5%;
  transform: rotate(-2deg);
  animation: link-travel 8s ease-in-out infinite;
  animation-delay: -2s;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .link-3 {
  width: 300px;
  bottom: 20%;
  right: 10%;
  transform: rotate(5deg);
  animation: link-travel 7s ease-in-out infinite;
  animation-delay: -4s;
}

.slide-type-bullets.keyword-grid .keyword-grid-network .link-4 {
  width: 280px;
  top: 32%;
  right: 8%;
  transform: rotate(-8deg);
  animation: link-travel 5s ease-in-out infinite;
  animation-delay: -1s;
}

@keyframes link-travel {
  0% {
    opacity: 0;
    transform: translateX(-30px) rotate(var(--link-angle, 0deg)) scaleX(0.3);
  }
  15% {
    opacity: 0.8;
    transform: translateX(0) rotate(var(--link-angle, 0deg)) scaleX(1);
  }
  85% {
    opacity: 0.8;
    transform: translateX(0) rotate(var(--link-angle, 0deg)) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(30px) rotate(var(--link-angle, 0deg)) scaleX(0.3);
  }
}

/* Floating particle dots - small ambient motion */
.slide-type-bullets.keyword-grid .keyword-grid-particles {
  position: absolute;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.slide-type-bullets.keyword-grid .particle {
  position: absolute;
  border-radius: 50%;
  background: var(--primary);
}

.slide-type-bullets.keyword-grid .particle-1 {
  width: 6px;
  height: 6px;
  top: 15%;
  left: 20%;
  animation: particle-orbit 15s linear infinite;
}

.slide-type-bullets.keyword-grid .particle-2 {
  width: 4px;
  height: 4px;
  top: 25%;
  right: 25%;
  animation: particle-drift 20s ease-in-out infinite;
  animation-delay: -5s;
}

.slide-type-bullets.keyword-grid .particle-3 {
  width: 5px;
  height: 5px;
  bottom: 30%;
  left: 30%;
  animation: particle-orbit 18s linear infinite reverse;
  animation-delay: -8s;
}

.slide-type-bullets.keyword-grid .particle-4 {
  width: 4px;
  height: 4px;
  bottom: 20%;
  right: 20%;
  animation: particle-drift 16s ease-in-out infinite reverse;
  animation-delay: -3s;
}

.slide-type-bullets.keyword-grid .particle-5 {
  width: 3px;
  height: 3px;
  top: 60%;
  left: 12%;
  animation: particle-orbit 22s linear infinite;
  animation-delay: -12s;
}

.slide-type-bullets.keyword-grid .particle-6 {
  width: 5px;
  height: 5px;
  top: 35%;
  right: 8%;
  animation: particle-drift 14s ease-in-out infinite;
  animation-delay: -7s;
}

@keyframes particle-orbit {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.15;
  }
  25% {
    transform: translate(50px, -30px) rotate(90deg);
    opacity: 0.25;
  }
  50% {
    transform: translate(20px, -60px) rotate(180deg);
    opacity: 0.15;
  }
  75% {
    transform: translate(-30px, -30px) rotate(270deg);
    opacity: 0.25;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.15;
  }
}

@keyframes particle-drift {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0.12;
  }
  33% {
    transform: translate(40px, -50px);
    opacity: 0.22;
  }
  66% {
    transform: translate(-30px, 30px);
    opacity: 0.18;
  }
}

.slide-type-bullets h2 {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 40px;
}

.slide-type-bullets ul {
  list-style: none;
}

.slide-type-bullets li {
  font-size: 28px;
  padding: 16px 0;
  padding-left: 40px;
  position: relative;
}

.slide-type-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
}

.slide-type-image {
  text-align: center;
}

.slide-type-image img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.slide-type-image .caption {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-secondary);
}

.slide-type-video {
  text-align: center;
}

.slide-type-video h3 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--primary);
}

.slide-type-video video {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 16px;
}

.slide-type-race {
  text-align: center;
}

.slide-type-race .race-intro-icon {
  font-size: 120px;
  margin-bottom: 24px;
}

.slide-type-race h2 {
  font-size: 56px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
}

.slide-type-race p {
  font-size: 24px;
  color: var(--text-secondary);
}

.slide-type-race .race-hint {
  margin-top: 40px;
  font-size: 18px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Race Mode */
#raceMode {
  padding: 20px;
}

.race-track-wrapper {
  width: 100%;
  height: 100%;
}

#raceCanvas {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--bg-card);
}

/* Display Countdown */
#countdownOverlay .countdown-number {
  font-size: 280px;
}

#countdownOverlay .countdown-text {
  font-size: 42px;
  margin-top: 24px;
}

/* Results Mode */
#resultsMode {
  padding: 40px;
  overflow-y: auto;
}

.results-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.results-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 40px;
  color: var(--primary);
}

.podium-team {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.podium-stats {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.full-rankings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.full-rankings .ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid #E0E0E0;
  padding: 10px 20px;
  border-radius: 12px;
}

.ranking-position {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-secondary);
  width: 30px;
}

.ranking-avatar {
  font-size: 20px;
}

.ranking-name {
  font-size: 16px;
  font-weight: 600;
}

.ranking-progress {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* Poll Mode */
#pollMode {
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.poll-wrapper {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

#pollMode .poll-badge {
  font-size: 14px;
  padding: 6px 20px;
  margin-bottom: 24px;
}

#pollMode .poll-question {
  font-size: 42px;
  margin-bottom: 48px;
}

.poll-results-display {
  margin-bottom: 32px;
}

.poll-option-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  text-align: left;
}

.poll-option-display .option-letter {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.poll-option-display .option-text {
  width: 200px;
  font-size: 18px;
  flex-shrink: 0;
}

.poll-option-display .option-bar {
  flex: 1;
  height: 32px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

.poll-option-display .option-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.5s ease;
}

.poll-option-display .option-percent {
  width: 60px;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.poll-vote-count {
  font-size: 18px;
  color: var(--text-secondary);
}

.poll-vote-count span {
  font-weight: 700;
  color: var(--primary);
}

.poll-waiting, .rating-waiting, .wordcloud-waiting {
  padding: 40px;
  color: var(--text-secondary);
  font-size: 20px;
}

.word-cloud-display {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 40px;
}

.cloud-word {
  color: var(--primary);
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 12px;
}

/* ==================== NEW POLL TYPES ==================== */

/* Free Text Country Poll - Display */
.free-text-country-display {
  width: 100%;
  padding: 20px;
}

.poll-timer-display {
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary);
}

.poll-timer-display.warning {
  color: var(--warning);
}

.poll-timer-display.danger {
  color: var(--danger);
  animation: pulse 1s infinite;
}

.country-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

.country-column {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  min-height: 300px;
}

.country-header {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: center;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.country-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-chip {
  background: var(--bg-light);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  border-left: 3px solid var(--primary);
}

/* Private Average Poll - Display */
.private-average-display {
  text-align: center;
  padding: 60px 40px;
}

.private-message {
  max-width: 500px;
  margin: 0 auto;
}

.lock-icon {
  font-size: 80px;
  margin-bottom: 24px;
}

.private-message p {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.vote-count-text {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.reveal-hint {
  font-size: 18px;
  font-style: italic;
}

.private-average-results {
  text-align: center;
  padding: 60px;
}

.average-reveal {
  margin-bottom: 24px;
}

.average-number {
  font-size: 120px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.average-label {
  font-size: 32px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 4px;
}

.total-responses {
  font-size: 20px;
  color: var(--text-secondary);
}

/* Hand Raise Poll - Display (Odometer) */
.hand-raise-display {
  text-align: center;
  padding: 60px 40px;
}

.odometer-container {
  max-width: 800px;
  margin: 0 auto;
}

.odometer-labels {
  display: flex;
  justify-content: space-between;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
}

.no-label {
  color: var(--danger);
}

.yes-label {
  color: var(--success);
}

.odometer-track {
  position: relative;
  height: 60px;
  background: linear-gradient(to right, var(--danger), #FFD93D 50%, var(--success));
  border-radius: 30px;
  overflow: hidden;
}

.odometer-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.5s ease-out;
}

.odometer-needle {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 80px;
  background: var(--primary);
  border-radius: 3px;
  transform: translateX(-50%);
  transition: left 0.5s ease-out;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.odometer-needle::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
}

.odometer-counts {
  display: flex;
  justify-content: space-between;
  font-size: 48px;
  font-weight: 800;
  margin-top: 20px;
}

.no-count {
  color: var(--danger);
}

.yes-count {
  color: var(--success);
}

.total-votes {
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 24px;
}

/* Hand Raise Results */
.hand-raise-results {
  padding: 40px;
}

.result-bars {
  max-width: 600px;
  margin: 0 auto;
}

.result-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.result-bar .bar-label {
  width: 60px;
  font-size: 24px;
  font-weight: 700;
}

.result-bar.yes-bar .bar-label {
  color: var(--success);
}

.result-bar.no-bar .bar-label {
  color: var(--danger);
}

.result-bar .bar-fill {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  margin: 0 16px;
  transition: width 0.5s ease-out;
}

.result-bar.yes-bar .bar-fill {
  background: var(--success);
}

.result-bar.no-bar .bar-fill {
  background: var(--danger);
}

.result-bar .bar-count {
  width: 120px;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
}

/* Mobile Poll Inputs */
.free-text-poll,
.private-average-poll {
  padding: 20px;
}

.poll-input {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

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

.poll-input-number {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.poll-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.poll-submit-btn:hover {
  background: var(--primary-light);
}

.poll-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.poll-timer {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.poll-timer.warning {
  color: var(--danger);
}

.free-text-confirm {
  text-align: center;
  color: var(--success);
  font-weight: 600;
  padding: 12px;
}

/* Hand Raise Mobile */
.hand-raise-poll {
  padding: 20px;
}

.hand-raise-buttons {
  display: flex;
  gap: 20px;
}

.hand-raise-btn {
  flex: 1;
  padding: 40px 20px;
  font-size: 28px;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.hand-raise-btn:active {
  transform: scale(0.95);
}

.hand-raise-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hand-raise-btn.yes-btn {
  background: var(--success);
  color: white;
}

.hand-raise-btn.no-btn {
  background: var(--danger);
  color: white;
}

.hand-raise-btn.selected {
  box-shadow: 0 0 0 4px var(--primary);
}

/* Admin Moderation Panel */
.moderation-panel {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 12px;
}

.moderation-panel h4 {
  margin-bottom: 12px;
  color: var(--primary);
}

.poll-timer-admin {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--primary);
}

.moderation-answer-list {
  max-height: 300px;
  overflow-y: auto;
}

.moderation-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
}

.moderation-country {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(0, 30, 97, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.moderation-text {
  flex: 1;
  font-size: 14px;
}

.moderation-remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moderation-remove-btn:hover {
  background: #dc2626;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* External Mode */
#externalMode {
  justify-content: center;
  align-items: center;
}

.external-wrapper {
  text-align: center;
}

.external-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.external-icon svg {
  width: 100px;
  height: 100px;
  stroke: var(--primary);
}

.external-wrapper h2 {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
}

.external-presenter {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 32px;
}

.external-note {
  font-size: 20px;
  color: var(--text-secondary);
}

/* Break Mode */
#breakMode {
  justify-content: center;
  align-items: center;
}

.break-wrapper {
  text-align: center;
}

#breakMode .break-icon svg {
  width: 120px;
  height: 120px;
}

.break-wrapper h2 {
  font-size: 56px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 40px;
}

.break-countdown {
  margin-bottom: 40px;
}

.break-time {
  font-family: 'Orbitron', monospace;
  font-size: 140px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.break-separator {
  animation: blink 1s step-end infinite;
}

#breakMode .break-label {
  font-size: 24px;
  margin-top: 16px;
}

.break-message {
  font-size: 24px;
  color: var(--text-secondary);
}

/* Display Admin Controls */
.admin-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 20px;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

.admin-controls.hidden {
  opacity: 0;
  pointer-events: none;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.control-item .key {
  background: var(--bg-card);
  border: 1px solid #E0E0E0;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==================================================
   MOBILE APP STYLES
   ================================================== */

/* App Header */
.app-header {
  height: var(--header-height);
  background: var(--primary);
  color: white;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* Admin header with centered status */
.admin-header-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}

.admin-header-layout .header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-layout .header-title {
  font-size: 16px;
  font-weight: 700;
}

.admin-header-layout .header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-layout .header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.attendee-count-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.attendee-count-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.attendee-count-btn .icon-inline {
  width: 16px;
  height: 16px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: white;
  font-size: 15px;
  font-weight: 700;
}

.user-title {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

.user-team {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-menu {
  position: relative;
}

.menu-toggle {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.menu-toggle:active {
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.menu-item:active {
  background: var(--bg-light);
}

.menu-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
}

.menu-item.danger {
  color: var(--danger);
}

.menu-item.danger svg {
  stroke: var(--danger);
}

.btn-danger {
  background: var(--danger) !important;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.logout-btn:active {
  transform: scale(0.95);
}

/* Screen States */
.screen-state {
  display: none;
  height: 100%;
}

.screen-state.active {
  display: flex;
  flex-direction: column;
}

/* Waiting State */
#screenWaiting {
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-light) 0%, white 100%);
  padding: 24px;
  padding-bottom: calc(var(--tab-height) + 24px);
}

.waiting-content {
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.waiting-message {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-loader {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
}

.mobile-loader .loader-logo {
  width: 48px;
  height: 48px;
}

.mobile-loader .loader-ring-1 {
  width: 80px;
  height: 80px;
}

.mobile-loader .loader-ring-2 {
  width: 100px;
  height: 100px;
}

.pulse-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 30, 97, 0.1);
  margin: 0 auto 20px;
  animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.waiting-message .status-text {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Poll State */
#screenPoll {
  padding: 24px;
  padding-bottom: calc(var(--tab-height) + 24px);
  background: linear-gradient(180deg, #FFF7E6 0%, white 100%);
}

.poll-container {
  max-width: 400px;
  margin: 0 auto;
}

.poll-submitted {
  text-align: center;
  padding: 24px;
}

.poll-submitted .check-icon {
  width: 60px;
  height: 60px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}

.poll-submitted p {
  font-size: 16px;
  font-weight: 600;
  color: var(--success);
}

/* Race State */
#screenRace {
  background: linear-gradient(180deg, #1A1A2E 0%, #2D3047 100%);
  padding: 20px;
  padding-bottom: calc(var(--tab-height) + 20px);
}

.race-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.race-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.timer {
  font-size: 48px;
  font-weight: 900;
  color: white;
  text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

.rank-display {
  text-align: right;
}

.rank-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  display: block;
  letter-spacing: 2px;
}

.rank-number {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
}

.shake-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.shake-indicator {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.shake-indicator.shaking {
  animation: shake-bounce 0.15s ease infinite;
}

@keyframes shake-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.shake-horse {
  font-size: 56px;
  z-index: 2;
}

.shake-waves {
  position: absolute;
  inset: 0;
}

.shake-waves .wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 53, 0.5);
  animation: wave-expand 1.5s ease infinite;
}

.shake-waves .wave:nth-child(2) { animation-delay: 0.5s; }
.shake-waves .wave:nth-child(3) { animation-delay: 1s; }

@keyframes wave-expand {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.shake-instruction {
  color: white;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tap-button {
  background: var(--secondary);
  border: none;
  border-radius: 20px;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 30px rgba(255, 107, 53, 0.5);
}

.tap-button:active {
  transform: scale(0.95);
}

.progress-section {
  margin-top: 20px;
}

.progress-bar {
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
  border-radius: 12px;
  width: 0%;
  transition: width 0.2s ease;
}

.progress-horse {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  left: 0%;
  transition: left 0.2s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  margin-top: 8px;
}

.shake-stats {
  margin-top: 16px;
  text-align: center;
}

.shake-stats .stat-value {
  font-size: 32px;
  font-weight: 900;
  color: white;
}

.shake-stats .stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  display: block;
}

/* Countdown State */
#screenCountdown {
  background: var(--primary);
  justify-content: center;
  align-items: center;
}

/* Results State */
#screenResults {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D3047 100%);
  padding: 24px;
  padding-bottom: calc(var(--tab-height) + 24px);
  justify-content: center;
  align-items: center;
}

/* Break State */
#screenBreak {
  background: linear-gradient(180deg, #FFF7E6 0%, #FFE4CC 100%);
  justify-content: center;
  align-items: center;
  padding-bottom: calc(var(--tab-height) + 24px);
}

/* External State */
#screenExternal {
  background: linear-gradient(180deg, var(--bg-light) 0%, white 100%);
  justify-content: center;
  align-items: center;
  padding: 24px;
  padding-bottom: calc(var(--tab-height) + 24px);
}

.external-container {
  text-align: center;
}

.external-container h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.presenter-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Mobile Slide Content */
.slide-container {
  padding: 24px;
  padding-bottom: calc(var(--tab-height) + 24px);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Mobile slide indicator override */
.slide-container .slide-indicator {
  background: var(--primary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 24px;
}

.slide-container .slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-title-content {
  text-align: center;
}

.slide-title-content h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.slide-title-content p {
  font-size: 16px;
  color: var(--text-secondary);
}

.slide-bullets-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.slide-bullets-content ul {
  list-style: none;
  padding: 0;
}

.slide-bullets-content li {
  padding: 12px 0;
  padding-left: 24px;
  position: relative;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}

.slide-bullets-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 20px;
}

.slide-image-content {
  text-align: center;
}

.slide-image-content img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 16px;
  object-fit: cover;
}

.slide-image-content .caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.slide-default-content {
  text-align: center;
  padding: 40px;
}

.slide-default-content p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ==================================================
   ADMIN CONTROLLER STYLES
   ================================================== */

/* Admin Header */
.admin-header {
  height: var(--header-height);
  background: var(--primary);
  color: white;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.admin-header h1 {
  font-size: 18px;
  font-weight: 700;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.user-title .mode-badge {
  font-size: 10px;
  padding: 2px 8px;
  margin-right: 8px;
}

.user-title .attendee-count {
  font-size: 11px;
  opacity: 0.8;
}

.attendee-count {
  font-size: 13px;
}

/* Controls Scroll */
.controls-scroll {
  padding: 12px;
  padding-bottom: calc(var(--tab-height) + 20px);
}

/* Control Sections */
.control-section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.control-section h2 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Mode Buttons */
.mode-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mode-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.mode-btn.active {
  border-color: var(--primary);
  background: rgba(0,30,97,0.05);
}

.mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.mode-icon svg {
  width: 24px;
  height: 24px;
}

.mode-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mode-btn.active .mode-label {
  color: var(--primary);
}

/* Presentation Controls */
.presentation-selector select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--bg-light);
  margin-bottom: 12px;
}

.slide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nav-btn {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.nav-btn:disabled {
  opacity: 0.3;
}

/* New slide controller styles */
.slide-counter-large {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}

.slide-counter-large .current-slide {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary);
}

.slide-counter-large .slide-separator {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slide-counter-large .total-slides {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-secondary);
}

.next-slide-btn {
  width: 100%;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(0, 30, 97, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.next-slide-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 30, 97, 0.3);
}

.next-slide-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.next-slide-btn svg {
  width: 28px;
  height: 28px;
}

.slide-nav-compact {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.nav-btn-compact {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.15s;
}

.nav-btn-compact:active {
  background: var(--border);
}

.nav-btn-compact:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn-compact svg {
  width: 18px;
  height: 18px;
}

.slide-counter {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.slide-preview {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.preview-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.presenter-notes {
  margin-top: 8px;
  text-align: left;
}

.presenter-notes-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.presenter-notes-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  resize: vertical;
}

.presenter-notes-input::placeholder {
  color: rgba(0, 0, 0, 0.20);
}

.presenter-notes-input:disabled {
  background: var(--bg-track);
  color: var(--text-secondary);
}

.presenter-notes-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.presenter-notes-status {
  font-size: 11px;
  color: var(--text-secondary);
  min-height: 14px;
}

.presenter-notes-status.is-saving {
  color: var(--warning);
}

.presenter-notes-status.is-saved {
  color: var(--success);
}

.presenter-notes-status.is-error {
  color: var(--danger);
}

.presenter-notes-status.is-offline {
  color: var(--text-secondary);
}

.presenter-notes-save {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.presenter-notes-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preview-type {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Activity Buttons */
.activity-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.activity-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 4px;
  cursor: pointer;
  text-align: center;
}

.activity-btn.warning {
  border-color: var(--warning);
}

.activity-btn:disabled {
  opacity: 0.4;
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.activity-icon svg {
  width: 24px;
  height: 24px;
}

.activity-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.video-time-display {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.video-time-separator {
  margin: 0 6px;
}

/* Candidate Poll Status */
.candidate-poll-status {
  text-align: center;
}

.vote-count-display {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.vote-count-number {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.vote-count-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.candidate-poll-status .activity-buttons {
  grid-template-columns: 1fr;
}

/* Duration Picker */
.duration-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.duration-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.duration-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

.break-actions {
  display: flex;
  gap: 8px;
}

.break-actions .btn-primary,
.break-actions .btn-secondary {
  flex: 1;
}

/* Admin Buttons */
.control-section .btn-primary {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
}

.control-section .btn-secondary {
  background: var(--bg-light);
  padding: 10px 16px;
  font-size: 13px;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.action-btn.warning {
  border-color: var(--danger);
  color: var(--danger);
}

/* Inputs */
.control-section input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
}

.control-section input[type="text"]:focus {
  border-color: var(--primary);
}

/* Attendees Tab */
.attendees-header {
  padding: 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.attendees-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.summary-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.summary-stat .stat-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.summary-stat .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.attendees-list {
  padding: 12px;
  padding-bottom: calc(var(--tab-height) + 20px);
}

.attendee-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.attendee-row.connected {
  border-left: 3px solid var(--success);
}

.attendee-row.disconnected {
  border-left: 3px solid var(--warning);
  opacity: 0.7;
}

.attendee-row.offline {
  opacity: 0.5;
}

.attendee-row .attendee-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attendee-row .attendee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attendee-row .attendee-info {
  flex: 1;
  min-width: 0;
}

.attendee-row .attendee-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendee-row .attendee-meta {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendee-row .attendee-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Admin status text override */
.attendee-row .status-text {
  font-size: 9px;
  color: var(--text-secondary);
}

/* ==================================================
   RESPONSIVE
   ================================================== */

@media (max-width: 360px) {
  .mode-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================================================
   CANDIDATE SELECTION - DISPLAY STYLES
   ================================================== */

.candidate-selection-display {
  text-align: center;
  padding: 40px;
}

.candidate-options-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.candidate-option-display {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 32px;
  min-height: 80px;
  box-sizing: border-box;
}

.candidate-letter {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.candidate-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.submission-counter {
  margin-bottom: 24px;
}

.submission-count-large {
  font-size: 96px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.submission-label {
  font-size: 24px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.candidate-hint {
  font-size: 18px;
  color: var(--text-secondary);
  font-style: italic;
}

.reset-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
  opacity: 0.6;
}

/* Candidate Selection Results */
.candidate-selection-results {
  padding: 40px;
}

.candidates-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto 32px;
}

.candidate-result {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.candidate-result.winner {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.candidate-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.candidate-letter-result {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.candidate-result.winner .candidate-letter-result {
  background: var(--gold);
  color: var(--text-primary);
}

.candidate-name-result {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.candidate-result-bar {
  height: 12px;
  background: var(--bg-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.candidate-result-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 6px;
  transition: width 0.5s ease-out;
}

.candidate-result.winner .candidate-result-fill {
  background: var(--gold);
}

.candidate-result-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.candidate-count {
  color: var(--text-secondary);
}

.candidate-percentage {
  font-weight: 700;
  color: var(--primary);
}

.candidate-result.winner .candidate-percentage {
  color: var(--gold);
}

/* ==================================================
   CANDIDATE SELECTION - MOBILE CV BROWSER
   ================================================== */

#screenCandidateSelection {
  height: 100%;
  overflow: hidden;
}

.cv-browser-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
}

/* CV Tabs */
.cv-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 12px 0;
  background: white;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.cv-tabs::-webkit-scrollbar {
  display: none;
}

.cv-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-light);
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  font-family: inherit;
  min-width: 60px;
  transition: all 0.2s ease;
}

.cv-tab.active {
  background: white;
  border-color: var(--primary);
  transform: translateY(1px);
}

.cv-tab svg {
  stroke: var(--text-secondary);
}

.cv-tab.active svg {
  stroke: var(--primary);
}

.cv-tab span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cv-tab.active span {
  color: var(--primary);
}

.cv-tab .tab-letter {
  width: 22px;
  height: 22px;
  background: var(--text-secondary);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.cv-tab.active .tab-letter {
  background: var(--primary);
}

/* CV Viewer */
.cv-viewer {
  flex: 1;
  position: relative;
  background: white;
  overflow: hidden;
}

#cvIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.cv-loading {
  position: absolute;
  inset: 0;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cv-loading p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* CV Submit Area */
.cv-submit-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--tab-height) + env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cv-submit-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
}

.cv-submit-btn.submitted {
  background: var(--text-secondary) !important;
  box-shadow: none !important;
  cursor: default;
}

/* Candidate Selection Modal */
.candidate-modal {
  max-width: 340px;
}

.candidate-modal h3 {
  margin-bottom: 8px;
}

.candidate-modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px !important;
}

.candidate-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.candidate-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.candidate-option-btn:active {
  transform: scale(0.98);
  border-color: var(--primary);
  background: rgba(0, 30, 97, 0.05);
}

.candidate-option-letter {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.candidate-option-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* App Toast */
.app-toast {
  position: fixed;
  bottom: calc(var(--tab-height) + 20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== QR OVERLAY (Display Screen) ==================== */

.qr-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.qr-overlay.active {
  display: flex;
}

.qr-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-overlay-code {
  background: white;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 32px;
}

.qr-overlay-code canvas {
  display: block;
}

.qr-overlay-instruction {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.qr-overlay-url {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Orbitron', monospace;
}

/* ==================== QR OVERLAY MODAL (Admin) ==================== */

.qr-overlay-modal .modal-content {
  text-align: center;
}

.qr-modal-icon svg {
  width: 64px;
  height: 64px;
  stroke: var(--primary);
}

/* Disabled state for slide controller during QR overlay */
.control-section.disabled,
#slideController.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ==================== SCHEDULE DONE/CURRENT STATES ==================== */

/* Schedule item done state (greyed out) */
.schedule-item.done {
  opacity: 0.5;
}

.schedule-item.done .schedule-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* Schedule item current state (highlighted) */
.schedule-item.current {
  background: rgba(0, 30, 97, 0.08);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin-left: -4px;
}

.schedule-item.current .schedule-title {
  color: var(--primary);
  font-weight: 700;
}

/* Schedule status badges */
.schedule-status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: auto;
}

.schedule-status-badge.current {
  background: var(--primary);
  color: white;
}

.schedule-status-badge.done {
  background: var(--success);
  color: white;
  padding: 4px 6px;
}

.schedule-status-badge.done svg {
  stroke: white;
}

/* ==================== MARK DONE BUTTON ==================== */

.mark-done-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  margin-top: 12px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 12px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mark-done-btn svg {
  stroke: var(--primary);
}

.mark-done-btn:active {
  background: rgba(0, 30, 97, 0.1);
}

.mark-done-btn:disabled {
  background: var(--bg-light);
  border-color: var(--text-secondary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.mark-done-btn:disabled svg {
  stroke: var(--text-secondary);
}

.mark-done-btn:active {
  transform: scale(0.98);
}

.mark-done-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

/* ==================== SCHEDULE ACTIONS ==================== */

.schedule-actions {
  padding: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.reset-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.reset-all-btn svg {
  flex-shrink: 0;
}

/* ==================== DISPLAY DISCONNECTED OVERLAY ==================== */

.display-disconnected-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 30, 97, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.display-disconnected-overlay.active {
  opacity: 1;
  visibility: visible;
}

.display-disconnected-overlay .overlay-content {
  text-align: center;
  color: white;
  padding: 32px;
}

.display-disconnected-overlay .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

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

.display-disconnected-overlay p {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.display-disconnected-overlay .overlay-hint {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}
