:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  --color-bg-body: #171717;
  --color-text-primary: #f5f7ff;
  --color-text-muted: #e0e3eb;
  --color-text-faint: rgba(255, 255, 255, 0.65);
  --color-text-accent: #8ab4f8;
  --color-text-error: #ffb4b4;
  --color-text-warning: #f28b82;
  --color-text-info: #c3ddff;
  --color-text-soft: rgba(255, 255, 255, 0.85);
  --color-text-subtle: rgba(255, 255, 255, 0.6);
  --color-panel-bg: #1d1d1d;
  --color-panel-border: #5f6368;
  --color-surface-muted: #17191e;
  --color-surface-hover: #1d1e24;
  --color-surface-alt: #252629;
  --color-surface-strong: #1b1c21;
  --color-chip-bg: #2f3036;
  --color-modal-bg: #1d1e24;
  --color-modal-border: #5f6368;
  --color-outline: #8ab4f8;
  --color-border-subtle: #5f6368;
  --color-border-strong: #5f6368;
  --color-input-bg: #17191e;
  --color-input-border: #5f6368;
  --color-empty-state: rgba(255, 255, 255, 0.65);
  --color-hint: rgba(255, 255, 255, 0.75);
  --shadow-panel: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 8px 20px rgba(14, 165, 233, 0.2);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.6);
  --overlay-scrim: rgba(0, 0, 0, 0.7);
}

[data-theme='dark'] {
  color-scheme: dark;
}

[data-theme='light'] {
  color-scheme: light;
  --color-bg-body: #f5f7fb;
  --color-text-primary: #1b1c21;
  --color-text-muted: #475467;
  --color-text-faint: rgba(27, 28, 33, 0.55);
  --color-text-accent: #3366d6;
  --color-text-error: #c0352b;
  --color-text-warning: #d97706;
  --color-text-info: #265dc9;
  --color-text-soft: rgba(27, 28, 33, 0.75);
  --color-text-subtle: rgba(27, 28, 33, 0.5);
  --color-panel-bg: #ffffff;
  --color-panel-border: #d0d5dd;
  --color-surface-muted: #f3f5fb;
  --color-surface-hover: #e7ecf8;
  --color-surface-alt: #e7e9ee;
  --color-surface-strong: #ffffff;
  --color-chip-bg: #eef2f9;
  --color-modal-bg: #ffffff;
  --color-modal-border: #cfd4de;
  --color-outline: #3366d6;
  --color-border-subtle: #d0d5dd;
  --color-border-strong: #c3cad4;
  --color-input-bg: #f6f7fb;
  --color-input-border: #cfd4de;
  --color-empty-state: rgba(27, 28, 33, 0.55);
  --color-hint: rgba(27, 28, 33, 0.65);
  --shadow-panel: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-elevated: 0 18px 36px rgba(37, 99, 235, 0.12);
  --shadow-modal: 0 30px 80px rgba(15, 23, 42, 0.18);
  --overlay-scrim: rgba(15, 23, 42, 0.35);
}

[data-theme='light'] .screen-placeholder {
  background: rgba(245, 247, 251, 0.88);
  color: var(--color-text-muted);
}

[data-theme='light'] .remote-pointer-indicator {
  background: rgba(220, 38, 38, 0.82);
  border-color: rgba(255, 255, 255, 0.95);
}

[data-theme='rgb'] {
  color-scheme: dark;
  --color-bg-body: #0a0a0f;
  --color-text-primary: #ffffff;
  --color-text-muted: #e0e0e0;
  --color-text-faint: rgba(255, 255, 255, 0.7);
  --color-text-accent: #00ffff;
  --color-text-error: #ff0080;
  --color-text-warning: #ff6b00;
  --color-text-info: #00d4ff;
  --color-text-soft: rgba(255, 255, 255, 0.9);
  --color-text-subtle: rgba(255, 255, 255, 0.65);
  --color-panel-bg: #0f0f14;
  --color-panel-border: #ff00ff;
  --color-surface-muted: #0d0d12;
  --color-surface-hover: #15151a;
  --color-surface-alt: #12121a;
  --color-surface-strong: #0e0e16;
  --color-chip-bg: #1a1a24;
  --color-modal-bg: #0f0f14;
  --color-modal-border: #00ffff;
  --color-outline: #00ffff;
  --color-border-subtle: #ff00ff;
  --color-border-strong: #00ffff;
  --color-input-bg: #0d0d12;
  --color-input-border: #ff00ff;
  --color-empty-state: rgba(255, 255, 255, 0.7);
  --color-hint: rgba(255, 255, 255, 0.8);
  --shadow-panel: 0 0 30px rgba(255, 0, 255, 0.3), 0 0 60px rgba(0, 255, 255, 0.2);
  --shadow-elevated: 0 0 40px rgba(255, 0, 255, 0.4), 0 0 80px rgba(0, 255, 255, 0.3);
  --shadow-modal: 0 0 100px rgba(255, 0, 255, 0.5);
  --overlay-scrim: rgba(0, 0, 0, 0.85);
  animation: rgb-gradient-shift 8s ease-in-out infinite;
}

