/* DESIGN SYSTEM: Obsidian Glassmorphism */
:root {
  --bg-color: #060813;
  --card-bg: rgba(10, 15, 30, 0.5);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-border-focus: rgba(255, 255, 255, 0.15);
  
  /* HSL Accents */
  --accent-cyan: hsl(197, 90%, 55%);
  --accent-cyan-glow: hsla(197, 90%, 55%, 0.15);
  --accent-purple: hsl(271, 85%, 63%);
  --accent-purple-glow: hsla(271, 85%, 63%, 0.15);
  --accent-emerald: hsl(150, 75%, 45%);
  --accent-emerald-glow: hsla(150, 75%, 45%, 0.15);
  --accent-orange: hsl(24, 95%, 55%);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & CORE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  font-family: var(--font-family);
  color: var(--text-main);
  max-width: 100%;
  min-height: 100vh;
  position: relative;
  margin: 0;
}

/* PREMIUM SCROLLBAR SYSTEM */
html::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-track {
  background: var(--bg-color);
}
html::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 2px solid var(--bg-color);
  transition: var(--transition-smooth);
}
html::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* BACKDROP NEON BLOBS */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.45;
  mix-blend-mode: screen;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: float-blob-1 25s infinite ease-in-out;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: float-blob-2 30s infinite ease-in-out;
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-emerald-glow) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-blob-3 20s infinite ease-in-out;
}

@keyframes float-blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, 80px) scale(1.2); }
  66% { transform: translate(-50px, 150px) scale(0.9); }
}

@keyframes float-blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-150px, -100px) scale(0.9); }
}

@keyframes float-blob-3 {
  0%, 100% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(120px, 70px) scale(1.2); }
}

/* UTILITIES */
.hidden {
  display: none !important;
}

/* GLASS CARD TEMPLATE */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--card-border-focus);
  box-shadow: 0 20px 48px 0 rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* AUTHENTICATION SCREEN */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 30px 20px;
  overflow-y: auto;
  gap: 32px;
  background: rgba(3, 5, 10, 0.82);
}

.auth-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 35px;
  text-align: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: scale(1) translateZ(0);
  pointer-events: auto;
}

.login-card.hidden-auth {
  opacity: 0;
  transform: scale(0.96) translateZ(0);
  pointer-events: none;
}

.login-header {
  margin-bottom: 35px;
}

.logo-icon {
  font-size: 2.8rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  display: inline-block;
  filter: drop-shadow(0 0 15px var(--accent-cyan-glow));
}

