:root {
  --primary-bg-color: #e3f2fd;
  --secondary-bg-color: #a4d2f4;
  --text-color: #000000b5;
  --icon-color: #5face4;
  --txt-title-color: #4696d1;
}

header {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  padding: 12px 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

.profile-Icon {
  position: relative;
}

.profile-Icon img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.profile-Icon img:hover {
  transform: scale(1.05);
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d9f4ff;
  border:1px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-button i {
  font-size: 24px;
  color: #4696d1;
}

.back-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-button:active {
  transform: scale(0.95);
}

.brandName {
  text-align: center;
  flex: 1;
}

.brandName h2 {
  margin: 0;
}

.brandName img {
  width: 100px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.brandName img:hover {
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wifi-status-btn {
  position: relative;
  background: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.wifi-status-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wifi-status-btn.connected {
  background: #3ac7ad;
}

.wifi-status-btn.disconnected {
  background: linear-gradient(135deg, #f44336, #ef5350);
}

.wifi-status-btn i {
  font-size: 22px;
  color: #eff8ff;
}

.wifi-status-btn.checking i {
  color: var(--icon-color);
}

.status-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0ba185;
  animation: pulse 2s infinite;
}

.status-pulse.offline {
  background: #f44336;
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.wifi-tooltip {
  position: absolute;
  bottom: -35px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.wifi-status-btn:hover .wifi-tooltip {
  opacity: 1;
}

/* Responsive header styles */
@media (min-width: 768px) {
  header {
    padding: 15px 30px;
  }

  .profile-Icon img {
    width: 52px;
    height: 52px;
  }

  .brandName img {
    width: 120px;
  }

  .wifi-status-btn {
    width: 52px;
    height: 52px;
  }

  .wifi-status-btn i {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  header {
    padding: 10px 12px;
  }

  .profile-Icon img {
    width: 44px;
    height: 44px;
  }

  .brandName img {
    width: 85px;
  }

  .wifi-status-btn {
    width: 44px;
    height: 44px;
  }

  .wifi-status-btn i {
    font-size: 20px;
  }

  .header-actions {
    gap: 8px;
  }
}

.bm-home {
  text-align: center;
  color: #5c5c5c;
}

.color_icon_active {
  color: #0078cf;
}

/* Modern Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 8px 0 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  border-top: 1px solid rgba(95, 172, 228, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #a4b5c6;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 12px;
  min-width: 70px;
}

.nav-item:hover {
  background: rgba(95, 172, 228, 0.05);
}

.nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-item i {
  transition: all 0.3s ease;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  transition: all 0.3s ease;
}

/* Active State */
.nav-item.active {
  color: #5face4;
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

.nav-item.active .nav-label {
  font-weight: 600;
}

/* Center QR Button */
.nav-item.nav-center {
  position: relative;
  margin-top: -20px;
}

.nav-icon-center {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #5face4 0%, #4696d1 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(95, 172, 228, 0.4);
  transition: all 0.3s ease;
}

.nav-icon-center i {
  font-size: 26px;
  color: white;
}

.nav-item.nav-center:hover .nav-icon-center {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(95, 172, 228, 0.5);
}

.nav-item.nav-center:active .nav-icon-center {
  transform: translateY(-1px) scale(1);
}

/* Responsive */
@media (max-width: 576px) {
  .nav-container {
    padding: 0 10px;
  }

  .nav-item {
    min-width: 60px;
    padding: 6px 12px;
  }

  .nav-icon {
    font-size: 22px;
  }

  .nav-label {
    font-size: 10px;
  }

  .nav-icon-center {
    width: 52px;
    height: 52px;
  }

  .nav-icon-center i {
    font-size: 24px;
  }
}

@media (max-width: 400px) {
  .nav-item {
    min-width: 50px;
    padding: 6px 8px;
  }

  .nav-icon {
    font-size: 20px;
  }

  .nav-label {
    font-size: 9px;
  }

  .nav-icon-center {
    width: 48px;
    height: 48px;
  }

  .nav-icon-center i {
    font-size: 22px;
  }
}

.dv-heading {
  border-bottom: 2px dashed var(--secondary-bg-color);
}

.dv-heading h2 {
  font-size: 20px;
  color: var(--icon-color);
}

.card a {
  text-decoration: none;
}

.wifi-status {
  position: absolute;
  right: 3px;
  top: -3px;
  font-size: 20px;
  color: green;
}

.deviceIcon {
  font-size: 50px;
  color: var(--icon-color);
}

.submit-bn {
  background: var(--secondary-bg-color) !important;
  border: none !important;
  color: var(--text-color) !important;
}

.card-title {
  color: var(--txt-title-color) !important;
}

.app-menu ul li {
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--secondary-bg-color);
}

.app-menu ul li a {
  color: var(--text-color);
  width: 100%;
}

.app-menu i {
  font-size: 20px;
  margin-right: 5px;
  color: var(--txt-title-color);
}

.app-menu span {
  position: absolute;
  right: 15px;
}

.customer-info {
  padding: 0px 15px;
}

.customer-info label {
  font-size: 18px;
  line-height: 35px;
}

/* WiFi Modal Styles */
.wifi-modal .modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

.wifi-modal-header {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-bottom: none;
  padding: 1.5rem;
}

.wifi-header-icon {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wifi-header-icon i {
  font-size: 24px;
  color: var(--icon-color);
}

.wifi-modal-body {
  padding: 1.5rem;
  max-height: 60vh;
}

.wifi-stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-item i {
  font-size: 28px;
}

.stat-connected i {
  color: #4caf50;
}

.stat-disconnected i {
  color: #f44336;
}

.stat-total i {
  color: var(--icon-color);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--txt-title-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-color);
  margin-top: 0.25rem;
}

.empty-wifi-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.empty-icon i {
  font-size: 40px;
  color: var(--icon-color);
}

.empty-wifi-state h5 {
  color: var(--txt-title-color);
  margin-bottom: 0.5rem;
}

.empty-wifi-state p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.devices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wifi-device-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.wifi-device-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.device-icon-wrapper {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--icon-color), var(--txt-title-color));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-icon-wrapper i {
  font-size: 22px;
  color: white;
}

.device-info-wrapper {
  flex: 1;
  min-width: 0;
}

.device-name {
  font-weight: 600;
  color: var(--txt-title-color);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-wifi-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-color);
}

.device-wifi-info i {
  font-size: 14px;
}

.device-status-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-online {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-offline {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.btn-disconnect {
  background: white;
  border: 1px solid #f44336;
  color: #f44336;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-disconnect:hover {
  background: #f44336;
  color: white;
}

@media (max-width: 576px) {
  .wifi-stats-summary {
    grid-template-columns: 1fr;
  }

  .wifi-device-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .device-status-wrapper {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.wifi-status {
  font-size: 1.2rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  gap: 5px;
}

.device-title {
  text-align: center;
  font-size: 24px;
  margin-top: 20px;
  font-weight: bold;
  color: #2c3e50;
}

.device-control-card {
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px #ddd;
  background-color: #fff;
  margin-bottom: 20px;
}

.device-toggle-btn {
  width: 80%;
  padding: 5px;
}

.device-slider {
  width: 100%;
}

.modal-open {
  padding-right: 0 !important;
  overflow-y: scroll !important;
}

#loaderOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-bg-color);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Modern Transparent Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

/* Modern Spinner Container */
.spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

/* Outer Ring */
.spinner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(95, 172, 228, 0.2);
  border-radius: 50%;
}

/* Animated Ring */
.spinner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #5FACE4;
  border-right-color: #5FACE4;
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Pulse Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Fade out animation */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Preloader Content */
.preloader-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo in Center */
.preloader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: #5FACE4;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Pulse Animation for Logo */
@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

#main-content {
  position: relative;
  /* Needed to contain the absolute loader */
}


/* control-page style */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: #4caf50;
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(26px);
}

.toggle-label {
  margin-left: 12px;
  vertical-align: middle;
  font-weight: 500;
}

.modal-content {
  border-radius: 1rem;
  border: none;
  padding: 10px 0;
  background: #fefefe;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-weight: 600;
  color: #0b5394;
}

.modal-body label {
  font-weight: 500;
  color: #333;
}

.modal-body .form-control,
.modal-body .form-select {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(134 198 245);
  border: 1px solid #d0e6f8;
}

.modal-body input[type="checkbox"] {
  accent-color: #0b5394;
}

.modal-footer .btn {
  border-radius: 8px;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
  background-color: #e3f3fd;
  color: #0b5394;
  font-weight: bold;
  border: none;
  box-shadow: 0 1px 3px rgb(134 198 245);
  border-radius: 8px;
  transition: 0.2s ease;
}

.modal-footer .btn-primary:hover,
.modal-footer .btn-secondary:hover {
  background-color: #d3e8fb;
  transform: scale(1.03);
}

/* Slider container style */
.speed-control {
  margin-top: 10px;
}

/* Slider track */
.speed-control input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #e3f3fd;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgb(134 198 245);
  outline: none;
}

/* Slider thumb */
.speed-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background-color: #0b5394;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(134 198 245);
  transition: 0.2s ease;
}

.speed-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background-color: #0b5394;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(134 198 245);
  transition: 0.2s ease;
}

/* + / - button style */
.speed-control button {
  width: 65px;
  height: 45px;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  border-radius: 50%;
  transition: 0.2s ease;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgb(134 198 245);
  border: none;
  color: #0b5394;
  font-weight: bold;
}

.speed-control button:hover {
  background-color: #d0e6f6;
  transform: scale(1.05);
}


.btn-on {
  background-color: #e3f3fd;
  color: #0b5394;
  font-weight: bold;
  box-shadow: 0 1px 3px rgb(134 198 245);
  border: none;
  padding: 10px 16px;
  font-size: 18px;
  border-radius: 6px;
}

.btn-off {
  background-color: #ffe5e5;
  color: #8a1c1c;
  font-weight: bold;
  box-shadow: 0 1px 3px rgb(245, 170, 170);
  border: none;
  padding: 10px 16px;
  font-size: 18px;
  border-radius: 6px;
}

.btn-on:hover,
.btn-off:hover {
  transform: scale(1.03);
}

.set-timer-btn,
.tank-auto-mode {
  position: absolute;
  left: 7px;
  top: 7px;
}

.set-schedule-btn,
.tank-config {
  position: absolute;
  right: 7px;
  top: 7px;
}

.timer-schedule-controls .btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease;
  box-shadow: 0 1px 3px rgb(134 198 245);
}

.timer-schedule-controls .btn:hover {
  transform: scale(1.1);
  border-color: 0 1px 3px rgb(134 198 245);
}

.device-control-card {
  position: relative;
}

.tank-position {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tank-wrapper {
  position: relative;
  width: 220px;
  height: 270px;
  padding: 15px;
  box-sizing: border-box;
  overflow: hidden;
}

.water {
  position: absolute;
  bottom: 0;
  left: 3px;
  right: 3px;
  height: 0%;
  border-radius: 15px 15px 15px 15px;
  overflow: hidden;
  background: linear-gradient(135deg, #4fc3f7 25%, #0288d1 50%, #4fc3f7 75%);
  background-size: 200% 100%;
  z-index: 1;
}

/* wave animation class */
.wave-animation {
  animation: waveMove 4s linear infinite;
}

.tank-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/water-tank-frame.png') no-repeat center/contain;
  background-size: contain;
  z-index: 2;
  pointer-events: none;
}

/* Percentage text centered inside tank */
.percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #004a99;
  font-size: 2rem;
  font-weight: bold;
  z-index: 3;
  user-select: none;
  pointer-events: none;
  text-shadow: 0 0 3px #fff;
}

@keyframes waveMove {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}




/* Device Grid Desktop Styling */
.device-card {
  display: block !important;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  border: 1px solid #f0f0f0;
}

@media (min-width: 1024px) {
  .row.g-3 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
    justify-content: center;
    height: auto;
    align-items: start;
    margin-bottom: 100px;
  }
}


.device-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--icon-color);
}