@keyframes rgb-gradient-shift {
  0%, 100% {
    background: linear-gradient(135deg, #0a0a0f 0%, #150a1f 50%, #0a0a0f 100%);
  }
  25% {
    background: linear-gradient(135deg, #0a0a0f 0%, #0a1f1f 50%, #0a0a0f 100%);
  }
  50% {
    background: linear-gradient(135deg, #0a0a0f 0%, #1f0a1f 50%, #0a0a0f 100%);
  }
  75% {
    background: linear-gradient(135deg, #0a0a0f 0%, #1f1f0a 50%, #0a0a0f 100%);
  }
}

[data-theme='rgb'] body {
  background: linear-gradient(135deg, #0a0a0f 0%, #150a1f 50%, #0a0a0f 100%);
  background-size: 400% 400%;
  animation: rgb-gradient-shift 8s ease-in-out infinite;
}

[data-theme='rgb'] main {
  border: 2px solid;
  border-image: linear-gradient(135deg, #ff00ff, #00ffff, #ff00ff) 1;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(255, 0, 255, 0.1);
  animation: rgb-border-pulse 3s ease-in-out infinite;
}

@keyframes rgb-border-pulse {
  0%, 100% {
    border-image: linear-gradient(135deg, #ff00ff, #00ffff, #ff00ff) 1;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(255, 0, 255, 0.1);
  }
  33% {
    border-image: linear-gradient(135deg, #00ffff, #ff0080, #00ffff) 1;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4), 0 0 60px rgba(255, 0, 128, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.1);
  }
  66% {
    border-image: linear-gradient(135deg, #ff0080, #00ff00, #ff0080) 1;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.4), 0 0 60px rgba(0, 255, 0, 0.3), inset 0 0 30px rgba(255, 0, 128, 0.1);
  }
}

[data-theme='rgb'] h1,
[data-theme='rgb'] h2,
[data-theme='rgb'] h3 {
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff0080, #00ff00, #ff00ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rgb-text-shine 4s linear infinite;
}

@keyframes rgb-text-shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

[data-theme='rgb'] section {
  border: 2px solid;
  border-image: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff) 1;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.2);
  animation: rgb-section-glow 4s ease-in-out infinite;
}

@keyframes rgb-section-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4), 0 0 60px rgba(255, 0, 255, 0.3);
  }
}

[data-theme='rgb'] button:not(:disabled) {
  background: linear-gradient(135deg, #1a0a2e, #0f1419);
  border: 2px solid;
  border-image: linear-gradient(135deg, #ff00ff, #00ffff) 1;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4), 0 0 30px rgba(0, 255, 255, 0.2);
  transition: all 200ms ease;
}

[data-theme='rgb'] button:not(:disabled):hover {
  background: linear-gradient(135deg, #2a0a3e, #0f2429);
  box-shadow: 0 0 25px rgba(255, 0, 255, 0.6), 0 0 50px rgba(0, 255, 255, 0.4);
  transform: translateY(-2px);
}

[data-theme='rgb'] button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
}

[data-theme='rgb'] textarea,
[data-theme='rgb'] input {
  border: 2px solid;
  border-image: linear-gradient(90deg, #ff00ff, #00ffff) 1;
  box-shadow: inset 0 0 15px rgba(255, 0, 255, 0.1);
}

[data-theme='rgb'] textarea:focus,
[data-theme='rgb'] input:focus {
  border-image: linear-gradient(90deg, #00ffff, #ff00ff) 1;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), inset 0 0 20px rgba(255, 0, 255, 0.2);
}

[data-theme='rgb'] .chat-line {
  border: 1px solid;
  border-image: linear-gradient(90deg, rgba(255, 0, 255, 0.5), rgba(0, 255, 255, 0.5)) 1;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

[data-theme='rgb'] .chat-line[data-role="remote"] {
  border-image: linear-gradient(90deg, rgba(0, 255, 255, 0.5), rgba(255, 0, 255, 0.5)) 1;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

[data-theme='rgb'] .screen-placeholder {
  background: rgba(10, 10, 15, 0.88);
  border: 1px solid rgba(255, 0, 255, 0.3);
}

[data-theme='rgb'] .remote-pointer-indicator {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  border: 2px solid #ffffff;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.6);
  animation: rgb-pointer-pulse 1s ease-in-out infinite;
}

@keyframes rgb-pointer-pulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8), 0 0 80px rgba(255, 0, 255, 0.6);
  }
}

[data-theme='rgb'] .tux-eye-glow {
  fill: #00ffff;
}

[data-theme='rgb'] .tux-mascot:hover .tux-eye-glow {
  opacity: 1;
  animation: rgb-tux-glow 1s ease-in-out infinite;
}

@keyframes rgb-tux-glow {
  0%, 100% {
    fill: #00ffff;
    filter: drop-shadow(0 0 10px #00ffff);
  }
  50% {
    fill: #ff00ff;
    filter: drop-shadow(0 0 15px #ff00ff);
  }
}

/* Cat Theme - Cute pastel kawaii aesthetic */
[data-theme='cat'] {
  color-scheme: light dark;
  --color-bg-body: #fff5f8;
  --color-text-primary: #4a4a4a;
  --color-text-muted: #6b6b6b;
  --color-text-faint: rgba(74, 74, 74, 0.55);
  --color-text-accent: #ff69b4;
  --color-text-error: #ff6b9d;
  --color-text-warning: #ffb347;
  --color-text-info: #87ceeb;
  --color-text-soft: rgba(74, 74, 74, 0.75);
  --color-text-subtle: rgba(74, 74, 74, 0.5);
  --color-panel-bg: #ffffff;
  --color-panel-border: #ffc0e0;
  --color-surface-muted: #fff0f5;
  --color-surface-hover: #ffe4f0;
  --color-surface-alt: #ffeef8;
  --color-surface-strong: #ffffff;
  --color-chip-bg: #ffddf0;
  --color-modal-bg: #ffffff;
  --color-modal-border: #ffb3d9;
  --color-outline: #ff69b4;
  --color-border-subtle: #ffc0e0;
  --color-border-strong: #ffaad4;
  --color-input-bg: #fff8fb;
  --color-input-border: #ffcce6;
  --color-empty-state: rgba(74, 74, 74, 0.55);
  --color-hint: rgba(74, 74, 74, 0.65);
  --shadow-panel: 0 8px 24px rgba(255, 105, 180, 0.15);
  --shadow-elevated: 0 12px 32px rgba(255, 105, 180, 0.2);
  --shadow-modal: 0 24px 60px rgba(255, 105, 180, 0.25);
  --overlay-scrim: rgba(255, 192, 203, 0.4);
}

/* Dark variant for cat theme (when system prefers dark) */
@media (prefers-color-scheme: dark) {
  [data-theme='cat'] {
    --color-bg-body: #2a1a2a;
    --color-text-primary: #ffd6e8;
    --color-text-muted: #ffb3d9;
    --color-text-faint: rgba(255, 214, 232, 0.65);
    --color-text-accent: #ff85c8;
    --color-text-error: #ff69b4;
    --color-text-warning: #ffc670;
    --color-text-info: #a8d8f0;
    --color-text-soft: rgba(255, 214, 232, 0.85);
    --color-text-subtle: rgba(255, 214, 232, 0.6);
    --color-panel-bg: #3a2a3a;
    --color-panel-border: #ff69b4;
    --color-surface-muted: #2f1f2f;
    --color-surface-hover: #3f2f3f;
    --color-surface-alt: #352535;
    --color-surface-strong: #3a2a3a;
    --color-chip-bg: #4a3a4a;
    --color-modal-bg: #3a2a3a;
    --color-modal-border: #ff85c8;
    --color-outline: #ff85c8;
    --color-border-subtle: #ff69b4;
    --color-border-strong: #ff85c8;
    --color-input-bg: #2f1f2f;
    --color-input-border: #ff69b4;
    --color-empty-state: rgba(255, 214, 232, 0.65);
    --color-hint: rgba(255, 214, 232, 0.75);
    --shadow-panel: 0 8px 24px rgba(255, 105, 180, 0.25);
    --shadow-elevated: 0 12px 32px rgba(255, 105, 180, 0.3);
    --shadow-modal: 0 24px 60px rgba(255, 105, 180, 0.4);
    --overlay-scrim: rgba(42, 26, 42, 0.7);
  }
}

[data-theme='cat'] body {
  background: linear-gradient(135deg, #fff5f8 0%, #ffe4f5 50%, #fff5f8 100%);
}

@media (prefers-color-scheme: dark) {
  [data-theme='cat'] body {
    background: linear-gradient(135deg, #2a1a2a 0%, #3a2050 50%, #2a1a2a 100%);
  }
}

[data-theme='cat'] main {
  border: 2px solid var(--color-panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow-panel);
}

/* Paw print accents for cat theme */
[data-theme='cat'] main::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 20px;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 50% 60%, var(--color-text-accent) 45%, transparent 45%),
              radial-gradient(circle at 30% 30%, var(--color-text-accent) 25%, transparent 25%),
              radial-gradient(circle at 70% 30%, var(--color-text-accent) 25%, transparent 25%),
              radial-gradient(circle at 20% 50%, var(--color-text-accent) 20%, transparent 20%),
              radial-gradient(circle at 80% 50%, var(--color-text-accent) 20%, transparent 20%);
  opacity: 0.3;
  pointer-events: none;
}

[data-theme='cat'] h1,
[data-theme='cat'] h2,
[data-theme='cat'] h3 {
  background: linear-gradient(135deg, #ff69b4, #ff85c8, #ffa8d8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

[data-theme='cat'] button:not(:disabled) {
  background: linear-gradient(135deg, #ffb3d9 0%, #ffc9e6 100%);
  border: 2px solid #ff85c8;
  color: #4a4a4a;
  border-radius: 16px;
  transition: all 0.3s ease;
}

[data-theme='cat'] button:not(:disabled):hover {
  background: linear-gradient(135deg, #ffc9e6 0%, #ffd6ec 100%);
  border-color: #ff69b4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 105, 180, 0.3);
}

[data-theme='cat'] button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

[data-theme='cat'] textarea,
[data-theme='cat'] input {
  background: var(--color-input-bg);
  border: 2px solid var(--color-input-border);
  border-radius: 12px;
  color: var(--color-text-primary);
}

[data-theme='cat'] textarea:focus,
[data-theme='cat'] input:focus {
  border-color: var(--color-outline);
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.15);
}

[data-theme='cat'] .chat-line {
  border-radius: 16px;
  background: var(--color-surface-muted);
  padding: 8px 12px;
}

[data-theme='cat'] .chat-line[data-role="remote"] {
  background: linear-gradient(135deg, #ffe4f5 0%, #fff0f8 100%);
}

[data-theme='cat'] .screen-placeholder {
  background: rgba(255, 245, 248, 0.9);
  color: var(--color-text-muted);
  border-radius: 16px;
}

[data-theme='cat'] .remote-pointer-indicator {
  background: rgba(255, 105, 180, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
}

/* Cute wiggle animation for cat theme */
@keyframes cat-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

[data-theme='cat'] .tux-mascot {
  animation: cat-wiggle 2s ease-in-out infinite;
}

[data-theme='cat'] .tux-mascot:hover {
  animation: cat-wiggle 0.5s ease-in-out infinite;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg-body);
  color: var(--color-text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  padding-top: calc(75px + 1.5rem);
  box-sizing: border-box;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}
#root {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}
main {
  width: min(1400px, 100%);
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 18px;
  background: var(--color-panel-bg);
  box-shadow: var(--shadow-panel);
  box-sizing: border-box;
  overflow-x: hidden;
}
h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  text-align: center;
  letter-spacing: 0.05em;
}
.header-with-about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
  width: 100%;
  min-height: clamp(88px, 12vw, 128px);
  padding: 0 clamp(1rem, 3vw, 2rem);
  box-sizing: border-box;
}
.app-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.app-title-icon {
  font-size: clamp(2rem, 3vw, 2.6rem);
}
.app-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-room-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.current-room {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0.75rem;
  background: var(--color-surface-alt);
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
}
.room-label {
  opacity: 0.7;
}
.room-id {
  font-weight: 600;
  color: var(--color-text-accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Navigation Menu */
.main-navigation {
  width: 100%;
  background: var(--color-panel-bg);
  border-bottom: 1px solid var(--color-panel-border);
  padding: 0;
  margin: 0;
}

.main-navigation nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.main-navigation li {
  margin: 0;
  padding: 0;
}

.main-navigation button {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  border-radius: 0;
  box-shadow: none;
  min-width: unset;
}

.main-navigation button:hover {
  background: var(--color-surface-hover);
  border-bottom-color: var(--color-outline);
}

.main-navigation button:focus-visible {
  outline: 2px solid var(--color-outline);
  outline-offset: -2px;
  background: var(--color-surface-hover);
}

.main-navigation button:active {
  background: var(--color-surface-alt);
}

.random-room-button {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}
.random-room-button:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.random-room-button:active {
  transform: translateY(0);
}
.random-room-svg {
  width: 100%;
  height: 100%;
}
.random-room-button:hover .dice-cube {
  animation: dice-rotate 600ms ease-in-out;
}
@keyframes dice-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.dice-face {
  fill: var(--color-surface-strong);
  stroke: var(--color-border-strong);
  stroke-width: 1;
}
.dice-top {
  fill: var(--color-chip-bg);
}
.dice-left {
  fill: var(--color-surface-alt);
}
.dice-right {
  fill: var(--color-surface-muted);
}
.dice-dot {
  fill: var(--color-text-primary);
}
.tux-mascot {
  position: absolute;
  top: 50%;
  left: 0;
  --tux-rest-transform: translateY(-50%);
  --tux-hover-transform: translateY(-50%) scale(1.06);
  transform: var(--tux-rest-transform);
  width: clamp(64px, 8vw, 82px);
  height: clamp(64px, 8vw, 82px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 200ms ease;
  z-index: 1;
}
.tux-mascot:hover {
  transform: var(--tux-hover-transform);
}
.tux-svg {
  width: 100%;
  height: 100%;
}
.tux-shadow {
  fill: rgba(0, 0, 0, 0.32);
  transition: opacity 150ms ease;
}
.tux-mascot:hover .tux-shadow {
  opacity: 0.55;
}
.tux-body,
.tux-head {
  fill: #1d2132;
}
.tux-face,
.tux-belly {
  fill: #f5f7ff;
}
.tux-wing {
  fill: #181b27;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 120ms ease;
}
.tux-wing.wing-left {
  transform: rotate(-18deg);
}
.tux-wing.wing-right {
  transform: rotate(18deg);
}
.tux-foot {
  fill: #f7a531;
  stroke: #d87f1a;
  stroke-width: 2;
}
.tux-beak-upper {
  fill: #f9b13a;
}
.tux-beak-lower {
  fill: #d7801a;
}
.tux-eye {
  fill: #ffffff;
  transition: fill 150ms ease;
}
.tux-pupil {
  fill: #10131c;
  transition: transform 150ms ease, fill 150ms ease;
}
.tux-eye-glow {
  fill: #ff5050;
  opacity: 0;
  transition: opacity 150ms ease;
}
.tux-brow {
  fill: #1a1e2c;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 150ms ease;
}
.tux-steam {
  fill: none;
  stroke: #ff8a8a;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: bottom center;
}
.tux-mascot:hover .wing-left {
  animation: tux-wing-left 360ms ease-in-out infinite;
}
.tux-mascot:hover .wing-right {
  animation: tux-wing-right 360ms ease-in-out infinite;
}
.tux-mascot:hover .tux-body,
.tux-mascot:hover .tux-head,
.tux-mascot:hover .tux-face,
.tux-mascot:hover .tux-belly {
  animation: tux-body-shake 140ms ease-in-out infinite;
}
.tux-mascot:hover .tux-eye {
  fill: #ffe5e5;
}
.tux-mascot:hover .tux-eye-glow {
  opacity: 0.85;
}
.tux-mascot:hover .tux-pupil {
  transform: translateY(2px) scale(0.82);
  fill: #05070c;
}
.tux-mascot:hover .brow-left {
  transform: rotate(-42deg) translate(-4px, 2px);
}
.tux-mascot:hover .brow-right {
  transform: rotate(42deg) translate(4px, 2px);
}
.tux-mascot:hover .steam-left {
  animation: tux-steam-rise 620ms ease-out infinite;
  animation-delay: 80ms;
}
.tux-mascot:hover .steam-right {
  animation: tux-steam-rise 620ms ease-out infinite;
  animation-delay: 160ms;
}

@keyframes tux-wing-left {
  0%, 100% {
    transform: rotate(-18deg);
  }
  50% {
    transform: rotate(-36deg) translateY(-3px);
  }
}
@keyframes tux-wing-right {
  0%, 100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(36deg) translateY(-3px);
  }
}
@keyframes tux-body-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1.6px);
  }
  75% {
    transform: translateX(1.6px);
  }
}
@keyframes tux-steam-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.85);
  }
  40% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(1.1);
  }
}

/* Tux Romance Animations */
.tux-animation-flower .tux-svg,
.tux-animation-diamond .tux-svg {
  overflow: visible;
}

/* Flower Animation */
.tux-animation-flower .tux-flower-bouquet {
  opacity: 0;
  transform: translateX(-10px);
  animation: flower-give 4s ease-in-out;
}

@keyframes flower-give {
  0% {
    opacity: 0;
    transform: translateX(-10px) scale(0.5);
  }
  25% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(20px) scale(1);
  }
  75% {
    opacity: 0.5;
    transform: translateX(40px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateX(50px) scale(0.5);
  }
}

.tux-animation-flower .tux-kiss-heart {
  opacity: 0;
  transform: translateY(0) scale(0.5);
  animation: kiss-heart-float 4s ease-in-out;
  animation-delay: 2s;
}

@keyframes kiss-heart-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  30% {
    opacity: 1;
    transform: translateY(-15px) scale(1.2);
  }
  70% {
    opacity: 0.8;
    transform: translateY(-25px) scale(1) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-35px) scale(0.6) rotate(20deg);
  }
}

.tux-animation-flower .tux-female {
  animation: female-happy-bounce 4s ease-in-out;
  animation-delay: 2.5s;
}

@keyframes female-happy-bounce {
  0%, 100% {
    transform: translate(120px, 0);
  }
  20%, 40%, 60% {
    transform: translate(120px, -8px);
  }
  30%, 50% {
    transform: translate(120px, 0);
  }
}

/* Diamond Animation */
.tux-animation-diamond .tux-diamond-ring {
  opacity: 0;
  transform: translateX(-10px) rotate(-20deg);
  animation: ring-give 5s ease-in-out;
}

@keyframes ring-give {
  0% {
    opacity: 0;
    transform: translateX(-10px) rotate(-20deg) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
  }
  40% {
    opacity: 1;
    transform: translateX(20px) rotate(10deg) scale(1.1);
  }
  60% {
    opacity: 0.8;
    transform: translateX(40px) rotate(20deg) scale(0.9);
  }
  80%, 100% {
    opacity: 0;
    transform: translateX(50px) rotate(30deg) scale(0.5);
  }
}

.tux-animation-diamond .tux-wedding-dress {
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  animation: dress-appear 5s ease-in-out;
  animation-delay: 2.5s;
}

@keyframes dress-appear {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  30% {
    opacity: 0.5;
    transform: translateY(5px) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tux-animation-diamond .tux-female {
  animation: female-twirl 5s ease-in-out;
  animation-delay: 3s;
}

@keyframes female-twirl {
  0%, 100% {
    transform: translate(120px, 0) rotate(0deg);
  }
  25% {
    transform: translate(120px, -5px) rotate(-10deg);
  }
  50% {
    transform: translate(120px, 0) rotate(0deg);
  }
  75% {
    transform: translate(120px, -5px) rotate(10deg);
  }
}

.tux-female-bow {
  opacity: 1;
}

/* Make sure animations work on both male and female */
.tux-animation-flower > svg > g:first-child,
.tux-animation-diamond > svg > g:first-child {
  animation: male-lean-forward 4s ease-in-out;
}

@keyframes male-lean-forward {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  30% {
    transform: translateX(10px) rotate(5deg);
  }
  60% {
    transform: translateX(5px) rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tux-mascot {
    transition: none;
    --tux-hover-transform: var(--tux-rest-transform);
  }
  .tux-mascot:hover {
    transition: none;
  }
  .tux-mascot:hover .wing-left,
  .tux-mascot:hover .wing-right,
  .tux-mascot:hover .tux-body,
  .tux-mascot:hover .tux-head,
  .tux-mascot:hover .tux-face,
  .tux-mascot:hover .tux-belly,
  .tux-mascot:hover .steam-left,
  .tux-mascot:hover .steam-right {
    animation: none !important;
  }
  /* Disable romance animations for reduced motion */
  .tux-animation-flower .tux-flower-bouquet,
  .tux-animation-flower .tux-kiss-heart,
  .tux-animation-flower .tux-female,
  .tux-animation-diamond .tux-diamond-ring,
  .tux-animation-diamond .tux-wedding-dress,
  .tux-animation-diamond .tux-female,
  .tux-animation-flower > svg > g:first-child,
  .tux-animation-diamond > svg > g:first-child {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
.about-button {
  position: absolute;
  right: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: unset;
  box-shadow: var(--shadow-elevated);
}
.off-topic-button {
  position: absolute;
  right: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: unset;
  box-shadow: var(--shadow-elevated);
}
section {
  background: var(--color-surface-alt);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--color-border-subtle);
  display: grid;
  gap: 1.2rem;
  transition: border-color 200ms ease;
}
section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
section header .header-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
section header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}
.collapse-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  min-width: unset;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-input-bg);
  box-shadow: none;
  border: 1px solid var(--color-border-subtle);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.collapse-toggle:not(:disabled):hover {
  background: var(--color-surface-hover);
  border-color: var(--color-text-primary);
}
.signaling-content {
  display: grid;
  gap: 1.2rem;
}
#signaling.collapsed {
  cursor: pointer;
}
#signaling.collapsed header {
  margin-bottom: 0;
}
button {
  appearance: none;
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: var(--color-input-bg);
  color: var(--color-text-primary);
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
button:disabled {
  background: var(--color-surface-alt);
  color: var(--color-border-subtle);
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--color-border-subtle);
}
.about-button,
.off-topic-button {
  box-shadow: none;
}
button:not(:disabled):hover {
  background: var(--color-surface-hover);
  border-color: var(--color-text-primary);
}
button:not(:disabled):active {
  transform: translateY(1px);
  background: var(--color-panel-bg);
}
button:focus-visible {
  outline: 2px solid var(--color-outline);
  outline-offset: 2px;
  background: var(--color-surface-hover);
}
#screen-share .header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.screen-share-actions button {
  min-width: 150px;
}
.screen-share-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
}
.screen-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.screen-audio-toggle input {
  width: 18px;
  height: 18px;
}
.remote-control-toggle {
  min-width: 200px;
}
.control-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text-subtle);
}
.screen-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.screen-tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.screen-preview {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-muted);
  overflow: hidden;
  min-height: 200px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.screen-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35));
}
.screen-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
  background: rgba(16, 18, 22, 0.78);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.remote-preview {
  cursor: not-allowed;
  touch-action: none;
  outline: none;
}
.remote-preview:focus-visible {
  outline: 2px solid var(--color-outline);
  outline-offset: 4px;
}
.remote-preview.remote-preview-interactive {
  cursor: crosshair;
}
.remote-pointer-indicator {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1000;
}
.screen-share-footnote {
  margin-top: 1.25rem;
  color: var(--color-text-subtle);
  font-size: 0.9rem;
}
.remote-screen-hint {
  margin: 0;
}
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-input-bg);
  color: inherit;
  font: 0.95rem/1.4 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  min-height: 110px;
  resize: vertical;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: border-color 200ms ease, background-color 200ms ease;
}
textarea:focus {
  border-color: var(--color-outline);
  outline: 2px solid var(--color-outline);
  outline-offset: 2px;
}
textarea[readonly] {
  background: var(--color-panel-bg);
}
.controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.controls button {
  flex: 1;
  min-width: 180px;
}
.signal-block {
  display: grid;
  gap: 0.5rem;
}
.signal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.signal-heading label {
  cursor: default;
}
.copy-signal-button {
  min-width: 90px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}
