:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #f59e0b;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Размеры видео по умолчанию (medium) */
  --video-width: 720px;
  --video-height: 540px;
  --local-width: 240px;
  --local-height: 180px;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.app-container {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/* Screens */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* Start screen specific - needs padding for content */
#start-screen {
  padding: 20px;
  overflow-y: auto;
}

/* Waiting screen specific */
#waiting-screen {
  padding: 20px;
  overflow-y: auto;
}

/* ========== START SCREEN REDESIGN ========== */
.start-content {
  text-align: center;
  max-width: 700px;
  width: 100%;
  position: relative;
  z-index: 2;
  padding: 20px;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-shrink: 0;
  animation: fadeInDown 0.8s ease-out;
}

/* Particles */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(165, 180, 252, 0.8), transparent);
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(1);
  }
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Animated background */
#start-screen {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a, #1e293b);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 50% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* Floating orbs */
#start-screen::before,
#start-screen::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: floatOrb 25s ease-in-out infinite;
  z-index: 1;
}

#start-screen::before {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  top: -150px;
  left: -150px;
}

#start-screen::after {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, #06b6d4, #6366f1, #8b5cf6);
  bottom: -150px;
  right: -150px;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, -60px) scale(1.15); }
  50% { transform: translate(-40px, 40px) scale(0.9); }
  75% { transform: translate(60px, 80px) scale(1.05); }
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-icon {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  box-shadow: 
    0 25px 50px rgba(99, 102, 241, 0.4),
    0 0 60px rgba(99, 102, 241, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  animation: logoFloat 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  color: #a5b4fc;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
  transform: translate(-50%, -50%);
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}

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

.logo-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: rotate(45deg);
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes logoFloat {
  0%, 100% { 
    transform: translateY(0) rotate(0deg);
    box-shadow: 
      0 30px 60px rgba(99, 102, 241, 0.4),
      0 0 80px rgba(99, 102, 241, 0.2),
      inset 0 2px 0 rgba(255, 255, 255, 0.2);
  }
  50% { 
    transform: translateY(-20px) rotate(3deg);
    box-shadow: 
      0 40px 80px rgba(99, 102, 241, 0.5),
      0 0 100px rgba(99, 102, 241, 0.3),
      inset 0 2px 0 rgba(255, 255, 255, 0.3);
  }
}

.logo h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #c7d2fe, #a5b4fc, #6366f1);
  background-size: 200% 200%;
  animation: textGradient 5s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

@keyframes textGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 300;
  line-height: 1.5;
  animation: fadeIn 1s ease-out 0.3s both;
  flex-shrink: 0;
}

.tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-bottom: 32px;
  font-weight: 400;
  letter-spacing: 0.02em;
  animation: fadeIn 1s ease-out 0.5s both;
  flex-shrink: 0;
}

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

.start-actions {
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  flex-shrink: 0;
}

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

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  background-size: 200% 200%;
  color: white;
  box-shadow: 
    0 15px 35px rgba(99, 102, 241, 0.5),
    0 5px 15px rgba(99, 102, 241, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  border: none;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 
    0 20px 45px rgba(99, 102, 241, 0.6),
    0 8px 20px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-4px) scale(1.02);
}

.btn-primary:active {
  transform: translateY(-2px) scale(1);
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s, opacity 0.6s;
  opacity: 0;
}

.btn-primary:active .btn-ripple {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: none;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
  color: rgba(255, 255, 255, 0.5);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.join-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.8s ease-out 0.6s both;
  flex-shrink: 0;
}

.join-section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.join-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.join-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.join-form input:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.2),
    0 0 20px rgba(99, 102, 241, 0.1);
}

.join-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ========== FEATURE CARDS ========== */
.features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  animation: fadeIn 1s ease-out 0.8s both;
  flex-shrink: 0;
  width: 100%;
}

.feature-card {
  flex: 1;
  max-width: 200px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(99, 102, 241, 0.2),
    0 0 30px rgba(99, 102, 241, 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #a5b4fc;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.feature-text {
  text-align: center;
  position: relative;
  z-index: 1;
}

.feature-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  transition: color 0.3s;
}