.device-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.device-card-body {
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.wifi-status-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
}

.device-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
}

.device-icon {
  font-size: 3rem;
  color: var(--icon-color);
  transition: color 0.3s ease;
}

.device-card:hover .device-icon {
  color: var(--txt-title-color);
}

.device-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--txt-title-color);
  margin: 0.5rem 0 0 0;
  line-height: 1.3;
  text-align: center;
}

/* Grid spacing */
.row.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

@media (min-width: 768px) {
  .row.g-3 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
  }
}

/* Desktop responsive improvements */
@media (min-width: 992px) {
  .device-card-body {
    padding: 2rem 1.5rem;
  }

  .device-icon {
    font-size: 3.5rem;
  }

  .device-name {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .device-card-body {
    padding: 2.5rem 2rem;
  }

  .device-icon {
    font-size: 4rem;
  }

  .device-name {
    font-size: 1.1rem;
  }
}


/* ========================================
   DESKTOP RESPONSIVE STYLES
   ======================================== */

/* Carousel/PromoAds Desktop Styles */
.PromoAds {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .PromoAds {
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
  }

  .PromoAds .carousel-inner {
    border-radius: 16px;
    overflow: hidden;
  }

  .PromoAds img {
    border-radius: 16px;
  }
}

@media (min-width: 992px) {
  .PromoAds {
    max-width: 800px;
    margin: 1.5rem auto 2.5rem;
  }
}

@media (min-width: 1200px) {
  .PromoAds {
    max-width: 1100px;
    margin: 2rem auto 3rem;
  }
}

/* Main Content Container Desktop */
@media (min-width: 768px) {
  main {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem 100px;
  }
}

@media (min-width: 992px) {
  main {
    max-width: 1000px;
    padding: 1.5rem 2rem 100px;
  }
}

@media (min-width: 1200px) {
  main {
    max-width: 1100px;
    padding: 2rem 2rem 100px;
  }
}

/* Device Heading Desktop */
@media (min-width: 768px) {
  .dv-heading {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 1rem 2rem 0.5rem !important;
  }

  .dv-heading h2 {
    font-size: 22px;
  }
}

@media (min-width: 992px) {
  .dv-heading {
    max-width: 1000px;
    padding: 1.5rem 2rem 0.75rem !important;
  }

  .dv-heading h2 {
    font-size: 24px;
  }
}

@media (min-width: 1200px) {
  .dv-heading {
    padding: 2rem 2rem 1rem !important;
  }

  .dv-heading h2 {
    font-size: 26px;
  }
}

/* Device Grid Desktop Layout */
@media (min-width: 768px) {
  .row.mt-2.mx-0.g-3 {
    max-width: 900px;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    gap: 1.5rem !important;
  }

  .device-card {
    transition: all 0.3s ease;
  }

  .device-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(95, 172, 228, 0.25);
  }
}