.copy-signal-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
}
.qr-code-heading {
  text-align: center;
  color: var(--color-text-primary);
}
.qr-code-description {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.qr-code {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: 8px;
}
.qr-code img {
  display: block;
  max-width: 100%;
  height: auto;
}
.clear-chat-button {
  min-width: 90px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}
.clear-chat-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-actions > button {
  flex: 0 0 auto;
}
.api-key-button {
  min-width: 170px;
}
.theme-toggle-button {
  min-width: 150px;
  white-space: nowrap;
}
.language-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
}
.language-select {
  appearance: none;
  background-color: var(--color-input-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-input-border);
  border-radius: 6px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238ab4f8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px;
}
.language-select:hover:not(:disabled) {
  border-color: var(--color-outline);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}
.language-select:focus {
  outline: none;
  border-color: var(--color-outline);
  box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.3);
}
.language-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.language-select option {
  background-color: var(--color-panel-bg);
  color: var(--color-text-primary);
  padding: 0.5rem;
}
.ai-button {
  min-width: 160px;
  white-space: nowrap;
}
.voice-button {
  min-width: 60px;
  padding: 0.9rem 1rem;
  font-size: 1.4rem;
  transition: all 0.2s ease;
}
.voice-button:hover:not(:disabled) {
  transform: scale(1.1);
}
.voice-button-recording {
  animation: pulse-recording 1.5s ease-in-out infinite;
  background-color: var(--color-error, #e74c3c);
}
@keyframes pulse-recording {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.settings-button {
  font-size: 1.3rem;
  padding: 0.6rem 0.8rem;
  min-width: auto;
}
.model-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.model-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--color-surface-strong);
}
.model-option:hover {
  border-color: var(--color-outline);
  background-color: var(--color-panel-bg);
}
.model-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.model-option span {
  flex: 1;
  font-size: 0.95rem;
}
.modal-description {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}
.modal-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.api-key-form input {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-strong);
  color: inherit;
  font-size: 1rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.api-key-form input:focus {
  border-color: var(--color-outline);
  outline: 2px solid var(--color-outline);
  outline-offset: 2px;
}
.modal-error {
  color: var(--color-text-error);
  font-size: 0.9rem;
  margin: 0;
}
.modal-hint {
  font-size: 0.85rem;
  color: var(--color-text-primary);
  opacity: 0.7;
  margin-top: 0.25rem;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.modal-actions button {
  flex: 1 1 150px;
}
.ai-feedback {
  margin-top: 0.4rem;
  text-align: right;
  opacity: 0.75;
}
.ai-feedback-error {
  color: var(--color-text-error);
  opacity: 1;
}
.status {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  font-weight: 500;
  opacity: 0.8;
}
.warning {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-hover);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-primary);
}
.warning strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}
#messages {
  display: grid;
  gap: 0.75rem;
  max-height: clamp(220px, 30vh, 400px);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(150px, 20vh, 200px);
  text-align: center;
  color: var(--color-empty-state);
  font-style: italic;
  padding: 2rem 1rem;
}
.chat-line {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--color-input-bg);
  border: 1px solid var(--color-border-subtle);
  transition: background-color 200ms ease;
}
.chat-line[data-role="remote"] {
  background: var(--color-surface-hover);
  margin-left: auto;
}
.chat-line[data-role="system"] {
  background: var(--color-panel-bg);
  border: 1px dashed var(--color-border-subtle);
}
.chat-line strong {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  opacity: 0.8;
}
.chat-line[data-role="system"] strong {
  opacity: 0.6;
}
.chat-line span {
  font-size: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.chat-input {
  display: flex;
  gap: 0.75rem;
}
.chat-input input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  padding: 0.9rem 1.2rem;
  background: var(--color-input-bg);
  color: inherit;
  font-size: 1rem;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.chat-input input:focus {
  border-color: var(--color-outline);
  outline: 2px solid var(--color-outline);
  outline-offset: 2px;
}
.chat-input input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.chat-input input[type="text"] {
  flex: 1;
}
.image-button {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  font-size: 1.3rem;
  line-height: 1;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
}
.image-button:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}
.image-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.soundboard-container {
  position: relative;
  flex-shrink: 0;
}
.soundboard-button {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  font-size: 1.3rem;
  line-height: 1;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
}
.soundboard-button:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}
.soundboard-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.soundboard-button[aria-expanded="true"] {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
}
.soundboard-dropdown {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  min-width: min(280px, calc(100vw - 2rem));
  max-width: min(320px, calc(100vw - 1rem));
  z-index: 1000;
  animation: slideUp 200ms ease;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.soundboard-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary);
  opacity: 0.8;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.soundboard-item {
  padding: 0.6rem 0.8rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 150ms ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.soundboard-item:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.soundboard-item:active {
  transform: translateY(0);
}
.chat-image {
  display: block;
  max-width: 100%;
  max-height: 400px;
  margin-top: 0.5rem;
  border-radius: 8px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 200ms ease;
}
.chat-image:hover {
  transform: scale(1.02);
}
.hint {
  font-size: 0.85rem;
  color: var(--color-text-primary);
  opacity: 0.7;
  line-height: 1.4;
}
.chat-counter {
  text-align: right;
  margin: 0.25rem 0 0;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-scrim);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}
