/* ==========================================================================
   portasplitac.com – Design System & Premium Styles
   ========================================================================== */

:root {
  /* Cool Frosty Palette */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --accent-blue: #38BDF8;
  --accent-cyan: #06B6D4;
  --accent-violet: #818CF8;
  --accent-emerald: #34D399;
  --accent-amber: #FBBF24;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --led-green: #10B981;
  --led-glow: rgba(16, 185, 129, 0.4);
  --ice-glow: rgba(56, 189, 248, 0.2);
  --remote-bg: #E2E8F0;
  --border-glow: rgba(56, 189, 248, 0.3);
}

/* === Reset & Base Styles === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

a { text-decoration: none; color: inherit; }

/* Ambient background */
.snow-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 75% 40%, rgba(6, 182, 212, 0.04) 2px, transparent 2px),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 550px 550px;
  z-index: 0;
  animation: floatBackground 30s linear infinite;
}

@keyframes floatBackground {
  0%   { background-position: 0 0; }
  100% { background-position: 550px 550px; }
}

/* Ambient orbs (portal only) */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: rgba(56,189,248,0.06); top:-150px; left:-100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: rgba(129,140,248,0.07); bottom:-100px; right:-80px; animation-delay: 4s; }
.orb-3 { width: 350px; height: 350px; background: rgba(52,211,153,0.05); top:40%; left:50%; animation-delay: 8s; }

@keyframes orbFloat {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.15) translate(30px, 20px); }
}

/* === Header === */
.app-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background-color: rgba(15,23,42,0.85);
  backdrop-filter: blur(14px);
  z-index: 100;
  position: sticky;
  top: 0;
}

.logo-link {
  display: block;
  text-decoration: none;
}

.logo-area h1 {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #FFF 30%, var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* === Page Navigation Pills (simulator pages) === */
.page-nav {
  display: flex;
  gap: 6px;
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 5px;
  border-radius: 30px;
  flex-shrink: 0;
}

.nav-item {
  padding: 7px 14px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(56,189,248,0.12);
}

.nav-item.active {
  background: var(--accent-blue);
  color: var(--bg-primary);
  box-shadow: 0 3px 10px rgba(56,189,248,0.35);
}

/* Language selector */
.lang-selector select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.lang-selector select:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(56,189,248,0.2);
}

/* ============================================================
   PORTAL / HOME PAGE STYLES
   ============================================================ */
.portal-body { background: var(--bg-primary); }

.portal-header {
  flex-wrap: wrap;
  padding: 20px 30px;
}

.portal-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #FFF 0%, var(--accent-blue) 60%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.8px;
}

.portal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 300;
}

.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
  z-index: 1;
  gap: 36px;
}

.portal-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-badge {
  display: inline-block;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.3);
  color: var(--accent-blue);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.6;
}

/* Portal Cards Grid */
.portal-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
}

@media (min-width: 768px) {
  .portal-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 26px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(30,41,59,0.45);
  backdrop-filter: blur(20px);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: var(--text-primary);
}

.portal-card:hover {
  transform: translateY(-6px);
}

.portal-card-ac:hover  { border-color: rgba(56,189,248,0.5); box-shadow: 0 20px 50px rgba(56,189,248,0.15); }
.portal-card-fan:hover { border-color: rgba(52,211,153,0.5); box-shadow: 0 20px 50px rgba(52,211,153,0.12); }
.portal-card-muyu:hover{ border-color: rgba(251,191,36,0.5); box-shadow: 0 20px 50px rgba(251,191,36,0.12); }

/* Glow overlay per card */
.card-glow {
  position: absolute;
  top: -30px; right: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.portal-card:hover .card-glow { opacity: 0.6; }
.card-glow-ac   { background: var(--accent-blue); }
.card-glow-fan  { background: var(--accent-emerald); }
.card-glow-muyu { background: var(--accent-amber); }

.card-icon-wrapper {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.portal-card-ac  .card-icon-wrapper { background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.2); }
.portal-card-fan .card-icon-wrapper { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.2); }
.portal-card-muyu .card-icon-wrapper{ background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.2); }

.card-body { flex: 1; }

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

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-arrow {
  align-self: flex-end;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.25s ease;
}

.portal-card:hover .card-arrow {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--bg-primary);
  transform: translateX(4px);
}

.card-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 10px;
  border-radius: 20px;
}

