/* Jivika AI System Care — Cyber Glass Modern PWA Stylesheet */
:root {
  --cyan-primary: #00F0FF;
  --cyan-glow: rgba(0, 240, 255, 0.45);
  --blue-primary: #0077FE;
  --bg-deep: #050B14;
  --border-cyan: rgba(0, 220, 255, 0.65);
  --scale: 1.0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000000;
  color: #EDF0F4;
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unified Stage: Dock and 16:9 Video joined with ZERO gap */
#stage-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.22), 0 0 100px rgba(0, 0, 0, 0.9);
  background: #000000;
  border-radius: 14px;
}

/* 1. Left Slim Cyber Dock Strip: Perfectly welded to left edge of video */
#cyber-dock {
  background: linear-gradient(180deg, rgba(6, 16, 36, 0.98) 0%, rgba(3, 8, 20, 0.99) 100%);
  border: 1.5px solid var(--border-cyan);
  border-right: none;
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.12);
  border-radius: 14px 0 0 14px;
  display: flex;
  flex-direction: column;
  padding: calc(6px * var(--scale)) calc(3px * var(--scale));
  gap: calc(1px * var(--scale));
  z-index: 10;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  box-sizing: border-box;
}

.dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(1px * var(--scale)) calc(2px * var(--scale));
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  text-align: center;
  min-height: 0;
  overflow: hidden;
}

.dock-item:hover {
  background: rgba(0, 240, 255, 0.16);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
  transform: scale(1.03);
}

.dock-icon {
  width: calc(22px * var(--scale));
  height: calc(22px * var(--scale));
  min-width: 16px;
  min-height: 16px;
  max-width: 32px;
  max-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: calc(1px * var(--scale));
  flex-shrink: 0;
}

.dock-icon svg {
  width: 100%;
  height: 100%;
}

.dock-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  max-width: 100%;
}

.dock-title {
  color: #FFFFFF;
  font-size: calc(9px * var(--scale));
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
  white-space: nowrap;
}

.dock-item:hover .dock-title {
  color: #00F0FF;
}

.dock-subtitle {
  color: #7DD3FC;
  font-size: calc(7.5px * var(--scale));
  font-weight: 500;
  opacity: 0.85;
  white-space: nowrap;
}

.dock-divider {
  height: 1px;
  margin: 0 calc(4px * var(--scale));
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.05) 0%, rgba(0, 240, 255, 0.45) 50%, rgba(0, 240, 255, 0.05) 100%);
  flex-shrink: 0;
}

/* 2. Main 16:9 Video Canvas: Flush to dock with seamless cyber seam */
#video-wrapper {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1.5px solid var(--border-cyan);
  border-left: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 0 14px 14px 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* 3. Top Header Bar (Audio + PWA Install) */
#top-controls {
  position: absolute;
  top: 2%;
  right: 2%;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 20;
}

.ctrl-btn {
  background: rgba(18, 24, 38, 0.92);
  border: 1.2px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  color: #EDF0F4;
  padding: calc(5px * var(--scale)) calc(10px * var(--scale));
  font-size: calc(11px * var(--scale));
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.ctrl-btn:hover {
  background: linear-gradient(180deg, #00F0FF 0%, #0284C7 100%);
  border-color: #7DD3FC;
  color: #0A0D14;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
  transform: translateY(-1px);
}

/* Glowing PWA Install Pill */
.pwa-install-trigger {
  background: linear-gradient(90deg, #0077FE 0%, #00F0FF 100%);
  color: #050B14 !important;
  font-weight: 800;
  border: 1.2px solid #7DD3FC;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
  animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
  50% { box-shadow: 0 0 22px rgba(0, 240, 255, 0.75); }
  100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
}

/* 4. Login Panel: Locked 1:1 inside video coordinates */
#login-card {
  position: absolute;
  left: 74.0%;
  width: 22.2%;
  top: 30.5%;
  height: 51.5%;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 4px;
  z-index: 15;
}

.welcome-msg {
  font-size: calc(10.5px * var(--scale));
  color: #00F0FF;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
  white-space: nowrap;
  margin-bottom: calc(2px * var(--scale));
}

/* Inputs */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(11, 20, 38, 0.90);
  border: 1.2px solid #1E3456;
  border-radius: 8px;
  padding: 0 8px;
  height: calc(33px * var(--scale));
  min-height: 28px;
  transition: all 0.25s ease;
}

.input-group:focus-within {
  border-color: #00F0FF;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.input-icon {
  font-size: calc(12px * var(--scale));
  color: #8A9DB8;
  margin-right: 6px;
}

.input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: calc(11px * var(--scale));
}