.login-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.input-group input {
  width: 100%;
  padding: 16px 16px 16px 45px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1.05rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-group input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.login-error {
  color: hsl(0, 85%, 65%);
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-align: left;
  padding-left: 5px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-submit:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  gap: 15px;
}

/* MAIN DASHBOARD STRUCTURE */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 25px;
  animation: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HEADER */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header-brand h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.version-tag {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
  padding: 3px 10px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
}

.server-address {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-address i {
  font-size: 0.8rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.time-display {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.btn-logout {
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: hsl(0, 85%, 65%);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  background: hsl(0, 85%, 60%);
  color: var(--text-dark);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-chess {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #0f172a;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  font-size: 1.1rem;
}

.btn-chess i {
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8));
}

.btn-chess:hover {
  background: linear-gradient(135deg, #ffffff 0%, #1e293b 100%);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* SYSTEM OVERVIEW BAR */
.status-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 20px;
  margin-bottom: 30px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.status-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.status-value {
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
}

.font-bold {
  font-weight: 800;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot.green {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.border-left {
  border-left: 1px solid var(--card-border);
  padding-left: 14px;
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* GENERIC SERVICE CARD */
.service-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.service-meta {
  display: flex;
  gap: 15px;
  align-items: center;
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
}

.icon-mihomo {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.icon-mtproto {
  background: rgba(36, 161, 222, 0.08);
  color: #24A1DE;
  border: 1px solid rgba(36, 161, 222, 0.2);
}

.icon-smarthome {
  background: var(--accent-emerald-glow);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-mikrotik {
  background: rgba(48, 117, 196, 0.08);
  color: #3075c4;
  border: 1px solid rgba(48, 117, 196, 0.25);
}

.service-meta h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

.service-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-offline {
  background: rgba(239, 68, 68, 0.1);
  color: hsl(0, 85%, 65%);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-demo {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.selector-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.08);
  margin-top: 4px;
}

.selector-badge i {
  font-size: 0.8rem;
  animation: pulse-glow-badge 2s infinite ease-in-out;
}

@keyframes pulse-glow-badge {
  0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 1px var(--accent-cyan)); }
  50% { opacity: 1; filter: drop-shadow(0 0 4px var(--accent-cyan)); }
}

/* MIHOMO SPECIFICS */
.chart-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 15px;
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
  overflow: hidden;
}

#mihomo-traffic-chart {
  width: 100%;
  height: 120px;
  display: block;
}

.chart-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.speed-number {
  font-family: monospace;
  color: var(--accent-cyan);
  font-weight: bold;
}

.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.mini-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.mini-stat .label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mini-stat .value {
  font-size: 1rem;
  font-weight: 600;
}

.node-switcher-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: none;
}

.switcher-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  align-items: center;
}

.active-node-name {
  color: var(--accent-cyan);
  font-weight: 600;
  background: var(--accent-cyan-glow);
  padding: 2px 10px;
  border-radius: 10px;
}

.nodes-scroller {
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 5px;
  min-height: 120px; /* Prevents layout collapse jitter during updates */
}

/* Custom Scrollbars */
.nodes-scroller::-webkit-scrollbar {
  width: 4px;
}
.nodes-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.node-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.node-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-cyan);
}

.node-item.active {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
  font-weight: 600;
}

.node-ping {
  font-family: monospace;
  font-size: 0.8rem;
}

.ping-green { color: var(--accent-emerald); }
.ping-yellow { color: var(--accent-orange); }
.ping-red { color: hsl(0, 85%, 65%); }

/* MTPROTO SPECIFICS */
.connections-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.connections-glow-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 161, 222, 0.05) 0%, transparent 70%);
  border: 2px dashed rgba(36, 161, 222, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 25px rgba(36, 161, 222, 0.2);
  animation: rotate-dashed 40s linear infinite;
}

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

/* Stop connection text from spinning */
.connections-count, .connections-label {
  animation: counter-rotate-dashed 40s linear infinite;
}
@keyframes counter-rotate-dashed {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

.connections-count {
  font-size: 3rem;
  font-weight: 800;
  color: #24A1DE;
  line-height: 1;
  text-shadow: 0 0 15px rgba(36, 161, 222, 0.3);
}

.connections-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mtproto-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stats-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.stats-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.stats-card-icon {
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.03);
}

.stats-card-info {
  display: flex;
  flex-direction: column;
}

.stats-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.info-table {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 8px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid var(--card-border);
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
}

/* SMART HOME SPECIFICS */
.temp-hero-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
  width: 100%;
}

.tuya-climate-display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.tuya-climate-display.dual-zone {
  justify-content: space-between;
  gap: 15px;
  padding: 10px 5px;
}

.tuya-climate-display.single-zone {
  justify-content: center;
  padding: 15px 0;
}

.climate-zone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.climate-zone-card.centered {
  flex: none;
}

.zone-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-size: 1.15rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.4s ease-out;
}

.zone-temp-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.zone-temp-val {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  transition: var(--transition-smooth);
}

.zone-temp-val.large {
  font-size: 4.8rem;
}

.zone-temp-unit {
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 1px;
}

.zone-temp-unit.large {
  font-size: 1.8rem;
  margin-left: 2px;
}

.zone-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 10px;
  text-transform: uppercase;
}

.zone-label.large {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  margin-top: 15px;
}

.climate-zone-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, var(--card-border), transparent);
}

.smarthome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.smart-grid-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.smart-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
}