.portal-footer-tip {
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.15);
  color: var(--accent-blue);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 13px;
  text-align: center;
  max-width: 540px;
  line-height: 1.5;
}

.portal-footer-bar {
  padding: 24px 24px 28px;
}

/* ============================================================
   SIMULATOR PAGE LAYOUT (single-page)
   ============================================================ */
.dashboard-container.single-page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 20px;
  z-index: 1;
}

.dashboard-container.single-page .module-card {
  width: 100%;
  max-width: 680px;
}

/* Module Card base */
.module-card {
  background: rgba(30,41,59,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px;
  padding: 30px 28px;
  display: none;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.module-card.active { display: flex; }

.module-card.running {
  border-color: var(--border-glow);
  box-shadow: 0 0 30px var(--ice-glow), 0 20px 60px rgba(0,0,0,0.4);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 26px;
  text-align: center;
  align-self: stretch;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 14px;
  letter-spacing: -0.3px;
}

/* ============================================================
   AIR CONDITIONER STYLES
   ============================================================ */
.ac-device-wrapper {
  width: 100%;
  max-width: 340px;
  margin-bottom: 28px;
  perspective: 600px;
}

.ac-wall-unit {
  width: 100%;
  height: 106px;
  background: linear-gradient(to bottom, #FFFFFF 60%, #E2E8F0 100%);
  border-radius: 14px 14px 6px 6px;
  border: 1px solid #CBD5E1;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.8);
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 20px;
  transition: all 0.5s ease;
}

.ac-grille-line {
  position: absolute;
  top: 8px; left: 5%;
  width: 90%; height: 4px;
  background-color: #94A3B8;
  border-radius: 2px;
  opacity: 0.6;
  box-shadow: 0 6px 0 #94A3B8, 0 12px 0 #94A3B8;
}

.ac-energy-label {
  position: absolute; top: 30px; left: 15px;
  width: 18px; height: 24px;
  background-color: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 2px; padding: 2px;
  display: flex; flex-direction: column; gap: 1.5px;
}
.energy-stripe { height: 2px; border-radius: 1px; }
.energy-stripe.green  { background-color: #10B981; width: 60%; }
.energy-stripe.yellow { background-color: #FBBF24; width: 75%; }
.energy-stripe.orange { background-color: #F97316; width: 90%; }
.energy-stripe.red    { background-color: #EF4444; width: 100%; }

.ac-led-display {
  background-color: #1E293B;
  border: 1.5px solid #475569;
  border-radius: 4px;
  padding: 4px 8px;
  color: #334155;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex; align-items: center; gap: 2px;
  user-select: none;
}

.ac-wall-unit.running .ac-led-display {
  color: #06B6D4;
  background-color: #083344;
  border-color: #0891B2;
  text-shadow: 0 0 8px rgba(6,182,212,0.8);
  box-shadow: 0 0 10px rgba(6,182,212,0.3);
}

.ac-led-icon {
  font-size: 10px; opacity: 0;
  transition: opacity 0.3s ease;
}
.ac-wall-unit.running .ac-led-icon { opacity: 1; }

.ac-swing-flap {
  position: absolute; bottom: 0; left: 5%;
  width: 90%; height: 8px;
  background-color: #CBD5E1;
  border-radius: 0 0 4px 4px;
  border-top: 1px solid #94A3B8;
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.ac-wall-unit.running .ac-swing-flap { transform: rotateX(45deg); }
.ac-wall-unit.running.swinging .ac-swing-flap {
  animation: acFlapSwing 4s ease-in-out infinite alternate;
}
@keyframes acFlapSwing {
  0%   { transform: rotateX(25deg); }
  100% { transform: rotateX(75deg); }
}

.ac-breeze-flow {
  position: absolute; bottom: -40px; left: 10%;
  width: 80%; height: 40px;
  overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity 0.5s ease;
  display: flex; justify-content: space-around;
}
.ac-wall-unit.running .ac-breeze-flow { opacity: 1; }

.wind-stream {
  width: 2px; height: 25px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  border-radius: 1px;
  opacity: 0; transform: translateY(-20px);
}
.ac-wall-unit.running .wind-stream {
  animation: windDrift 1.2s linear infinite;
}
@keyframes windDrift {
  0%   { transform: translateY(-10px) skewX(-10deg); opacity: 0.7; }
  100% { transform: translateY(35px)  skewX(-20deg); opacity: 0; }
}

/* Remote Control */
.ac-remote-wrapper { width: 100%; max-width: 190px; perspective: 800px; }

.ac-remote {
  width: 100%;
  background: linear-gradient(135deg, #F1F5F9 0%, var(--remote-bg) 100%);
  border-radius: 20px;
  border: 1px solid #94A3B8;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45), inset 0 2px 4px #FFF;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.remote-screen {
  background-color: #8F9E8B;
  border: 2px solid #64748B;
  border-radius: 8px; padding: 8px;
  color: #242D21;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
  display: flex; flex-direction: column; gap: 4px;
  min-height: 74px; transition: all 0.3s ease;
}

.screen-row {
  display: flex; justify-content: space-between;
  font-size: 9px; letter-spacing: -0.2px;
}

.screen-indicator { opacity: 0.2; transition: opacity 0.3s ease; }
.screen-indicator.active { opacity: 1; }

.screen-main {
  display: flex; justify-content: center; align-items: baseline;
  padding: 4px 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.remote-temp-val { font-size: 30px; line-height: 1; font-weight: 800; }
.remote-temp-unit { font-size: 12px; margin-left: 2px; }

.remote-keypad { display: flex; flex-direction: column; gap: 8px; }
.keypad-row { display: flex; gap: 8px; justify-content: center; }

.remote-btn {
  flex: 1;
  background: linear-gradient(to bottom, #F8FAFC 0%, #E2E8F0 100%);
  border: 1px solid #CBD5E1;
  border-radius: 10px; padding: 8px 4px;
  cursor: pointer; outline: none; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 2px 0 #94A3B8, 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.1s ease;
}
.remote-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #94A3B8, inset 1px 1px 3px rgba(0,0,0,0.2);
}
.remote-btn.btn-power {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1);
  padding: 6px;
}
.remote-btn.btn-power:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.3);
}
/* When AC is ON the circle turns brighter green, otherwise dark gray */
.remote-btn.btn-power svg circle {
  fill: #374151;
  transition: fill 0.3s ease, filter 0.3s ease;
}
.remote-btn.btn-power.active svg circle {
  fill: #22c55e;
  filter: none;
}
.remote-btn.btn-power .btn-lbl { color: #64748B; }
.btn-icon { font-size: 14px; }
.swing-svg {
  color: #64748B;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-lbl { font-size: 8px; font-weight: bold; color: #64748B; margin-top: 2px; text-transform: uppercase; }
.remote-btn.btn-temp { font-size: 16px; font-weight: bold; background: linear-gradient(to bottom, #F1F5F9 0%, #CBD5E1 100%); }

/* === Fan power key === */
.fan-power-key {
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05) !important;
  border: 1.5px solid rgba(255,255,255,0.1) !important;
  box-shadow: none !important;
}
.fan-power-key svg circle {
  fill: #374151;
  transition: fill 0.3s ease, filter 0.3s ease;
}
.fan-power-key.active svg circle  {
  fill: #22c55e;
  filter: drop-shadow(0 0 5px rgba(34,197,94,0.7));
}

/* ============================================================
   FAN STYLES
   ============================================================ */
.fan-device-container {
  width: 100%; max-width: 320px;
  display: flex; justify-content: center; align-items: center; padding: 10px 0;
}
.fan-device { display: flex; flex-direction: column; align-items: center; position: relative; perspective: 800px; }

.fan-head {
  width: 200px; height: 200px;
  position: relative; z-index: 2;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.fan-guard {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 4px solid #475569;
  background-color: rgba(255,255,255,0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 0 15px rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
  display: flex; justify-content: center; align-items: center;
}

.guard-radial {
  position: absolute; width: 100%; height: 100%;
  background: repeating-conic-gradient(from 0deg, transparent 0deg, transparent 9deg, #64748B 9deg, #64748B 10deg);
  opacity: 0.25;
}
.guard-ring { position: absolute; border: 1.5px solid #64748B; border-radius: 50%; opacity: 0.3; }
.guard-ring.inner { width: 80px; height: 80px; }
.guard-ring.outer { width: 140px; height: 140px; }

.fan-blades-container {
  width: 90%; height: 90%;
  display: flex; justify-content: center; align-items: center;
  transform-origin: center;
  transition: transform 3.5s cubic-bezier(0.1, 0.8, 0.3, 1);
}
.fan-blades-container.speed-1 { animation: fanSpin 0.9s linear infinite; }
.fan-blades-container.speed-2 { animation: fanSpin 0.5s linear infinite; }
.fan-blades-container.speed-3 { animation: fanSpin 0.25s linear infinite; }

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

.fan-motor-housing {
  position: absolute; top: 60px; left: 60px;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #334155 0%, #0F172A 100%);
  border-radius: 50% 50% 30% 30%;
  z-index: -1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  border: 1px solid #475569;
}

.fan-osc-pin {
  position: absolute; top: 50px; left: 96px;
  width: 8px; height: 18px;
  background-color: #CBD5E1;
  border: 1px solid #475569; border-radius: 4px;
  z-index: -1; cursor: pointer;
  transition: transform 0.2s ease;
}
.fan-osc-pin.active { transform: translateY(6px); }

.fan-stand-pole {
  width: 16px; height: 120px;
  background: linear-gradient(to right, #475569 0%, #64748B 30%, #334155 100%);
  border-left: 1px solid #1E293B; border-right: 1px solid #1E293B;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); z-index: 1;
}

.fan-base {
  width: 185px;
  background: linear-gradient(to bottom, #334155 0%, #1E293B 100%);
  border-radius: 16px 16px 8px 8px;
  border: 2px solid #475569; padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 1px 3px rgba(255,255,255,0.2);
  z-index: 2;
}

.fan-buttons-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background-color: #0F172A;
  padding: 6px; border-radius: 20px;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.fan-power-row,
.fan-speed-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.fan-key {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #F1F5F9 0%, #94A3B8 100%);
  border: 1px solid #475569;
  color: #1E293B; font-weight: 800; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 #475569, 0 3px 4px rgba(0,0,0,0.3);
  transition: all 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
}
.fan-key.active {
  background: linear-gradient(to bottom, var(--accent-blue) 0%, #0284C7 100%);
  color: white;
  transform: none;
  box-shadow: 0 3px 0 #475569, inset 1px 1px 3px rgba(0,0,0,0.4);
}

.fan-osc-toggle .osc-btn {
  background-color: #0F172A;
  border: 1px solid #475569; border-radius: 12px;
  padding: 6px 14px;
  color: var(--text-primary); font-size: 11px;
  font-family: inherit; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.osc-btn:hover { border-color: var(--accent-blue); }

.osc-led {
  width: 6px; height: 6px; border-radius: 50%;
  background-color: #EF4444; transition: all 0.3s ease;
}
.osc-btn.active .osc-led {
  background-color: var(--led-green);
  box-shadow: 0 0 6px var(--led-green);
}

.fan-device.oscillating .fan-head {
  animation: fanOscillate 6s ease-in-out infinite alternate;
}
@keyframes fanOscillate {
  0%   { transform: rotateY(-25deg); }
  100% { transform: rotateY(25deg); }
}

/* ============================================================
   WOODEN FISH (MUYU) STYLES — Realistic image version
   ============================================================ */
.muyu-scoreboard {
  display: flex; gap: 16px;
  width: 100%; max-width: 300px;
  margin-bottom: 22px;
}

.score-card {
  flex: 1;
  background-color: rgba(15,23,42,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.3);
}
.score-label {
  font-size: 10px; color: var(--text-secondary);
  text-transform: uppercase; font-weight: bold;
  letter-spacing: 0.5px; margin-bottom: 4px; text-align: center;
}
.score-val { font-size: 24px; font-weight: 800; color: var(--accent-blue); text-shadow: 0 0 10px rgba(56,189,248,0.2); }
.score-unit { font-size: 11px; color: var(--text-secondary); }

/* Playfield */
.muyu-playfield {
  width: 100%; height: 240px; max-width: 360px;
  display: flex; justify-content: center; align-items: center;
  position: relative;
}

.muyu-float-container {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}

.float-meme {
  position: absolute; color: #FFF;
  font-weight: bold; font-size: 14px; white-space: nowrap;
  pointer-events: none;
  animation: floatMemeUp 1.2s cubic-bezier(0.25,1,0.5,1) forwards;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 15px var(--accent-cyan);
}

@keyframes floatMemeUp {
  0%   { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(-50%, -110px) scale(1.1) rotate(var(--float-rot)); opacity: 0; }
}

/* Muyu image wrapper */
.muyu-wrapper {
  position: relative;
  width: 200px; height: 200px;
  display: flex; justify-content: center; align-items: center;
}

/* Fish image */
.muyu-body {
  width: 190px; height: 190px;
  cursor: pointer; outline: none;
  transition: transform 0.05s ease;
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}

.muyu-fish-img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(180,100,30,0.5));
  transition: filter 0.1s ease;
}

.muyu-body:hover .muyu-fish-img {
  filter: drop-shadow(0 12px 32px rgba(230,140,60,0.7));
}

.muyu-body.tap-animate {
  animation: muyuSquash 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes muyuSquash {
  0%   { transform: scale(1); }
  25%  { transform: scale(0.9) translateY(4px); }
  60%  { transform: scale(1.07) translateY(-3px); }
  100% { transform: scale(1); }
}

/* Mallet image */
.muyu-mallet {
  position: absolute;
  top: -30px; right: -50px;
  width: 70px; height: 140px;
  pointer-events: none; z-index: 3;
  transform-origin: 50% 90%;
  transition: transform 0.1s ease;
}

.muyu-mallet-img {
  width: 100%; height: 100%;
  object-fit: contain;
  transform: rotate(35deg);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5));
}

.muyu-mallet.strike-animate {
  animation: malletStrike 0.22s ease-out;
}
@keyframes malletStrike {
  0%   { transform: rotate(0deg); }
  30%  { transform: rotate(-30deg); }
  55%  { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}

/* Controls */
.muyu-controls {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 300px; margin-top: 18px;
}

.muyu-action-btn {
  background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 13px;
  font-weight: bold; font-size: 14px; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 #451a03, 0 6px 16px rgba(0,0,0,0.3);
  transition: all 0.1s ease;
  letter-spacing: 0.3px;
}
.muyu-action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #451a03, 0 2px 4px rgba(0,0,0,0.2);
}

.auto-tap-setting {
  display: flex; align-items: center; gap: 10px;
  background-color: rgba(15,23,42,0.4);
  padding: 8px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.auto-tap-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); flex-grow: 1; }

.muyu-speed-select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 8px; border-radius: 8px;
  font-size: 11px; font-family: inherit; outline: none; cursor: pointer;
}

/* iOS toggle switch */
.switch-container { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch-container input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #475569; border-radius: 22px; transition: .3s;
}
.switch-slider:before {
  position: absolute; content: "";
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: .3s;
}
.switch-container input:checked + .switch-slider { background-color: var(--accent-blue); }
.switch-container input:checked + .switch-slider:before { transform: translateX(18px); }

.muyu-reset-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 8px; border-radius: 10px;
  font-size: 11px; cursor: pointer; font-family: inherit; font-weight: 600;
  transition: all 0.2s ease; align-self: center;
}
.muyu-reset-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.3); }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  padding: 24px 24px 28px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background-color: rgba(15,23,42,0.9);
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

.tips-box {
  background-color: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.15);
  color: var(--accent-blue);
  border-radius: 12px; padding: 10px 18px;
  font-size: 12px; text-align: center; max-width: 500px; line-height: 1.5;
}

.action-bar { display: flex; justify-content: center; width: 100%; }

.share-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0284C7 100%);
  color: var(--bg-primary); font-weight: 800; font-size: 14px;
  padding: 12px 30px; border-radius: 25px; border: none; cursor: pointer;
  box-shadow: 0 4px 18px rgba(56,189,248,0.35);
  transition: all 0.3s ease; font-family: inherit;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(56,189,248,0.45); }
.share-btn:active { transform: translateY(0); }

.copyright { font-size: 11px; color: var(--text-secondary); text-align: center; }

/* ============================================================
   RESPONSIVE OVERRIDES FOR SMALLER SCREENS
   ============================================================ */
@media (max-width: 600px) {
  .app-header { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .portal-header { flex-wrap: wrap; gap: 12px; }
  .logo-area h1 { font-size: 18px; }
  .portal-title { font-size: 22px; }
  .page-nav { gap: 4px; padding: 4px; }
  .nav-item { padding: 6px 10px; font-size: 12px; }
  .dashboard-container.single-page { padding: 16px 12px; }
  .module-card { padding: 20px 16px; border-radius: 20px; }
  .muyu-wrapper { width: 160px; height: 160px; }
  .muyu-body { width: 150px; height: 150px; }
  .muyu-mallet { width: 55px; height: 110px; top: -24px; right: -36px; }
  .portal-main { padding: 28px 16px 48px; }
  .portal-cards { gap: 16px; }
  .portal-card { padding: 22px 18px 18px; }
}
