/*
 * AIHotel styling.
 *
 * This stylesheet defines a dark, futuristic aesthetic using neon accents and
 * modern typography.  It applies across the landing page, login screen and
 * monitoring dashboard.  Flexbox and CSS grid are used for layout and
 * responsiveness.  Animations provide subtle motion to reinforce the high‑tech
 * feel of the application.
 */

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: #05071a;
  color: #f5f7fa;
  overflow-x: hidden;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.text-center {
  text-align: center;
}

.small-text {
  font-size: 0.85rem;
  color: #8fa5c5;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 195, 255, 0.5);
}
.btn-primary:hover {
  background: linear-gradient(45deg, #00a8e8, #005ecb);
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.8);
}
.btn-secondary {
  background: #182e52;
  color: #a8c5e9;
  border: 1px solid #2f4c82;
}
.btn-secondary:hover {
  background: #223c6e;
  color: #fff;
}
.btn-outline {
  border: 1px solid #00c6ff;
  color: #00c6ff;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}
.btn-outline:hover {
  background: #00c6ff;
  color: #05071a;
}

/* Navigation */
.nav {
  width: 100%;
  background: rgba(5, 9, 32, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00c6ff;
}
/* Style the trademark symbol next to the logo */
/* Generic trademark symbol styling */
.tm {
  font-size: 0.6em;
  vertical-align: super;
  margin-left: 0.1em;
}
/* Style the AI part of the logo */
.logo .ai {
  color: #a57eff; /* purple */
}
/* Style the Hotel part of the logo */
.logo .hotel {
  color: #00c6ff; /* blue */
}
/* Override color for trademark inside the logo */
.logo .tm {
  color: #a57eff;
}
.nav-links a {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  color: #a8c5e9;
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #00c6ff;
  transition: width 0.3s;
}
.nav-links a:hover {
  color: #fff;
}
.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 4rem 0;
  background: radial-gradient(circle at 25% 25%, #07112e, #020618);
  overflow: hidden;
}
.hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.hero-text {
  flex: 1 1 500px;
  max-width: 600px;
  z-index: 2;
}
.hero-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}
.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #d0e0f9;
}
.hero-image {
  flex: 1 1 400px;
  text-align: right;
  z-index: 1;
}
.hero-image img {
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 195, 255, 0.5));
}
/* Decorative elements behind the hero image */
.hero-decor {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(50px);
  animation: float 10s infinite ease-in-out;
}

/* Futuristic animated background for the hero section */
.hero-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #00c6ff, #532e78, #8f62ff, #00c6ff);
  /* Two animations: continuous rotation and gentle pulsing */
  animation: spin 20s linear infinite, pulse 10s ease-in-out infinite;
  opacity: 0.5;
  filter: blur(120px);
  transform: translate(-50%, -50%);
  z-index: 1;
}
@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
}
.decor1 {
  width: 400px;
  height: 400px;
  background: #532e78;
  top: -100px;
  left: -150px;
}
.decor2 {
  width: 300px;
  height: 300px;
  background: #00c6ff;
  bottom: -80px;
  right: -120px;
  animation-delay: 3s;
}
.decor3 {
  width: 500px;
  height: 500px;
  background: #8f62ff;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 6s;
}
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Sections */
.info-section {
  padding: 4rem 0;
}
.dark-section {
  background-color: #07112e;
}
.light-section {
  background-color: #0c1f40;
}
.info-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #00c6ff;
  text-align: center;
}
.info-section p {
  max-width: 800px;
  margin: 0.5rem auto;
  color: #ccd9ef;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.feature-card {
  background-color: #0d2247;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
}
.icon-container {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #00c6ff;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
  color: #fff;
}
.feature-card p {
  font-size: 0.9rem;
  color: #a3b8d5;
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.metric {
  background-color: #0d2247;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.metric-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #00c6ff;
  margin-bottom: 0.5rem;
}
.metric p {
  font-size: 0.9rem;
  color: #a3b8d5;
}

/* Footer */
.footer {
  background-color: #020618;
  padding: 2rem 0;
  text-align: center;
  color: #5f7aa7;
  font-size: 0.85rem;
}

/* Login */
.login-body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(120deg, #071a47, #05071a);
}
.login-container {
  background-color: #0d2247;
  padding: 3rem;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  width: 360px;
  text-align: center;
}
.login-container h2 {
  margin-bottom: 1.5rem;
  color: #00c6ff;
}
.login-container .error {
  background-color: #ff4e6a;
  color: #fff;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.login-form .input-group {
  margin-bottom: 1rem;
  text-align: left;
}
.login-form label {
  display: block;
  margin-bottom: 0.25rem;
  color: #a8c5e9;
  font-size: 0.85rem;
}
.login-form input {
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 4px;
  background-color: #1a3060;
  color: #f5f7fa;
}
.login-form input:focus {
  outline: none;
  background-color: #223c6e;
}
.login-form .btn {
  width: 100%;
  margin-top: 1rem;
}
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #8fa5c5;
  text-decoration: none;
  font-size: 0.85rem;
}
.back-link:hover {
  color: #fff;
}

