:root {
  --primary-glow: rgba(0, 240, 255, 0.4);
  --glass-bg: rgba(7, 26, 44, 0.65);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-main: #ffffff;
  --text-dim: #94b8db;
  --accent-cyan: #00f2fe;
  --accent-gold: #ffd200;
  --accent-green: #00e676;
  --accent-red: #ff5252;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #020b14;
  font-family: 'Nunito', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 30%, #083b66 0%, #031e38 50%, #020f1e 100%);
}

#aquarium-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Glassmorphism Common Style */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 242, 254, 0.08);
  border-radius: 20px;
}

/* Top HUD */
.hud-top {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
}

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.6));
  animation: floatIcon 3s ease-in-out infinite;
}

.brand-info .brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info .brand-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 26px;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 700;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.stat-value.highlight {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
}

.stat-limit {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 600;
}

.stat-divider {
  width: 2px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  transition: all 0.3s ease;
}

.status-indicator.offline {
  background-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

/* QR Card Overlay */
.qr-card {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  max-width: 440px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-wrapper {
  background: #ffffff;
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrapper img {
  width: 110px;
  height: 110px;
  display: block;
  border-radius: 6px;
}

.qr-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.2px;
}

.qr-bot {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.qr-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Empty State */
.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  padding: 36px 48px;
  text-align: center;
  max-width: 520px;
  opacity: 1;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.empty-state.hidden {
  opacity: 0;
  transform: translate(-50%, -40%);
  visibility: hidden;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: pulseWater 2.5s infinite ease-in-out;
}

.empty-state h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.empty-state p {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 18px;
}

.empty-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Bottom Left Controls */
.controls-bottom-left {
  position: absolute;
  bottom: 28px;
  left: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.control-btn:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
  transform: scale(1.08);
}

.control-btn.active {
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(5deg); }
}

@keyframes pulseWater {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.8)); }
}

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

/* 4K TV scaling */
@media (min-width: 2500px) {
  .brand-info .brand-title { font-size: 2.2rem; }
  .brand-info .brand-sub { font-size: 1.2rem; }
  .stat-label { font-size: 1.4rem; }
  .stat-value { font-size: 2.2rem; }
  .qr-card { max-width: 600px; padding: 24px 32px; }
  .qr-wrapper img { width: 160px; height: 160px; }
  .qr-bot { font-size: 1.8rem; }
  .qr-steps { font-size: 1.2rem; }
}