.input-field::placeholder {
  color: #64748B;
  font-size: calc(10.5px * var(--scale));
}

.pw-toggle {
  background: transparent;
  border: none;
  color: #8A9DB8;
  cursor: pointer;
  font-size: calc(12px * var(--scale));
  padding: 2px;
}

/* Remember Me Checkbox with Custom White Tick */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(10px * var(--scale));
  padding: 0 2px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #8A9DB8;
  font-size: calc(10px * var(--scale));
  font-weight: 500;
}

.checkbox-container input {
  display: none;
}

.custom-checkmark {
  width: calc(13px * var(--scale));
  height: calc(13px * var(--scale));
  min-width: 12px;
  min-height: 12px;
  border: 1.2px solid #1E3456;
  border-radius: 3px;
  background: rgba(11, 20, 38, 0.95);
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.checkbox-container:hover .custom-checkmark {
  border-color: #00F0FF;
}

/* Checked state: Electric Blue gradient with crisp White Tick */
.checkbox-container input:checked ~ .custom-checkmark {
  background: linear-gradient(180deg, #0077FE 0%, #0052B4 100%);
  border-color: #00F0FF;
  background-image: url('/assets/icons/checkbox_check.png');
  background-size: 80% 80%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.forgot-link {
  color: #00B4D8;
  text-decoration: none;
  font-size: calc(9.5px * var(--scale));
  font-weight: 600;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #00F0FF;
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  height: calc(36px * var(--scale));
  min-height: 30px;
  background: linear-gradient(90deg, #0077FE 0%, #00A6FF 55%, #00F0FF 100%);
  border: 1px solid #7DD3FC;
  border-radius: 18px;
  color: #050B14;
  font-size: calc(12.5px * var(--scale));
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 18px rgba(0, 119, 254, 0.4);
}

.btn-login:hover {
  background: linear-gradient(90deg, #0099FF 0%, #26D0FF 55%, #52F5FF 100%);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.65);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(1px);
}

.arrow-circle {
  width: calc(20px * var(--scale));
  height: calc(20px * var(--scale));
  min-width: 18px;
  min-height: 18px;
  background: #FFFFFF;
  color: #0077FE;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: calc(10px * var(--scale));
}

/* Social Login */
.social-divider {
  display: flex;
  align-items: center;
  color: #64748B;
  font-size: calc(9px * var(--scale));
}

.social-divider::before, .social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.social-divider span {
  padding: 0 6px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-btn {
  width: calc(34px * var(--scale));
  height: calc(34px * var(--scale));
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: rgba(14, 25, 48, 0.95);
  border: 1.2px solid #1E3456;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  border-color: #00F0FF;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  transform: scale(1.08);
}

/* Register Banner */
.reg-banner {
  background: rgba(8, 16, 32, 0.85);
  border: 1px solid rgba(0, 119, 254, 0.35);
  border-radius: 8px;
  padding: calc(5px * var(--scale)) calc(8px * var(--scale));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reg-info {
  display: flex;
  flex-direction: column;
}

.reg-title {
  color: #EDF0F4;
  font-size: calc(9px * var(--scale));
  font-weight: 800;
}

.reg-sub {
  color: #8A9BB4;
  font-size: calc(7.5px * var(--scale));
}

.btn-reg {
  background: rgba(11, 22, 42, 0.9);
  border: 1px solid #0077FE;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: calc(8.5px * var(--scale));
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reg:hover {
  background: #0077FE;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 119, 254, 0.5);
}

/* Google Account Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: #0B1426;
  border: 1.5px solid #00F0FF;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
  border-radius: 16px;
  width: 350px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-item:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: #00F0FF;
}

.account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0077FE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 20, 38, 0.95);
  border: 1.5px solid #00F0FF;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  color: #EDF0F4;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 700;
  display: none;
  z-index: 1000;
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 15px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -15px); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  #stage-wrapper {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  #cyber-dock {
    display: none !important;
  }
  #video-wrapper {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
  }
  #login-card {
    left: 5% !important;
    width: 90% !important;
    top: 24% !important;
    height: 52% !important;
    background: rgba(8, 16, 32, 0.88);
    border: 1.2px solid rgba(0, 119, 254, 0.5);
    border-radius: 14px;
    padding: 14px 12px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
  }
}
