:root {
  --gold-300: #FCDA6D;
  --gold-400: #F5C842;
  --gold-500: #C9973A;
  --bg-dark: #0a0e1a;
  --bg-card: rgba(17, 24, 39, 0.7);
  --border: rgba(245, 200, 66, 0.2);
  --text-main: #f8f9fa;
  --text-muted: #8b93b0;
  --error: #E63946;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background Effects */
.login-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  overflow: hidden;
}

.bg-image {
  position: absolute;
  top: -10%; left: -10%; right: -10%; bottom: -10%;
  background-image: url('../images/premium_luxury_watch_bg.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.28) contrast(1.1) blur(1px); /* Giảm blur xuống 1px để thấy rõ chi tiết ảnh nền */
  animation: bgZoomRotate 60s infinite alternate ease-in-out;
  z-index: 1;
}

/* Mechanical Clock Overlay */
.clock-overlay {
  position: absolute;
  top: 50%;
  left: 50%; /* Trả tâm bộ kim đồng hồ về đúng chính giữa màn hình để đồng bộ hoàn hảo với ảnh nền */
  transform: translate(-50%, -50%);
  width: min(80vw, 80vh);
  height: min(80vw, 80vh);
  max-width: 600px;
  max-height: 600px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 200, 66, 0.12); /* Tăng độ hiển thị viền tròn nét đứt */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.clock-dial {
  position: relative;
  width: 100%;
  height: 100%;
}

.clock-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--gold-400);
  border: 2px solid #0a0e1a;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 10px var(--gold-400);
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  border-radius: 4px;
}

.hour-hand {
  width: 6px; /* Tăng độ dày kim */
  height: 25%;
  background: linear-gradient(to top, var(--gold-500), var(--gold-300));
  transform: translateX(-50%) rotate(45deg);
  animation: rotateHour 43200s linear infinite;
  opacity: 0.85; /* Tăng opacity */
  box-shadow: 0 0 8px rgba(245, 200, 66, 0.5);
}

.minute-hand {
  width: 4px; /* Tăng độ dày kim */
  height: 38%;
  background: linear-gradient(to top, var(--gold-400), #fff);
  transform: translateX(-50%) rotate(180deg);
  animation: rotateMinute 3600s linear infinite;
  opacity: 0.9; /* Tăng opacity */
  box-shadow: 0 0 10px rgba(245, 200, 66, 0.6);
}

.second-hand {
  width: 2px; /* Tăng độ dày kim */
  height: 45%;
  background: #E63946;
  transform: translateX(-50%) rotate(270deg);
  animation: rotateSecond 60s steps(60) infinite;
  opacity: 0.95;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.7);
}

@keyframes rotateHour {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes rotateMinute {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes rotateSecond {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

.bg-gradient {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(10, 14, 26, 0.15) 0%, rgba(10, 14, 26, 0.92) 85%);
  z-index: 2;
}

@keyframes bgZoomRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(1.5deg); }
  100% { transform: scale(1) rotate(-0.5deg); }
}

.particles {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  z-index: 2;
}

.particle {
  position: absolute;
  background: var(--gold-400);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(1px);
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* Login Card */
/* Login Card Layout */
.login-container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 960px;
  padding: 24px;
}

.login-content-wrapper {
  display: flex;
  background: rgba(10, 14, 26, 0.15); /* Tăng tối đa độ trong suốt (chỉ giữ 15% màu nền tối để tạo hiệu ứng phủ bóng kính) */
  backdrop-filter: blur(10px); /* Giảm độ blur xuống 10px để nhìn thấu các kim cơ học rõ mồn một */
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Left Side: System Information */
.login-info-side {
  flex: 1.1;
  padding: 48px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.18) 0%, rgba(10, 14, 26, 0.3) 100%); /* Siêu trong suốt bên trái */
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.info-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(245, 200, 66, 0.08);
  border: 1px solid rgba(245, 200, 66, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.info-heading {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  color: #fff;
}

.gold-text {
  color: var(--gold-400);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.info-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.info-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 24px;
}

.stat-item {
  flex: 1;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.system-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-bullet {
  font-size: 18px;
  color: var(--gold-400);
  background: rgba(245, 200, 66, 0.06);
  width: 32px; height: 32px;
  display: flex;
  align-items: center; justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.feature-text strong {
  display: block;
  font-size: 13.5px;
  color: #fff;
  margin-bottom: 3px;
}

.feature-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Right Side: Login Card */
.login-card {
  flex: 0.9;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}

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

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.95); }
}

/* Logo Section */
.login-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  justify-content: center;
}

.logo-circle {
  width: 48px;
  height: 48px;
  background: rgba(10, 14, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.logo-text-wrapper {
  text-align: left;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s;
}

.input-wrapper input {
  width: 100%;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px 12px 40px;
  color: var(--text-main);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--gold-500);
  background: rgba(10, 14, 26, 0.8);
  box-shadow: 0 0 0 3px rgba(201, 151, 58, 0.15);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
  color: var(--gold-400);
}

.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-main);
}

/* Submit Button */
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 151, 58, 0.3);
}

.login-btn:hover::after {
  left: 150%;
}

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

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Error Message & Shake */
.login-error {
  color: var(--error);
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.2);
  padding: 10px;
  border-radius: 8px;
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Loader */
.btn-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--gold-400);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--gold-300);
}

/* Responsive Media Queries */
@media (max-width: 820px) {
  .login-content-wrapper {
    flex-direction: column;
    max-width: 460px;
    margin: 0 auto;
  }
  .login-info-side {
    display: none; /* Hide info side on mobile/tablet to prioritize login form */
  }
  .login-card {
    padding: 32px 24px;
  }
  .clock-overlay {
    left: 50%; /* Trả lại tâm đồng hồ vào giữa màn hình trên di động */
    width: min(85vw, 85vh);
    height: min(85vw, 85vh);
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 12px;
  }
  .login-card {
    padding: 24px 16px;
  }
}

/* Quotes Motivation Section */
.login-quote-container {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quote-icon {
  font-size: 16px;
  color: var(--gold-400);
  background: rgba(245, 200, 66, 0.1);
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
  flex-shrink: 0;
}

.quote-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  transition: opacity 0.5s ease-in-out;
  text-align: left;
}