.modal-content {
  background: var(--color-modal-bg);
  border-radius: 18px;
  border: 1px solid var(--color-modal-border);
  box-shadow: var(--shadow-modal);
  max-width: min(600px, 95vw);
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.modal-close {
  padding: 0.4rem 1rem;
  min-width: unset;
  height: auto;
  font-size: 0.9rem;
  line-height: 1;
  background: var(--color-surface-alt);
  box-shadow: none;
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px;
}
.modal-close:not(:disabled):hover {
  background: var(--color-chip-bg);
  border-color: var(--color-text-primary);
}
.modal-body {
  padding: 2rem;
  line-height: 1.6;
}
.modal-body h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.modal-body p {
  margin: 0 0 1rem 0;
  color: var(--color-text-soft);
}
.contributors-intro {
  font-size: 0.95rem;
  margin-bottom: 0.5rem !important;
}
.contributors-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.contributors-list li {
  padding: 0.75rem 1rem;
  background: var(--color-surface-strong);
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
}
.contributors-list a {
  color: var(--color-outline);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}
.contributors-list a:hover {
  color: var(--color-text-info);
  text-decoration: underline;
}
.contribution-note {
  color: var(--color-text-subtle);
  font-size: 0.9rem;
}
.contributors-status {
  margin: 0.5rem 0;
  color: var(--color-hint);
  font-size: 0.95rem;
}
.contributors-status.contributors-error {
  color: var(--color-text-warning);
}

/* ===== Statistics Section ===== */

#statistics {
  background: var(--color-panel-bg);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-panel);
}