.feature-text p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .start-content {
    max-width: 90%;
    padding: 30px 15px;
  }

  .logo-icon {
    width: 90px;
    height: 90px;
    font-size: 42px;
    border-radius: 24px;
  }

  .logo h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .tagline {
    font-size: 0.85rem;
    margin-bottom: 36px;
  }

  .btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: 14px;
    width: 100%;
  }

  .join-section {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .join-form {
    flex-direction: column;
    gap: 10px;
  }

  .join-form input {
    padding: 14px 16px;
  }

  .btn-secondary {
    justify-content: center;
    padding: 14px 24px;
  }

  .features {
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
    padding-top: 36px;
  }

  .feature-card {
    max-width: 100%;
    flex-direction: row;
    padding: 20px;
    gap: 16px;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    font-size: 24px;
    border-radius: 12px;
  }

  .feature-text {
    text-align: left;
  }

  .feature-text h3 {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .feature-text p {
    font-size: 0.8rem;
  }

  /* Grid overlay less visible on mobile */
  .grid-overlay {
    background-size: 30px 30px;
  }

  /* Smaller orbs on mobile */
  #start-screen::before {
    width: 300px;
    height: 300px;
    top: -80px;
    left: -80px;
  }

  #start-screen::after {
    width: 250px;
    height: 250px;
    bottom: -80px;
    right: -80px;
  }
}

@media (max-width: 480px) {
  .start-content {
    max-width: 95%;
    padding: 20px 10px;
  }

  .logo-icon {
    width: 80px;
    height: 80px;
    font-size: 36px;
    border-radius: 20px;
  }

  .logo h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .tagline {
    font-size: 0.75rem;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .features {
    gap: 12px;
    margin-top: 36px;
    padding-top: 28px;
  }

  .feature-card {
    padding: 16px;
    gap: 12px;
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 20px;
  }

  .feature-text h3 {
    font-size: 0.95rem;
  }

  .feature-text p {
    font-size: 0.75rem;
  }
}

/* ========== CALL SCREEN MOBILE ========== */
@media (max-width: 1024px) {
  .call-layout {
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    gap: 8px;
  }

  .video-panel {
    flex: 1;
    min-height: 0;
    border-radius: 12px;
  }

  .side-panel {
    width: 100%;
    max-width: 100%;
    height: 45vh;
    min-height: 200px;
    border-radius: 12px;
  }

  .remote-window {
    width: 100%;
    height: 100%;
  }

  .local-window {
    width: 140px;
    height: 105px;
  }
}

@media (max-width: 768px) {
  #call-screen {
    padding: 0;
  }

  .call-layout {
    gap: 6px;
  }

  .video-panel {
    min-height: 0;
    flex: 1;
    border-radius: 10px;
  }

  .side-panel {
    width: 100%;
    max-width: 100%;
    height: 50vh;
    border-radius: 10px;
  }

  .remote-window {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }

  .local-window {
    width: 120px;
    height: 90px;
    bottom: 10px;
    right: 10px;
  }

  .window-header {
    padding: 8px 10px;
  }

  .window-title {
    font-size: 12px;
  }

  .win-btn {
    width: 24px;
    height: 24px;
  }

  /* Controls bar mobile */
  .controls-bar {
    padding: 10px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .control-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* Chat mobile */
  .chat-messages {
    padding: 12px;
  }

  .chat-message .msg-bubble {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .video-panel {
    border-radius: 8px;
  }

  .side-panel {
    height: 55vh;
    border-radius: 8px;
  }

  .local-window {
    width: 100px;
    height: 75px;
    bottom: 8px;
    right: 8px;
  }

  .controls-bar {
    gap: 4px;
    padding: 8px;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .panel-tabs {
    flex-wrap: nowrap;
  }

  .tab-btn {
    padding: 10px 6px;
    font-size: 11px;
  }
}

/* ========== WAITING SCREEN ========== */
#waiting-screen {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.waiting-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  transform: translate(-50%, -50%);
  animation: bgGlow 4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes bgGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.15); }
}

.waiting-content {
  max-width: 520px;
  width: 100%;
  position: relative;
  z-index: 2;
  padding: 20px;
}

.waiting-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: cardFadeIn 0.6s ease-out;
}

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