@media (min-width: 992px) {
  .row.mt-2.mx-0.g-3 {
    max-width: 1000px;
    padding: 0 2rem !important;
    gap: 2rem !important;
  }

  .device-card-body {
    padding: 2rem 1.5rem;
  }

  .device-icon {
    font-size: 3rem !important;
  }

  .device-name {
    font-size: 1rem !important;
  }
}

@media (min-width: 1200px) {
  .row.mt-2.mx-0.g-3 {
    max-width: 1100px;
    padding: 0 2rem !important;
  }

  .device-card-body {
    padding: 2.5rem 2rem;
  }

  .device-icon {
    font-size: 3.5rem !important;
  }

  .device-name {
    font-size: 1.1rem !important;
  }
}



/* Bottom Navigation Desktop - Hide on Large Screens */
@media (min-width: 992px) {
  .bottom-nav {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }
}

/* Alert Messages Desktop */
@media (min-width: 768px) {
  .alert {
    max-width: 700px;
    margin: 1rem auto;
    border-radius: 12px;
    font-size: 1rem;
  }
}

@media (min-width: 992px) {
  .alert {
    max-width: 800px;
  }
}

@media (min-width: 1200px) {
  .alert {
    max-width: 900px;
  }
}

/* Empty State Message Desktop */
@media (min-width: 768px) {
  .row.mt-2.mx-0.g-3 p.text-center {
    font-size: 1.1rem;
    padding: 3rem 2rem;
  }
}