#statistics header {
  margin-bottom: 1.5rem;
}

.statistics-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.statistics-status {
  margin: 0.5rem 0;
  color: var(--color-hint);
  font-size: 0.95rem;
  text-align: center;
}

.statistics-status.statistics-error {
  color: var(--color-text-error);
}

.statistics-table-wrapper {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
}

.statistics-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface-strong);
}

.statistics-table thead {
  background: var(--color-surface-alt);
}

.statistics-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border-strong);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statistics-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-soft);
}

.statistics-table tbody tr:last-child td {
  border-bottom: none;
}

.statistics-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.issue-number a {
  color: var(--color-outline);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.issue-number a:hover {
  color: var(--color-text-info);
  text-decoration: underline;
}

.issue-title {
  font-weight: 500;
  color: var(--color-text-primary);
}

.issue-summary {
  max-width: 400px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.issue-summary.summary-loading {
  opacity: 0.6;
  font-style: italic;
}

.issue-summary.summary-ai {
  color: var(--color-text-info);
  font-style: italic;
}

.issue-status {
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.status-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.status-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.statistics-joke {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-surface-alt);
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
  text-align: center;
}

.statistics-joke h3 {
  margin: 0 0 1rem 0;
  color: var(--color-text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.statistics-joke p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 1rem;
  line-height: 1.6;
  font-style: italic;
}

/* ===== Mobile Responsive Design ===== */

/* Improved touch target accessibility */
@media (hover: none) and (pointer: coarse) {
  button,
  .chat-input input,
  .collapse-toggle,
  .random-room-button,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
  .main-navigation button {
    min-height: 48px;
    padding: 0.75rem 1rem;
  }
}

/* Small phones and narrow screens (< 400px) */
@media (max-width: 399px) {
  body {
    padding: 0.75rem;
    padding-top: calc(75px + 0.75rem);
  }
  main {
    padding: 1.25rem;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .statistics-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .statistics-table {
    min-width: 600px;
  }
  .statistics-table th,
  .statistics-table td {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  .issue-summary {
    max-width: 200px;
    font-size: 0.85rem;
  }
  .status-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  .header-with-about {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
  }
  .tux-mascot {
    position: static;
    --tux-rest-transform: none;
    --tux-hover-transform: scale(1.08);
    margin-bottom: 0.3rem;
    width: 72px;
    height: 72px;
  }
  .about-button,
  .off-topic-button {
    position: static;
    width: 100%;
  }
  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  .main-navigation button {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }
  h1 {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    letter-spacing: 0.03em;
  }
  section {
    padding: 1rem;
    gap: 1rem;
  }
  section header h2 {
    font-size: 0.95rem;
  }
  .status {
    font-size: 0.85rem;
  }
  button {
    padding: 0.75rem 1.4rem;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    min-height: 44px; /* Ensure touch-friendly targets */
  }
  .controls button {
    flex: 1 1 100%;
    min-width: unset; /* Remove desktop min-width constraint */
  }
  textarea {
    min-height: 90px;
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
  }
  .collapse-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .chat-line {
    padding: 0.65rem 0.9rem;
  }
  .chat-line strong {
    font-size: 0.75rem;
  }
  .chat-line span {
    font-size: 0.95rem;
  }
  .chat-input {
    flex-direction: column;
    gap: 0.65rem;
  }
  .chat-input input,
  .chat-input button {
    width: 100%;
    min-height: 44px; /* Touch-friendly input */
  }
  .chat-input input {
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
  }
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions > button {
    width: 100%;
  }
  .screen-share-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .screen-share-actions {
    width: 100%;
    justify-content: stretch;
  }
  .screen-share-actions button,
  .remote-control-toggle {
    width: 100%;
  }
  .modal-actions {
    flex-direction: column;
  }
  .modal-actions button {
    width: 100%;
    flex: 1 1 auto;
  }
  .hint {
    font-size: 0.8rem;
  }
  .warning {
    padding: 0.9rem 1.1rem;
    font-size: 0.85rem;
  }
  .modal-header {
    padding: 1.25rem 1.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
  .screen-share-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .qr-code-container {
    padding: 0.75rem;
  }
  .qr-code {
    max-width: 100%;
    overflow: hidden;
  }
  .image-button,
  .soundboard-button {
    padding: 0.8rem 1rem;
    min-width: 44px;
  }
}

/* Phones (400px - 599px) */
@media (min-width: 400px) and (max-width: 599px) {
  body {
    padding: 1rem;
    padding-top: calc(75px + 1rem);
  }
  main {
    padding: 1.5rem;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .screen-share-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .statistics-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .statistics-table {
    min-width: 600px;
  }
  .statistics-table th,
  .statistics-table td {
    padding: 0.85rem;
    font-size: 0.9rem;
  }
  .issue-summary {
    max-width: 250px;
  }
  .header-with-about {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
  }
  .tux-mascot {
    position: static;
    --tux-rest-transform: none;
    --tux-hover-transform: scale(1.08);
    margin-bottom: 0.5rem;
    width: 76px;
    height: 76px;
  }
  .about-button,
  .off-topic-button {
    position: static;
    width: 100%;
  }
  section {
    padding: 1.25rem;
  }
  button {
    min-height: 44px; /* Touch-friendly targets */
  }
  .controls button {
    flex: 1 1 100%;
    min-width: unset; /* Remove desktop min-width constraint */
  }
  textarea {
    min-height: 95px;
  }
  .chat-input {
    flex-direction: column;
    gap: 0.7rem;
  }
  .chat-input input,
  .chat-input button {
    width: 100%;
    min-height: 44px;
  }
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions > button {
    width: 100%;
  }
  .screen-share-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .screen-share-actions {
    width: 100%;
    justify-content: stretch;
  }
  .screen-share-actions button,
  .remote-control-toggle {
    width: 100%;
  }
  .modal-actions {
    flex-direction: column;
  }
  .modal-actions button {
    width: 100%;
    flex: 1 1 auto;
  }
  .modal-header {
    padding: 1.25rem 1.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
  .soundboard-dropdown {
    left: auto;
    right: 0;
    min-width: 260px;
    max-width: calc(100vw - 2rem);
  }
  .soundboard-grid {
    grid-template-columns: 1fr;
  }
  .qr-code-container {
    padding: 0.75rem;
  }
  .image-button,
  .soundboard-button {
    padding: 0.8rem 1rem;
    min-width: 44px;
  }
}

/* Tablets and larger phones (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
  body {
    padding: 1.25rem;
    padding-top: calc(75px + 1.25rem);
  }
  main {
    padding: 1.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  .screen-share-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
  }
  .header-with-about {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
  }
  .tux-mascot {
    position: static;
    --tux-rest-transform: none;
    --tux-hover-transform: scale(1.08);
    margin-bottom: 0.5rem;
    width: 82px;
    height: 82px;
  }
  .about-button,
  .off-topic-button {
    position: static;
    width: 100%;
  }
  .controls button {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px; /* Smaller than desktop but still reasonable */
  }
  .chat-input {
    flex-direction: row;
  }
  .chat-input input {
    flex: 1;
  }
  .chat-input button {
    flex: 0 0 auto;
    min-width: 100px;
  }
  .modal-header {
    padding: 1.25rem 1.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
}

/* Standard tablets and small desktops (769px - 920px) */
@media (min-width: 769px) and (max-width: 920px) {
  body {
    padding: 1.5rem;
    padding-top: calc(75px + 1.5rem);
  }
  main {
    padding: 1.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  .screen-share-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
  }
  .controls button {
    min-width: 160px; /* Slightly smaller than desktop */
  }
  .header-with-about {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
  }
  .tux-mascot {
    position: static;
    --tux-rest-transform: none;
    --tux-hover-transform: scale(1.06);
    margin-bottom: 0.5rem;
    width: 84px;
    height: 84px;
  }
  .about-button,
  .off-topic-button {
    position: static;
    width: 100%;
  }
  .modal-header {
    padding: 1.25rem 1.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
}

/* ===== Pong Game Section ===== */

#pong {
  background: var(--color-panel-bg);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-panel);
}

#pong header {
  margin-bottom: 1.5rem;
}

.pong-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.pong-canvas-container {
  position: relative;
  width: 100%;
  max-width: min(800px, 95vw);
  background: #0a0a0f;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--color-border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.pong-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.pong-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.pong-controls button {
  min-width: 200px;
}

.pong-instructions {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pong-score-display {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 1rem;
  background: var(--color-surface-alt);
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
}

.pong-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pong-score-item h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pong-score-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text-primary);
}

.pong-lives {
  font-size: 1.5rem;
}

[data-theme='rgb'] .pong-canvas-container {
  border: 2px solid;
  border-image: linear-gradient(135deg, #ff00ff, #00ffff, #ff00ff) 1;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .pong-controls button {
    width: 100%;
    min-width: unset;
  }

  .pong-score-value {
    font-size: 1.5rem;
  }
}

/* Flappy Bird Game Section */
#flappybird {
  background: var(--color-panel-bg);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-panel);
}

#flappybird header {
  margin-bottom: 1.5rem;
}

.flappybird-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.flappybird-canvas-container {
  position: relative;
  width: 100%;
  max-width: min(800px, 95vw);
  background: #4EC0CA;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--color-border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.flappybird-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.flappybird-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.flappybird-controls button {
  min-width: 200px;
}

.flappybird-instructions {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.flappybird-score-display {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 1rem;
  background: var(--color-surface-alt);
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
}

.flappybird-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.flappybird-score-item h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flappybird-score-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text-primary);
}