/* Dashboard */
.dashboard-body {
  background-color: #05071a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.config-section, .monitor-section {
  padding: 3rem 0;
  flex: 1;
}
.config-section h2, .monitor-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #00c6ff;
}
.config-section p {
  text-align: center;
  margin-bottom: 2rem;
  color: #8fa5c5;
}
.config-form .feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.feed-input {
  background-color: #0d2247;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.feed-input h3 {
  margin-bottom: 0.5rem;
  color: #a8c5e9;
}
.feed-input .input-group {
  margin-bottom: 0.8rem;
}
.feed-input label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: #8fa5c5;
}
.feed-input input {
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
  background-color: #1a3060;
  color: #f5f7fa;
}
.feed-input input:focus {
  outline: none;
  background-color: #223c6e;
}

.feeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.feed-card {
  background-color: #0d2247;
  padding: 1rem;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.feed-card h3 {
  margin-bottom: 0.5rem;
  color: #00c6ff;
  font-size: 1.1rem;
}
.snapshot-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 ratio */
  overflow: hidden;
  border-radius: 8px;
  background-color: #1a3060;
  margin-bottom: 1rem;
}
.snapshot-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.snapshot-wrapper .share-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  z-index: 1;
}
.snapshot-wrapper .share-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* Desk line overlay drawn across the preview when configured */
/* Desk boundary overlay drawn using SVG */
.snapshot-wrapper .desk-line-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.snapshot-wrapper .desk-line-svg line {
  stroke: #ffae00;
  stroke-width: 2;
}

/* Control handles for editing the desk line. These circles become visible
   in edit mode and allow dragging of the endpoints. */
.snapshot-wrapper .desk-line-svg .desk-handle {
  fill: #ffae00;
  stroke: #ffffff;
  stroke-width: 2;
  cursor: pointer;
  pointer-events: all;
  vector-effect: non-scaling-stroke;
}

/* Button to set the desk line threshold */
.snapshot-wrapper .desk-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  background: #182e52;
  color: #a8c5e9;
  border: 1px solid #2f4c82;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.snapshot-wrapper .desk-btn:hover {
  background: #223c6e;
  color: #fff;
}
.placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #8fa5c5;
  font-size: 0.9rem;
  text-align: center;
}
.alert-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff4e6a;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  display: none;
  box-shadow: 0 0 10px rgba(255, 78, 106, 0.5);
}
.metrics-list {
  list-style: none;
  font-size: 0.9rem;
  color: #a8c5e9;
  line-height: 1.4;
}
.metrics-list .value {
  font-weight: 600;
  color: #fff;
}
.metrics-list .value.staff-present[data-state="true"] {
  color: #00c6ff;
}
.metrics-list .value.staff-present[data-state="false"] {
  color: #ff4e6a;
}
.metrics-list .value.uniform-check[data-state="true"] {
  color: #00c6ff;
}
.metrics-list .value.uniform-check[data-state="false"] {
  color: #ffae00;
}
.reconfigure-form {
  margin-top: 2rem;
  text-align: center;
}

/* Error page */
.error-body {
  background-color: #05071a;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}
.error-container h1 {
  font-size: 5rem;
  color: #00c6ff;
  margin-bottom: 1rem;
}
.error-container p {
  color: #8fa5c5;
  margin-bottom: 2rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }
  .hero-text, .hero-image {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 1rem;
  }
  .nav-links a {
    margin-left: 1rem;
  }
}