@media (min-width: 992px) {
  .row.mt-2.mx-0.g-3 p.text-center {
    font-size: 1.2rem;
    padding: 4rem 3rem;
  }
}

/* Smooth Scrolling for Desktop */
@media (min-width: 768px) {
  html {
    scroll-behavior: smooth;
  }

  body {
    overflow-x: hidden;
  }
}

/* Device Card Grid Improvements */
@media (min-width: 768px) {
  .col-4.col-md-4.col-lg-3.col-xl-2 {
    padding: 0.75rem;
  }
}

@media (min-width: 992px) {
  .col-4.col-md-4.col-lg-3.col-xl-2 {
    padding: 1rem;
  }
}

/* WiFi Status Indicator Desktop */
@media (min-width: 768px) {
  .wifi-status-indicator {
    font-size: 1.2rem;
  }
}

@media (min-width: 992px) {
  .wifi-status-indicator {
    font-size: 1.3rem;
  }
}

/* Remov
e borders from settings page cards */
.card {
  border: none !important;
  box-shadow: none !important;
}

.card-body {
  padding: 0 !important;
}

/* Settings menu items - remove borders */
.list-group-item {
  border: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.list-group-item:last-child {
  border-bottom: none !important;
}

/* Desktop - add subtle container */
@media (min-width: 768px) {
  .card.mt-2.mx-2 {
    max-width: 900px;
    margin: 1rem auto !important;
  }
}

@media (min-width: 992px) {
  .card.mt-2.mx-2 {
    max-width: 1000px;
  }
}

@media (min-width: 1200px) {
  .card.mt-2.mx-2 {
    max-width: 1100px;
  }
}


/* Empty State with Beautiful Scan Animation */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.scan-animation-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated Circles */
.scan-circle-outer,
.scan-circle-middle,
.scan-circle-inner {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
}

.scan-circle-outer {
  width: 160px;
  height: 160px;
  border-color: rgba(95, 172, 228, 0.2);
  animation: ripple 3s ease-out infinite;
}

.scan-circle-middle {
  width: 120px;
  height: 120px;
  border-color: rgba(95, 172, 228, 0.3);
  animation: ripple 3s ease-out infinite 1s;
}

.scan-circle-inner {
  width: 80px;
  height: 80px;
  border-color: rgba(95, 172, 228, 0.4);
  animation: ripple 3s ease-out infinite 2s;
}

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* QR Icon Container */
.qr-icon-wrapper {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(95, 172, 228, 0.25);
  animation: iconFloat 3s ease-in-out infinite;
}

.qr-icon-wrapper i {
  font-size: 55px;
  color: #5face4;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Scanning Beam Effect */
.scan-beam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(95, 172, 228, 0.3) 25%, 
    rgba(95, 172, 228, 0.8) 50%, 
    rgba(95, 172, 228, 0.3) 75%, 
    transparent 100%);
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(95, 172, 228, 0.6);
  animation: beamScan 2.5s ease-in-out infinite;
  z-index: 3;
}