[data-theme='rgb'] .flappybird-canvas-container {
  border: 2px solid;
  border-image: linear-gradient(135deg, #FFD700, #FFA500, #FFD700) 1;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 165, 0, 0.3);
}

@media (max-width: 768px) {
  .flappybird-controls button {
    width: 100%;
    min-width: unset;
  }

  .flappybird-score-value {
    font-size: 1.5rem;
  }
}

/* Danger Zone Section */
#danger-zone {
  border: 2px solid var(--color-text-error);
  background: var(--color-surface-strong);
  margin-top: 2rem;
}

#danger-zone header {
  background: linear-gradient(135deg, rgba(255, 50, 50, 0.15), rgba(255, 100, 100, 0.1));
  border-bottom: 2px solid var(--color-text-error);
}

.danger-zone-warning {
  color: var(--color-text-error);
  font-weight: 600;
  margin-top: 0.5rem;
}

.danger-zone-content {
  padding: 1.5rem;
}

.danger-zone-description {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.danger-zone-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.danger-zone-action-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--color-surface-muted);
  border-radius: 8px;
  border: 1px solid var(--color-border-subtle);
}

.danger-zone-button {
  padding: 0.75rem 1.5rem;
  background: var(--color-text-error);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.danger-zone-button:hover:not(:disabled) {
  background: #c0352b;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 50, 50, 0.3);
}

.danger-zone-button:active:not(:disabled) {
  transform: translateY(0);
}

.danger-zone-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.danger-zone-button-nuclear {
  background: #8b0000;
  font-size: 1rem;
  padding: 1rem 1.5rem;
}

.danger-zone-button-nuclear:hover:not(:disabled) {
  background: #a00000;
  box-shadow: 0 6px 12px rgba(139, 0, 0, 0.4);
}

.danger-zone-action-desc {
  color: var(--color-text-subtle);
  font-size: 0.85rem;
  margin: 0;
}

.danger-zone-modal .modal-header {
  background: linear-gradient(135deg, rgba(255, 50, 50, 0.15), rgba(255, 100, 100, 0.1));
  border-bottom: 2px solid var(--color-text-error);
}

.danger-zone-modal-message {
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.danger-zone-confirm-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--color-input-bg);
  border: 2px solid var(--color-input-border);
  border-radius: 6px;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-family: monospace;
  margin-bottom: 1rem;
}

