@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-color: #000;
  --input-bg: rgba(255, 255, 255, 0.2);
  --primary-btn: #ffffff;
  --primary-btn-text: #000;
}

body.dark {
  --glass-bg: rgba(0, 0, 0, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-color: #fff;
  --input-bg: rgba(255, 255, 255, 0.1);
}

body.dark .glass-card {
  background: rgba(0, 0, 0, 0.451);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .login-box input {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

body.dark .login-box input::placeholder {
  color: #bbb;
}

body.dark .login-box p {
  color: rgba(255, 255, 255, 0.9);
}

body.dark .social-text,
body.dark .social-handle {
  color: #fff;
}

body.dark .toggle-circle {
  transform: translateX(30px);
  background: #333;
}

body.dark .theme-btn {
  background: rgba(255, 255, 255, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  width: 100vw;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://silk.dragoonblue.com/images/login/bg.jpg") no-repeat center center/cover;
  z-index: -1;
  transition: filter 0.5s ease, transform 0.5s ease;
}

body.dark .background {
  filter: brightness(0.5);
}

/* LOGO ABOVE BOX */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: none;
  margin-bottom: 30px;
}

.logo-icon {
  width: 80px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #000;
  /* Black for Light Mode */
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.main-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.ltd-text {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 1px;
}

body.dark .logo-text {
  color: #fff;
  /* White for Dark Mode */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Glass Card Container */
.glass-card {
  position: relative;
  width: 900px;
  height: 540px;
  background: rgba(255, 255, 255, 0.5);
  /* Increased opacity for better contrast */
  /* Slightly more opaque for the main card */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  display: flex;
  overflow: hidden;
  /* Ensure nothing spills out */
  padding: 10px;
  /* Gap between outer glass and inner content */
}

/* Left components - Login Form */
.login-box {
  flex: 1;
  /* Takes up left half */
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-color);
  position: relative;
  z-index: 2;
}

.qr {
  width: 140px;
  /* Increased QR size */
  height: 140px;
  margin: 20px auto 10px;
  border-radius: 12px;
  display: block;
  background: #fff;
  padding: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
  font-size: 22px;
  /* Smaller header */
  font-weight: 700;
  text-align: center;
  margin-bottom: 3px;
}

.login-box p {
  font-size: 15px;
  /* Smaller text */
  text-align: center;
  margin-bottom: 10px;
  font-weight: 500;
  color: #050505;
}

.input-group {
  margin-bottom: 10px;
  /* Reduced gap */
}

.login-box input {
  width: 100%;
  padding: 12px 18px;
  /* Slightly smaller padding */
  border-radius: 30px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  /* Slightly transparent input bg */
  color: #000;
  font-size: 13px;
  /* Smaller font */
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.login-box input::placeholder {
  color: #444;
  font-weight: 500;
}

.login-box input:focus {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.input-group {
  position: relative;
}

#togglePassword {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #555;
  transition: color 0.3s;
}

#togglePassword:hover {
  color: #000;
}

body.dark #togglePassword {
  color: #bbb;
}

body.dark #togglePassword:hover {
  color: #fff;
}

.login-box button {
  width: 100%;
  padding: 12px;
  /* Smaller button height */
  border-radius: 30px;
  border: none;
  background: white;
  color: black;
  font-weight: 700;
  font-size: 14px;
  /* Smaller font */
  cursor: pointer;
  margin-top: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.login-box button:hover {
  transform: scale(1.02);
}

.remember {
  margin-top: 10px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.remember input {
  width: auto;
  margin-right: 8px;
  transform: scale(1.2);
}

/* Social Media */
.social-text {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 7px;
}

.social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.social-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}

.social-icon:hover {
  transform: translateY(-3px);
}

.whatsapp {
  background: #25D366;
}

.tiktok {
  background: #000000;
}

.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Generic Instagram gradient approximation */
.facebook {
  background: #1877F2;
}

.linkedin {
  background: #0077B5;
}

.social-handle {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.8;
  color: #050505;
}

/* Right components - Image Preview */
.preview {
  flex: 1.1;
  /* Slightly wider */
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  margin-left: 10px;
  /* Small gap from left side */
}

/* The overlay container that sits on top of existing image */
.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  /* Let clicks pass through to thumbnails */
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#mainImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Top bar overlays */
.top-overlay-logo {
  display: flex;
  justify-content: center;
  /* Centered top logos */
  align-items: flex-start;
  gap: 15px;
  width: 100%;
}

.top-overlay-logo img {
  height: 40px;
  /* Adjust based on actual logo aspect ratio */
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.anniversary-badge {
  display: flex;
  align-items: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.badge-num {
  font-size: 24px;
  font-weight: 700;
  margin-right: 5px;
}

.badge-text {
  font-size: 8px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Massive Year Text */
.year-outline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
  opacity: 0.6;
  letter-spacing: -2px;
  z-index: 5;
}

/* Theme Toggle */
.theme-btn {
  position: absolute;
  top: 25px;
  left: 25px;
  /* On the top left of the IMAGE side, or top left of card? Image clearly shows toggle on top left of image area */
  width: 60px;
  height: 30px;
  background: rgba(200, 200, 200, 0.5);
  border-radius: 20px;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 3px;
  backdrop-filter: blur(5px);
}

.toggle-circle {
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

/* Thumbnails */
.thumbs {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.thumbs img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  /* default transparent border */
  transition: all 0.3s ease;
  opacity: 0.7;
}

.thumbs img:hover {
  transform: scale(1.1);
  border-color: white;
}

.thumbs img.active-thumb {
  border-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
  .glass-card {
    flex-direction: column;
    width: 90%;
    max-width: 450px;
    height: auto;
    min-height: auto;
    padding: 20px;
  }

  .login-box {
    padding: 20px;
  }

  .preview {
    display: none;
  }

  .logo-container {
    display: flex;
    margin-bottom: 20px;
  }

  .logo-icon {
    width: 60px;
  }

  .main-name {
    font-size: 24px;
  }
}