@keyframes beamScan {
  0% {
    top: 20%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 80%;
    opacity: 0;
  }
}

/* Text Styles */
.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--txt-title-color);
  margin-bottom: 0.75rem;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.empty-state-text {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scan Button */
.btn-scan {
  background: linear-gradient(135deg, #5face4 0%, #4696d1 100%);
  border: none;
  color: white;
  padding: 0.85rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 30px;
  box-shadow: 0 6px 20px rgba(95, 172, 228, 0.35);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out 0.7s both;
}

.btn-scan::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-scan:hover::before {
  width: 300px;
  height: 300px;
}

.btn-scan:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(95, 172, 228, 0.45);
  color: white;
}

.btn-scan:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(95, 172, 228, 0.35);
}

.btn-scan i {
  position: relative;
  z-index: 1;
}

.btn-scan span {
  position: relative;
  z-index: 1;
}

/* Responsive Styles */
@media (max-width: 576px) {
  .empty-state-container {
    padding: 3rem 1.5rem;
  }

  .scan-animation-wrapper {
    width: 130px;
    height: 130px;
    margin-bottom: 2rem;
  }

  .scan-circle-outer {
    width: 130px;
    height: 130px;
  }

  .scan-circle-middle {
    width: 100px;
    height: 100px;
  }

  .scan-circle-inner {
    width: 70px;
    height: 70px;
  }

  .qr-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .qr-icon-wrapper i {
    font-size: 45px;
  }

  .scan-beam {
    width: 80px;
    height: 3px;
  }

  .empty-state-title {
    font-size: 1.3rem;
  }

  .empty-state-text {
    font-size: 0.95rem;
  }

  .btn-scan {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .empty-state-container {
    padding: 5rem 3rem;
  }

  .scan-animation-wrapper {
    width: 180px;
    height: 180px;
    margin-bottom: 3rem;
  }

  .scan-circle-outer {
    width: 180px;
    height: 180px;
  }

  .scan-circle-middle {
    width: 140px;
    height: 140px;
  }

  .scan-circle-inner {
    width: 100px;
    height: 100px;
  }

  .qr-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 24px;
  }

  .qr-icon-wrapper i {
    font-size: 65px;
  }

  .scan-beam {
    width: 120px;
    height: 5px;
  }

  .empty-state-title {
    font-size: 1.75rem;
  }

  .empty-state-text {
    font-size: 1.15rem;
  }

  .btn-scan {
    padding: 1rem 3rem;
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .scan-animation-wrapper {
    width: 200px;
    height: 200px;
  }

  .scan-circle-outer {
    width: 200px;
    height: 200px;
  }

  .scan-circle-middle {
    width: 160px;
    height: 160px;
  }

  .scan-circle-inner {
    width: 120px;
    height: 120px;
  }

  .qr-icon-wrapper {
    width: 130px;
    height: 130px;
  }

  .qr-icon-wrapper i {
    font-size: 70px;
  }

  .empty-state-title {
    font-size: 2rem;
  }
}