.danger-zone-confirm-input:focus {
  outline: none;
  border-color: var(--color-text-error);
  box-shadow: 0 0 0 3px rgba(255, 50, 50, 0.1);
}

.danger-zone-confirm-button {
  background: var(--color-text-error);
  color: white;
}

.danger-zone-confirm-button:hover:not(:disabled) {
  background: #c0352b;
}

.danger-zone-confirm-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-theme='light'] #danger-zone {
  border-color: #c0352b;
}

[data-theme='light'] #danger-zone header {
  background: linear-gradient(135deg, rgba(192, 53, 43, 0.1), rgba(192, 53, 43, 0.05));
  border-bottom-color: #c0352b;
}

[data-theme='light'] .danger-zone-warning {
  color: #c0352b;
}

[data-theme='light'] .danger-zone-button {
  background: #c0352b;
}

[data-theme='light'] .danger-zone-button:hover:not(:disabled) {
  background: #a02f26;
}

[data-theme='rgb'] #danger-zone {
  border-color: #ff0080;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.3);
}

[data-theme='rgb'] #danger-zone header {
  background: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(255, 0, 0, 0.1));
  border-bottom-color: #ff0080;
}

[data-theme='rgb'] .danger-zone-warning {
  color: #ff0080;
  text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

[data-theme='rgb'] .danger-zone-button {
  background: linear-gradient(135deg, #ff0080, #ff0040);
  box-shadow: 0 0 15px rgba(255, 0, 128, 0.4);
}

[data-theme='rgb'] .danger-zone-button:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(255, 0, 128, 0.6);
}

[data-theme='rgb'] .danger-zone-button-nuclear {
  background: linear-gradient(135deg, #8b0000, #ff0000);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

[data-theme='rgb'] .danger-zone-button-nuclear:hover:not(:disabled) {
  box-shadow: 0 0 35px rgba(255, 0, 0, 0.7);
}

@media (max-width: 768px) {
  .danger-zone-actions {
    gap: 1rem;
  }

  .danger-zone-action-item {
    padding: 0.75rem;
  }

  .danger-zone-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* ===== Cookie Banner ===== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-modal-bg);
  border-top: 2px solid var(--color-outline);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  z-index: 2000;
  animation: slideUpBanner 400ms ease-out;
}

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

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--color-text-primary);
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-banner-button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-alt);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}

