/* =========================================
   REMOTE CONTROL STYLES
   ========================================= */

/* Reset & Basics for Remote */
html, body {
  margin: 0; 
  padding: 0;
  width: 100%; 
  height: 100%;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f2f2f7;
  color: #1d1d1f;
}

.remote-bg {
  position: fixed; 
  top: 0; left: 0; 
  width: 100%; height: 100%;
  z-index: -1;
}

/* Layout Container */
.remote-shell { 
  position: fixed; 
  inset: 0; 
  display: grid; 
  grid-template-rows: auto 1fr auto; 
  overflow: hidden; 
  padding: 0;
}

/* Header */
.remote-header {
  padding: 12px 20px;
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  z-index: 10; 
  margin: 16px 16px 0 16px;
  border-radius: 24px; 
  border: 1px solid rgba(255,255,255,0.5); 
}

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

.remote-title-group { 
  display: flex; 
  flex-direction: column; 
}

.remote-title { 
  font-size: 18px; 
  font-weight: 700; 
  line-height: 1.2; 
}

.remote-room { 
  font-size: 13px; 
  color: #86868b; 
}

.remote-room code { 
  background: rgba(0,0,0,0.06); 
  padding: 4px 8px; 
  border-radius: 12px; 
  font-weight: 600; 
}

/* Icons & Buttons */
.remote-btn-icon {
  width: 44px; 
  height: 44px; 
  border-radius: 50%; 
  border: none;
  background: #ffffff; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  color: #0071e3; 
  display: grid; 
  place-items: center;
  cursor: pointer; 
  transition: transform 0.1s;
}

.remote-btn-icon:active { 
  transform: scale(0.92); 
  background: #f5f5f7; 
}

/* Body Area */
.remote-body {
  padding: 16px 20px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center;
}

/* Touchpad */
.touchpad-area {
  flex: 1; 
  width: 100%;
  background: rgba(255, 255, 255, 0.5); 
  backdrop-filter: blur(15px); 
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.5), 0 4px 20px rgba(0,0,0,0.05);
  border-radius: 32px; 
  margin-bottom: 16px; 
  position: relative; 
  touch-action: none; 
}

.touchpad-area:active { 
  background: rgba(255, 255, 255, 0.7); 
  border-color: #0071e3; 
}

.touch-hint {
  color: rgba(0,0,0,0.15); 
  font-weight: 600; 
  font-size: 1.5em; 
  text-align: center;
  pointer-events: none; 
  user-select: none;
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
}

/* Joystick */
#joystick-zone {
  position: absolute; 
  bottom: 20px; 
  right: 20px;    
  width: 140px; 
  height: 140px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  display: flex; 
  align-items: center; 
  justify-content: center;
  touch-action: none; 
  z-index: 100;
}

#joystick-knob {
  width: 60px; 
  height: 60px;
  background: linear-gradient(135deg, #0071e3, #42a1ff); 
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.4), inset 0 2px 5px rgba(255,255,255,0.4);
  position: relative; 
  pointer-events: none; 
  transform: translate(0px, 0px);
}

#joystick-zone.active #joystick-knob { 
  transition: none; 
  background: #005bb5; 
}

/* Footer */
.remote-footer {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px); 
  -webkit-backdrop-filter: blur(30px);
  padding: 12px 16px; 
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 20; 
  border-radius: 28px;
  margin: 0 16px 24px 16px; 
  border: 1px solid rgba(255,255,255,0.5);
}

.footer-grid { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr); 
  gap: 8px; 
}

.remote-btn-footer {
  background: transparent; 
  border: none;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  padding: 12px 0; 
  border-radius: 16px;
  color: #86868b; 
  transition: all 0.2s; 
  cursor: pointer;
}

.remote-btn-footer svg { 
  width: 28px; 
  height: 28px; 
  margin-bottom: 4px; 
}

.remote-btn-footer.active, .remote-btn-footer:active {
  background: rgba(0, 113, 227, 0.1); 
  color: #0071e3;
}

/* Glass Panel Utility (Shared) */
.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
  border-radius: 24px;
}