.waiting-header {
  text-align: center;
  margin-bottom: 28px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Camera animation - restored */
.waiting-animation {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-animation i {
  font-size: 44px;
  color: #a5b4fc;
  z-index: 1;
  position: relative;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

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

.waiting-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: white;
  margin: 0;
  background: linear-gradient(135deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.waiting-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.share-section {
  margin-bottom: 24px;
}

.share-label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-link-display {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 5px;
  transition: all 0.3s ease;
}

.share-link-display:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.share-link-display:focus-within {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.share-input {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: 'Inter', monospace;
  outline: none;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.copy-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

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

.copy-btn.copied {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.copy-feedback {
  display: block;
  margin-top: 6px;
  color: #22c55e;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
  height: 16px;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 10px;
  margin-bottom: 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
  }
}

.status-text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  font-weight: 500;
}

.cancel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.cancel-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15);
}

.cancel-btn:active {
  transform: translateY(0);
}

/* ========== WAITING SCREEN MOBILE ========== */
@media (max-width: 768px) {
  .waiting-content {
    max-width: 95%;
    padding: 15px;
  }

  .waiting-card {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .waiting-header {
    min-height: 120px;
    margin-bottom: 20px;
  }

  .waiting-animation {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
  }

  .waiting-animation i {
    font-size: 36px;
  }

  .waiting-header h2 {
    font-size: 1.4rem;
  }

  .waiting-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .share-link-display {
    gap: 6px;
  }

  .copy-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .share-input {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .waiting-status {
    padding: 10px;
  }

  .status-text {
    font-size: 0.75rem;
  }

  .cancel-btn {
    padding: 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .waiting-card {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .waiting-header {
    min-height: 110px;
  }

  .waiting-animation {
    width: 70px;
    height: 70px;
  }

  .waiting-animation i {
    font-size: 30px;
  }

  .waiting-header h2 {
    font-size: 1.25rem;
  }

  .waiting-description {
    font-size: 0.85rem;
  }

  .share-label {
    font-size: 0.7rem;
  }

  .copy-btn {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

/* ========== MODAL MOBILE ========== */
@media (max-width: 768px) {
  .modal {
    padding: 24px;
    max-width: 90%;
    border-radius: 16px;
  }

  .modal-icon {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-description {
    font-size: 14px;
  }

  .modal-timer {
    font-size: 24px;
    padding: 10px;
  }

  .modal-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--surface-light);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.125rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface-light);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  background: var(--border);
}

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

.btn-danger:hover {
  background: var(--danger-dark);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 14px;
}

/* Waiting Screen */
.waiting-content {
  text-align: center;
  max-width: 480px;
}

.waiting-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-animation i {
  font-size: 48px;
  color: var(--primary-light);
  z-index: 1;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }

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

.waiting-content h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.waiting-content p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.share-link {
  margin-bottom: 24px;
}

.link-display {
  display: flex;
  gap: 8px;
  background: var(--surface);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.link-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-family: monospace;
}

.link-input:focus {
  outline: none;
}

.feedback {
  display: block;
  margin-top: 8px;
  color: var(--success);
  font-size: 0.875rem;
  opacity: 0;
  transition: var(--transition);
}

.feedback.show {
  opacity: 1;
}

/* ========== CALL SCREEN ========== */
#call-screen {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: var(--background);
  overflow: hidden;
}

#call-screen.active {
  overflow: hidden;
}

.call-layout {
  display: flex;
  gap: 12px;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* Video Panel */
.video-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  height: 100%;
}

/* Video Windows */
.video-window {
  position: absolute;
  background: var(--background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: width 0.3s, height 0.3s;
}

.remote-window {
  width: var(--video-width);
  height: var(--video-height);
}

.local-window {
  width: var(--local-width);
  height: var(--local-height);
  bottom: 20px;
  right: 20px;
  z-index: 5;
  transition: all 0.3s ease;
}

.video-window.maximized {
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  border-radius: 0;
  z-index: 100 !important;
}

.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.window-title i {
  color: var(--primary-light);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.win-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--surface-light);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.win-btn:hover {
  background: var(--border);
  color: var(--text);
}

.window-content {
  position: relative;
  width: 100%;
  height: calc(100% - 42px);
  background: var(--background);
}

.window-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
}

.video-placeholder i {
  font-size: 64px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.video-placeholder span {
  display: block;
  font-size: 1rem;
}

.video-window.has-video .video-placeholder {
  display: none;
}

/* Resize Handle */
.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 10;
}

.resize-handle::before {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  opacity: 0.5;
}

/* ========== SIDE PANEL ========== */
.side-panel {
  width: 320px;
  min-width: 280px;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* Tabs */
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.1);
}

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

.chat-badge {
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.panel-tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
}

.panel-tab-content.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: msgFadeIn 0.3s ease;
}

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

.chat-message.remote {
  align-self: flex-start;
}

.chat-message.local {
  align-self: flex-end;
}

.chat-message .msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.remote .msg-bubble {
  background: var(--surface-light);
  border-bottom-left-radius: 4px;
}

.chat-message.local .msg-bubble {
  background: var(--primary);
  border-bottom-right-radius: 4px;
}

.chat-message .msg-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.chat-message.local .msg-time {
  text-align: right;
}

.chat-message .msg-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
  font-size: 13px;
}

.chat-message .msg-file:hover {
  background: rgba(0,0,0,0.3);
}

.chat-message .msg-file i {
  font-size: 18px;
}

.chat-system {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 8px;
  font-style: italic;
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--primary);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--background);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.chat-icon-btn:hover {
  background: var(--surface-light);
  color: var(--text);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.chat-send-btn:hover {
  background: var(--primary-dark);
}

/* File transfer progress */
.file-transfer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.file-transfer .progress-bar {
  width: 100%;
  height: 4px;
  background: var(--surface-light);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.file-transfer .progress-bar .fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.2s;
}

/* Record status */
.record-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.record-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: recordPulse 1s ease-in-out infinite;
}

@keyframes recordPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

#record-timer {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #ef4444;
}

.screen-share-btn.recording {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
  animation: recordPulse 1.5s ease-in-out infinite;
}

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.hangup-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
  color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.warning-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  color: #f59e0b;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.success-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
  color: #22c55e;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

.info-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.1));
  color: #6366f1;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.modal-description {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-timer {
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary-light);
  padding: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-btn:hover {
  transform: translateY(-2px);
}