.cookie-banner-button:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-outline);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-banner-button:active {
  transform: translateY(0);
}

.cookie-accept-all {
  background: var(--color-outline);
  color: white;
  border-color: var(--color-outline);
}

.cookie-accept-all:hover {
  background: var(--color-text-accent);
  border-color: var(--color-text-accent);
}

.cookie-reject {
  background: var(--color-surface-muted);
}

.cookie-settings {
  background: var(--color-input-bg);
}

/* Cookie Category Styling in Modal */

.cookie-category {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--color-surface-alt);
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cookie-category-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-primary);
}

.cookie-category-status {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
  opacity: 0.8;
}

.cookie-category-description {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.cookie-category-items {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.cookie-category-items li {
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.cookie-category-items li:last-child {
  border-bottom: none;
}

/* Toggle Switch */

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  cursor: pointer;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border-subtle);
  border-radius: 24px;
  transition: all 200ms ease;
}

.cookie-toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 200ms ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--color-outline);
  border-color: var(--color-outline);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.3);
}

.cookie-save-preferences {
  background: var(--color-outline);
  color: white;
  border-color: var(--color-outline);
}

.cookie-save-preferences:hover:not(:disabled) {
  background: var(--color-text-accent);
  border-color: var(--color-text-accent);
}

/* RGB Theme Support */

[data-theme='rgb'] .cookie-banner {
  border-top-color: #ff00ff;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.5), 0 -8px 32px rgba(0, 255, 255, 0.3);
}

[data-theme='rgb'] .cookie-accept-all {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

[data-theme='rgb'] .cookie-accept-all:hover {
  box-shadow: 0 0 25px rgba(255, 0, 255, 0.6);
}

[data-theme='rgb'] .cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(90deg, #ff00ff, #00ffff);
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Mobile Responsive */

@media (max-width: 768px) {
  .cookie-banner {
    padding: 1rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-banner-text {
    min-width: unset;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-banner-button {
    width: 100%;
    text-align: center;
  }

  .cookie-category {
    padding: 0.75rem;
  }

  .cookie-category-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Brain's World Domination Plan */
.brains-plan {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: min(400px, calc(100vw - 2.5rem));
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid #a855f7;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: brainEntrance 0.5s ease-out;
}

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

.brains-plan.collapsed {
  max-width: 280px;
}

.brains-plan-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.brains-plan-header:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px 10px 0 0;
}

.brains-plan.collapsed .brains-plan-header:hover {
  border-radius: 10px;
}

.brains-plan-icon {
  font-size: 1.5rem;
  animation: brainPulse 2s ease-in-out infinite;
}

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

.brains-plan-title {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brains-plan-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: transform 0.3s;
}

.brains-plan.collapsed .brains-plan-toggle {
  transform: rotate(-90deg);
}

.brains-plan-content {
  padding: 0 1rem 1rem;
  color: #ffffff;
  animation: fadeIn 0.3s ease-out;
}

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

.brains-plan-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #a855f7;
}

.brains-plan-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brains-plan-button {
  flex: 1;
  background: #ffffff;
  color: #667eea;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brains-plan-button:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.brains-plan-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brains-plan-signature {
  margin: 0;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Dark theme adjustments */
[data-theme="dark"] .brains-plan {
  background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
  border-color: #7c3aed;
}

[data-theme="dark"] .brains-plan-button {
  background: #e0e0e0;
  color: #4c1d95;
}

[data-theme="dark"] .brains-plan-button:hover {
  background: #d0d0d0;
}

/* Light theme adjustments */
[data-theme="light"] .brains-plan {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  border-color: #c084fc;
}

/* RGB theme adjustments */
[data-theme="rgb"] .brains-plan {
  background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
  border-color: #ef4444;
  animation: brainRainbow 3s linear infinite;
}

@keyframes brainRainbow {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .brains-plan {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .brains-plan.collapsed {
    left: auto;
    max-width: 250px;
  }

  .brains-plan-title {
    font-size: 0.9rem;
  }

  .brains-plan-text {
    font-size: 0.85rem;
  }
}

/* Cat Mascot Styles */
.cat-mascot {
  display: inline-block;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(255, 105, 180, 0.3));
}

.cat-mascot:hover {
  transform: scale(1.1);
}

[data-theme='cat'] .cat-mascot .cat-eye {
  animation: cat-blink 3s ease-in-out infinite;
}

@keyframes cat-blink {
  0%, 90%, 100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

[data-theme='cat'] .cat-mascot .cat-ear-left,
[data-theme='cat'] .cat-mascot .cat-ear-right {
  animation: cat-ear-wiggle 2s ease-in-out infinite;
  transform-origin: center bottom;
}

[data-theme='cat'] .cat-mascot .cat-ear-right {
  animation-delay: 0.3s;
}

@keyframes cat-ear-wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

[data-theme='cat'] .cat-mascot:hover .cat-whisker {
  animation: whisker-twitch 0.5s ease-in-out;
}

@keyframes whisker-twitch {
  0%, 100% {
    stroke-width: 1;
  }
  50% {
    stroke-width: 1.5;
  }
}

.paw-icon {
  display: inline-block;
  color: var(--color-text-accent);
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.paw-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Cat Mode Audio Controls */
.cat-audio-controls {
  padding: 1rem;
  background: var(--color-surface-muted);
  border-radius: 12px;
  margin-top: 1rem;
}

.cat-audio-controls h3 {
  margin: 0 0 1rem 0;
  color: var(--color-text-primary);
  font-size: 1.1rem;
}

.cat-audio-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.cat-audio-setting:last-child {
  border-bottom: none;
}

.cat-audio-setting label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.cat-audio-setting input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.cat-audio-volume {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.cat-audio-volume label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.cat-audio-volume input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-surface-alt);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.cat-audio-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-text-accent);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cat-audio-volume input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.cat-audio-volume input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-text-accent);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.cat-audio-volume input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

[data-theme='cat'] .cat-audio-controls {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4f5 100%);
  border: 2px solid var(--color-border-subtle);
}

@media (prefers-color-scheme: dark) {
  [data-theme='cat'] .cat-audio-controls {
    background: linear-gradient(135deg, #2f1f2f 0%, #3a2050 100%);
  }
}