.smart-card-icon.blue {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.smart-card-icon.green {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.smart-card-icon.orange {
  background: rgba(249, 115, 22, 0.08);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.15);
}

.smart-card-meta {
  display: flex;
  flex-direction: column;
}

.smart-card-meta .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.smart-card-meta .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.integration-notice {
  background: rgba(249, 115, 22, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-radius: 12px;
  padding: 12px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.8rem;
  color: #fed7aa;
}

.notice-icon {
  font-size: 1.2rem;
  color: var(--accent-orange);
}

.notice-text strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

/* RESPONSIVE RESPONSIVENESS */
@media(max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 768px) {
  .bg-glow {
    display: none; /* Disable absolute off-screen neon blobs on mobile */
  }

  .dashboard-container {
    padding: 20px 14px; /* Narrower padding to maximize screen usage */
  }

  .main-header {
    flex-direction: row; /* Keep brand and time inline on mobile */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
  }

  .header-brand h1 {
    font-size: 1.5rem; /* Scale down heading */
  }

  .version-tag {
    font-size: 0.7rem;
    padding: 2px 7px;
    margin-left: 4px;
  }

  .server-address {
    font-size: 0.78rem;
    margin-top: 3px;
  }

  .header-actions {
    width: auto;
    gap: 8px;
  }

  .time-display {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 8px;
  }

  .btn-logout {
    padding: 8px 10px;
    border-radius: 8px;
  }

  /* CRITICAL FIX: Convert status bar into a gorgeous 3x2 grid, removing horizontal nowrap overflow entirely */
  .status-summary-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 8px;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 20px;
  }

  .status-indicator {
    font-size: 0.72rem; /* Compact size */
    gap: 4px;
    flex-direction: column; /* Icon/label on top, value below */
    align-items: center;
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    transition: var(--transition-smooth);
  }

  .status-indicator:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .status-indicator.border-left {
    border-left: none; /* Remove left borders since it's a grid now */
    padding-left: 0;
  }

  /* Grid Layout */
  .dashboard-grid {
    grid-template-columns: 1fr !important; /* Force single column */
    gap: 20px;
  }

  .service-card {
    padding: 20px 15px; /* Narrower padding */
    border-radius: 16px;
  }

  .card-header {
    margin-bottom: 18px;
  }

  .service-icon {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .service-meta h3 {
    font-size: 1.05rem;
  }

  .service-subtitle {
    font-size: 0.72rem;
  }

  .badge {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  /* Inner elements */
  .mtproto-stats-grid, .smarthome-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Keep side-by-side but compact */
    gap: 8px;
  }

  .stats-card, .smart-grid-card {
    padding: 8px;
    border-radius: 10px;
    gap: 6px;
  }

  .stats-card-icon, .smart-card-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .stats-card-value, .smart-card-meta .value {
    font-size: 0.85rem;
  }

  .temp-val {
    font-size: 2.8rem;
  }

  .temp-unit {
    font-size: 1.2rem;
  }

  .chart-container {
    padding: 10px;
    margin-bottom: 15px;
  }

  #mihomo-traffic-chart {
    height: 90px;
  }

  .node-switcher-box {
    padding: 10px;
    max-height: none;
  }

  .node-item {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .clients-list-container {
    padding: 8px;
    margin-top: 10px;
  }

  .clients-list {
    max-height: 90px;
  }
}

/* ROOM SELECTOR TABS */
.smarthome-tabs-wrapper {
  margin-bottom: 25px;
  width: 100%;
}

.room-tabs-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  padding: 4px;
  border-radius: 12px;
  width: 100%;
}

.room-tab {
  background: transparent;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-align: center;
  white-space: nowrap;
}

.room-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.room-tab.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

/* SLEEK HEADER ACTION BUTTONS */
.btn-toggle-history-header {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-toggle-history-header:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

/* EXTERNAL TEMP DISPLAY */
.temp-external-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 5px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 15px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.05);
  animation: fadeIn 0.3s ease-out;
}

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

/* ACTIVE CLIENTS LIST */
.clients-list-container {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  margin-top: 15px;
  animation: fadeIn 0.3s ease-out;
}

.clients-list-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 38px; /* Prevents list layout collapse jitter during updates */
}

.client-row-complex {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  gap: 8px;
  transition: all 0.2s ease;
}

