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

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

body {
  background: #000;
  font-family: 'VT323', monospace;
  color: #fff;
}

#container {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

.glass {
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.username-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 500;
}

.username-modal.active {
  display: flex;
}

.username-box {
  position: relative;
  padding: 50px 60px;
  border-radius: 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.username-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.username-box h2 {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 35px;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.username-box input {
  width: 300px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 24px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 22px;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.username-box input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(255, 255, 255, 0.1);
}

.username-box input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
}

.error-msg {
  color: #ff7b7b;
  font-size: 16px;
  margin-top: 12px;
  min-height: 24px;
  letter-spacing: 1px;
}

.username-box button {
  margin-top: 25px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 60px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.username-box button:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.username-box button:active {
  transform: translateY(-1px);
}

.sound-permission {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sound-permission p {
  margin: 0 0 15px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.sound-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.sound-btns button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#enableSoundBtn {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: #000;
}

#enableSoundBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.skip-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.skip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  z-index: 100;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.online-count {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 10px 16px;
}

.queue-count {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 20, 40, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 200, 100, 0.15);
  border-radius: 20px;
  padding: 10px 16px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.queue-count.active {
  opacity: 1;
  transform: scale(1);
}

.queue-count .queue-icon {
  font-size: 14px;
}

.queue-count .queue-num {
  font-size: 18px;
  font-weight: 400;
  color: #ffcc66;
  transition: all 0.3s ease;
}

.queue-count .queue-num.bump {
  animation: bump 0.3s ease;
}

.queue-count .queue-label {
  font-size: 14px;
  color: rgba(255, 200, 100, 0.6);
}

.queue-indicator {
  position: fixed;
  top: 80px;
  left: 20px;
  background: linear-gradient(135deg, rgba(255, 200, 100, 0.15) 0%, rgba(255, 150, 50, 0.1) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 200, 100, 0.2);
  border-radius: 16px;
  padding: 12px 20px;
  font-size: 16px;
  color: rgba(255, 200, 100, 0.9);
  z-index: 90;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.queue-indicator.active {
  opacity: 1;
  transform: translateY(0);
}

.queue-indicator strong {
  color: #ffcc66;
  font-size: 20px;
}

.online-count .dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.online-count .web-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.online-count.pump-online {
  border-color: rgba(130, 200, 130, 0.2);
}

.online-count .pump-status-icon {
  width: 16px;
  height: 16px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

.online-count .count {
  font-size: 18px;
  font-weight: 400;
  transition: all 0.3s ease;
}

.online-count .count.bump {
  animation: bump 0.3s ease;
}

@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.online-count .label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
}

.menu-btn span {
  width: 20px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.header-btn {
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 24px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-btn:hover {
  background: rgba(40, 40, 60, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.backrooms-btn {
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 24px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.backrooms-btn:hover {
  background: rgba(40, 40, 60, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.chat-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  z-index: 50;
}

.history-toggle {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 30, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'VT323', monospace;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 40;
}

.history-toggle:hover {
  background: rgba(40, 40, 50, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
}

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

.messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.message {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.5;
  max-width: 90%;
  animation: fadeIn 0.3s ease;
}

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

.message .sender {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.message .reply-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: -12px -16px 12px -16px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
  font-style: italic;
}

.message .msg-image {
  margin-top: 10px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.message .msg-image img {
  width: 100%;
  max-width: 200px;
  border-radius: 8px;
  transition: transform 0.3s, opacity 0.3s;
}

.message .msg-image img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.message.user {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.other {
  background: rgba(150, 100, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-self: flex-start;
  border: 1px solid rgba(150, 100, 255, 0.15);
}

.message.ai {
  background: rgba(100, 200, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-self: flex-start;
  border: 1px solid rgba(100, 200, 255, 0.15);
}

.message.system {
  background: rgba(255, 255, 255, 0.05);
  align-self: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 8px 16px;
}

.message.system.icon-system {
  display: flex;
  align-items: center;
  gap: 6px;
}

.message.system .system-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.message.pump {
  background: rgba(130, 200, 130, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-self: flex-start;
  border: 1px solid rgba(130, 200, 130, 0.15);
}

.message.pump .sender {
  display: flex;
  align-items: center;
  gap: 6px;
}

.message.pump .pump-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.input-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.min-length-warning {
  display: none;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(255, 100, 100, 0.15);
  position: relative;
  z-index: 50;
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 8px;
  color: rgba(255, 150, 150, 0.9);
  font-size: 14px;
  text-align: center;
}

.min-length-warning.active {
  display: block;
}

.input-area input {
  flex: 1;
  background: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 18px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 18px;
  outline: none;
  transition: all 0.3s;
}

.input-area input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(30, 30, 40, 0.7);
}

.input-area input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-area input:disabled {
  opacity: 0.5;
}

.input-area button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px 28px;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.input-area button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.input-area button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.response-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90vw;
  max-width: 1200px;
  max-height: 60vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.response-container.active {
  opacity: 1;
}

.question-text {
  font-family: 'VT323', monospace;
  font-size: clamp(16px, 3vw, 28px);
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.question-text::before {
  content: '> ';
  color: rgba(100, 200, 255, 0.6);
}

.response-text {
  font-family: 'VT323', monospace;
  font-size: clamp(32px, 6vw, 80px);
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 0 40px rgba(255,255,255,0.4);
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.response-text.glitch {
  animation: glitchText 0.3s ease;
}

.response-text .cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #fff;
  margin-left: 5px;
  animation: blink 0.7s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes glitchText {
  0% { transform: translate(0); text-shadow: 0 0 40px rgba(255,255,255,0.4); }
  20% { transform: translate(-2px, 0); text-shadow: -3px 0 #ff0066, 3px 0 #00ffff; }
  40% { transform: translate(2px, 0); text-shadow: 3px 0 #ff0066, -3px 0 #00ffff; }
  60% { transform: translate(0, -2px); text-shadow: -2px 0 #ff0066, 2px 0 #00ffff; }
  80% { transform: translate(0, 2px); text-shadow: 2px 0 #ff0066, -2px 0 #00ffff; }
  100% { transform: translate(0); text-shadow: 0 0 40px rgba(255,255,255,0.4); }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  border-radius: 20px;
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 2px;
}

.close-modal {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #fff;
}

.modal-tabs {
  display: flex;
  padding: 15px 20px;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'VT323', monospace;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab:hover, .tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.modal-content {
  padding: 20px;
  max-height: 50vh;
  overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.backroom-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.backroom-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.backroom-item .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 150, 255, 0.2);
  border-radius: 10px;
  font-size: 20px;
}

.backroom-item .icon.image { background: rgba(255, 100, 150, 0.2); }
.backroom-item .icon.game { background: rgba(100, 255, 150, 0.2); }

.backroom-item .info {
  flex: 1;
}

.backroom-item .title {
  font-size: 18px;
  margin-bottom: 4px;
}

.backroom-item .meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
}

.output-panel {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 24px;
  display: none;
  z-index: 200;
  max-width: 90vw;
  max-height: 50vh;
  overflow: visible;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(100, 150, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.output-panel.active {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 100, 100, 0.8);
  color: #fff;
  transform: scale(1.1);
}

.output-content img {
  max-width: 550px;
  max-height: 55vh;
  border-radius: 12px;
  object-fit: contain;
  animation: crtOn 0.5s ease;
  filter: contrast(1.05) saturate(1.1);
  box-shadow: 
    0 0 20px rgba(100, 200, 255, 0.2),
    0 0 40px rgba(100, 200, 255, 0.1);
}

.output-content img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

@keyframes crtOn {
  0% {
    opacity: 0;
    filter: brightness(2) contrast(2) saturate(0);
    transform: scale(1.02);
  }
  30% {
    opacity: 1;
    filter: brightness(1.5) contrast(1.2) saturate(0.5);
  }
  100% {
    filter: contrast(1.05) saturate(1.1);
    transform: scale(1);
  }
}

.output-content {
  position: relative;
}

.output-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 1;
  border-radius: 12px;
}

.output-content iframe {
  width: 800px;
  height: 600px;
  border: none;
  border-radius: 12px;
  background: #fff;
}

.typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing span {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.inline-typing {
  display: inline-flex;
  gap: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.inline-typing span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.inline-typing span:nth-child(1) { animation-delay: -0.32s; }
.inline-typing span:nth-child(2) { animation-delay: -0.16s; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 99;
  animation: fadeIn 0.3s ease;
}

.mobile-menu .backrooms-btn,
.mobile-menu .header-btn {
  font-size: 16px;
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  #container canvas {
    transform: scale(0.95);
    transform-origin: center center;
  }
  
  .menu-btn {
    display: flex;
  }
  
  .header .backrooms-btn,
  .header .header-btn {
    display: none;
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  .chat-panel {
    width: 100%;
    padding: 15px;
    max-height: none;
  }
  
  .history-toggle {
    display: block;
  }
  
  .chat-panel .messages {
    display: flex;
    max-height: 35vh;
    margin-bottom: 10px;
  }
  
  .chat-panel.hide-history .messages {
    display: none;
  }
  
  .output-panel {
    display: none !important;
  }
  
  .output-content iframe {
    width: 100%;
    height: 400px;
  }
  
  .modal {
    width: 95%;
    max-height: 85vh;
  }
  
  .username-box {
    padding: 30px 20px;
    margin: 0 10px;
  }
  
  .username-box input {
    width: 100%;
    max-width: 280px;
  }
  
  .status-bar {
    gap: 6px;
  }
  
  .online-count {
    padding: 8px 12px;
  }
  
  .online-count .label {
    display: none;
  }
  
  .queue-count {
    padding: 8px 12px;
  }
  
  .queue-count .queue-label {
    display: none;
  }
  
  .queue-indicator {
    top: 70px;
    left: 10px;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .min-length-warning.active {
    position: fixed;
    bottom: 130px;
    left: 15px;
    right: 15px;
    width: auto;
    z-index: 70;
  }
}