.modal-btn:active {
  transform: translateY(0);
}

.modal-btn-secondary {
  background: var(--surface-light);
  color: var(--text);
}

.modal-btn-secondary:hover {
  background: var(--border);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.modal-btn-danger:hover {
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.4);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.modal-btn-primary:hover {
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

/* Particles animation for modal */
.modal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  animation: modalGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes modalGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.panel-header h3 i {
  color: var(--primary-light);
}

.panel-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.room-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--background);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.room-display span {
  flex: 1;
  font-family: monospace;
  font-size: 14px;
}

.timer-display {
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 12px;
  background: var(--background);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.device-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

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

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

.device-btn.muted {
  background: var(--danger);
  border-color: var(--danger);
}

.device-btn i {
  font-size: 18px;
}

.size-presets,
.position-presets {
  display: flex;
  gap: 8px;
}

.size-btn,
.pos-btn {
  flex: 1;
  padding: 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
}

.size-btn:hover,
.pos-btn:hover {
  border-color: var(--primary);
}

.size-btn.active,
.pos-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.screen-share-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.screen-share-btn:hover {
  border-color: var(--primary);
}

.screen-share-btn.active {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--background);
}

.screen-share-btn i {
  font-size: 18px;
}

.panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

/* Form Controls */
.form-control {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

.screen.active .start-content,
.screen.active .waiting-content {
  animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
  .call-layout {
    flex-direction: column;
    height: auto;
  }
  
  .video-panel {
    min-height: 500px;
  }
  
  .side-panel {
    width: 100%;
  }
  
  :root {
    --video-width: 90%;
    --video-height: 400px;
  }
}

@media (max-width: 768px) {
  .logo h1 {
    font-size: 2rem;
  }

  .features {
    gap: 16px;
  }

  .join-form {
    flex-direction: column;
  }
  
  .call-layout {
    padding: 10px;
  }
  
  .local-window {
    width: 160px !important;
    height: 120px !important;
  }
}