.client-row-complex:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-ip-complex {
  color: var(--accent-purple);
  font-weight: 600;
  font-family: monospace;
}

.client-isp-complex {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.client-time-complex {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.client-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.12);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-item.rx .metric-label {
  color: #00e676; /* Bright neon green for Down */
}

.metric-item.tx .metric-label {
  color: #d500f9; /* Bright neon purple for Up */
}

.metric-total {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* SLEEK MINI PROGRESS TRACKS */
.mini-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.mini-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.bar-rx {
  background: linear-gradient(90deg, #00B956, #00e676);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.6);
}

.bar-tx {
  background: linear-gradient(90deg, #b000e6, #d500f9);
  box-shadow: 0 0 6px rgba(213, 0, 249, 0.6);
}

.icon-rx {
  animation: pulseDown 1.5s infinite ease-in-out;
}

.icon-tx {
  animation: pulseUp 1.5s infinite ease-in-out;
}

@keyframes pulseDown {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(1.5px); opacity: 1; }
}

@keyframes pulseUp {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-1.5px); opacity: 1; }
}

/* SYSTEM & CLIMATE HISTORY GRAPH SPECIFICS */
.system-history-card {
  margin-bottom: 25px;
  padding: 25px;
  animation: fadeIn 0.4s ease-out;
}

.chart-header-complex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-header-complex .chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-selector, .climate-range-selector {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-range, .btn-climate-range {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-range:hover, .btn-climate-range:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-range.active, .btn-climate-range.active {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.btn-close-chart {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
  margin-left: 5px;
}

.btn-close-chart:hover {
  color: #f43f5e;
}

.chart-body-complex {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.15);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid var(--card-border);
}

.chart-legend, .climate-legend {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-muted);
  justify-content: flex-end;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

#system-history-chart, #climate-history-chart {
  width: 100%;
  display: block;
}

/* SMARTHOME CLIMATE HISTORY STYLING */
.smarthome-tabs-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
  width: 100%;
}

.btn-toggle-history {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-toggle-history:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.climate-history-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.15);
  padding: 15px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  animation: fadeIn 0.4s ease-out;
}

.history-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-back-to-gauge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-back-to-gauge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Clicking indicators cursor feedback */
.status-indicator.clickable {
  cursor: pointer;
  user-select: none;
}

/* Mobile adjustments */
@media(max-width: 768px) {
  .smarthome-tabs-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .btn-toggle-history {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }
  
  .history-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .climate-range-selector {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn-climate-range {
    flex: 1;
    text-align: center;
    padding: 6px 2px;
  }
  
  .chart-header-complex {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .range-selector {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn-range {
    flex: 1;
    text-align: center;
    padding: 6px 2px;
  }
  
  .chart-body-complex {
    padding: 10px;
  }
  
  .chart-legend, .climate-legend {
    justify-content: space-between;
    width: 100%;
    font-size: 0.72rem;
  }
}

.btn-refresh-ping:hover {
  color: #38bdf8 !important;
}
.btn-refresh-ping.spinning i {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* WireGuard Detailed Clients Styles */
.wg-peers-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.wg-peers-list::-webkit-scrollbar {
  width: 4px;
}
.wg-peers-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.wg-peer-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}
.wg-peer-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.03);
}
.wg-peer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wg-peer-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wg-peer-name i {
  color: #38bdf8;
  font-size: 0.7rem;
}
.wg-peer-ip {
  font-size: 0.72rem;
  color: #38bdf8;
  font-family: monospace;
}
.wg-peer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.wg-peer-geo {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wg-peer-traffic {
  font-family: monospace;
  color: var(--text-main);
  font-size: 0.65rem;
}
.wg-peer-handshake {
  font-size: 0.62rem;
  color: #10b981;
  font-weight: 500;
}
.btn-toggle-wg-peers:hover {
  color: #38bdf8 !important;
}
#btn-toggle-system-history:hover {
  background: rgba(168, 85, 247, 0.12) !important;
}
#btn-toggle-system-history:hover span {
  color: #d8b4fe !important;
}

/* Docker Action Buttons Styling */
.btn-docker {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.7rem;
}
.btn-docker:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transform: translateY(-1px);
}
.btn-docker:active {
  transform: translateY(0);
}
.btn-docker:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-docker.start {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.04);
}
.btn-docker.start:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}
.btn-docker.stop {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
}
.btn-docker.stop:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.btn-docker.restart {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.04);
}
.btn-docker.restart:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}
.docker-actions-group {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

/* MODAL OVERLAY & CONTENT STYLE FOR DROP DETAILS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 19, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  animation: modal-fade-in 0.3s ease-out;
}

.modal-content {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid var(--card-border-focus);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}

.clickable-panel:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.1);
}

#panel-meister.clickable-panel:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Quick Games Tiles on Login Page */
.quick-games-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-right: 0;
  width: auto;
  max-width: 800px;
  z-index: 10;
  animation: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.game-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.game-tile:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.chess-tile:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.1);
}

.navy-tile:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.1);
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  margin-right: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.chess-tile .tile-icon {
  background: rgba(168, 85, 247, 0.08);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.15);
}

.chess-tile:hover .tile-icon {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
  transform: scale(1.05);
}

.navy-tile .tile-icon {
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.navy-tile:hover .tile-icon {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
  transform: scale(1.05);
}

.tile-content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.tile-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
  line-height: 1.2;
}

.tile-content p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.tile-action {
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.75;
  transition: all 0.3s ease;
  margin-left: 12px;
  flex-shrink: 0;
}

.chess-tile .tile-action {
  color: #c084fc;
}

.navy-tile .tile-action {
  color: #38bdf8;
}

.game-tile:hover .tile-action {
  opacity: 1;
}

.game-tile:hover .tile-action i {
  transform: translateX(3px);
}

.tile-action i {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .quick-games-container {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    gap: 12px;
  }
  .auth-overlay {
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
    gap: 20px;
  }
}

/* Ping Monitor Grid & Tiles Upgrade */
.ping-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 12px;
}

.ping-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease-in-out;
}

.ping-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.ping-logo-wrap {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ping-label {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ping-value {
  font-size: 0.98rem;
  font-weight: 800;
}

@media (max-width: 500px) {
  .ping-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

/* Keyhole Overlay Card & Pulsing Animations */
.keyhole-card {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 8, 0.94);
  border: 1px solid rgba(255, 50, 50, 0.15);
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  pointer-events: auto;
}

.keyhole-card.clicked {
  opacity: 0;
  transform: scale(0.9) rotate(-3deg) translateZ(0);
  pointer-events: none;
}

.keyhole-card:hover {
  border-color: rgba(255, 50, 50, 0.45);
  box-shadow: 0 0 40px rgba(255, 50, 50, 0.2);
}

.keyhole-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.keyhole-svg-container {
  width: 150px;
  height: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.keyhole-card:hover .keyhole-svg-container {
  transform: scale(1.06);
}

/* Pulsing Red Light Animations */
@keyframes keyhole-glow-pulse {
  0% {
    opacity: 0.35;
    filter: drop-shadow(0 0 8px rgba(255, 30, 30, 0.4));
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 25px rgba(255, 30, 30, 0.9));
  }
  100% {
    opacity: 0.35;
    filter: drop-shadow(0 0 8px rgba(255, 30, 30, 0.4));
  }
}

@keyframes keyhole-light-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.8));
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    filter: drop-shadow(0 0 18px rgba(255, 0, 0, 1));
  }
  100% {
    transform: scale(0.9);
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.8));
  }
}

.keyhole-glow-path {
  animation: keyhole-glow-pulse 2.8s infinite ease-in-out;
}

.keyhole-light-source {
  animation: keyhole-light-pulse 1.4s infinite ease-in-out;
  transform-origin: 50px 50px; /* Center of the circle (cx=50, cy=50) */
}

/* Futuristic Tooltip styles */
.keyhole-tooltip {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 3, 3, 0.85);
  border: 1px solid rgba(255, 50, 50, 0.45);
  box-shadow: 0 0 15px rgba(255, 50, 50, 0.2);
  color: #ff5555;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  z-index: 30;
}

.keyhole-card:hover .keyhole-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
