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

@font-face {
  font-family: 'Camber-Lg';
  src: url('../fonts/Camber-Th.woff2') format('woff2'),
       url('../fonts/Camber-Th.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Camber-Md';
  src: url('../fonts/Camber-Md.woff2') format('woff2'),
       url('../fonts/Camber-Md.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Camber-Sb';
  src: url('../fonts/Camber-Sb.woff2') format('woff2'),
       url('../fonts/Camber-Sb.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Camber-Rg';
  src: url('../fonts/Camber-Rg.woff2') format('woff2'),
       url('../fonts/Camber-Rg.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Camber-Th';
  src: url('../fonts/Camber-Th.woff2') format('woff2'),
       url('../fonts/Camber-Th.woff') format('woff');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Camber-Ul';
  src: url('../fonts/Camber-Ul.woff2') format('woff2'),
       url('../fonts/Camber-Ul.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* ============ Enhanced Keyframes ============ */
@keyframes fadeInUp {
  0% { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes particleFloat {
  0% { 
    transform: translateY(100vh) rotate(0deg); 
    opacity: 0; 
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { 
    transform: translateY(-100vh) rotate(360deg); 
    opacity: 0; 
  }
}

/* ============ Enhanced Base ============ */
:root{
  --brand: #D71C2D;
  --brand-light: #ff4757;
  --brand-dark: #c0392b;
  --white: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --shadow: 0 20px 60px rgba(0,0,0,0.1);
  --shadow-hover: 0 30px 80px rgba(0,0,0,0.15);
  --glass: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', 'Camber-Lg', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text);
  position: relative;
}

/* ============ Enhanced Background ============ */
.bg-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.bg-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.7;
  filter: blur(1px);
}

/* ============ Floating Particles ============ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

.particle:nth-child(odd) {
  background: rgba(215, 28, 45, 0.4);
}

/* ============ Enhanced Login Card ============ */
.login-container {
  animation: fadeInUp 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 60px 40px 40px;
  border-radius: 24px;
  width: min(92vw, 400px);
  min-height: 480px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.login-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light), transparent, var(--brand-dark));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  opacity: 0.3;
}

.login-container:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* ============ Enhanced Logo ============ */
.logo-container {
  display: contents;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  pointer-events: none;
  animation: floatUp 6s ease-in-out infinite;
}

.logo-wrapper {
  display: inline-block;
  padding: 20px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.logo-img {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}

.login-container:hover .logo-wrapper {
  transform: scale(1.05);
}

/* ============ Enhanced Welcome Text ============ */
.welcome-text {
  text-align: center;
  margin: 80px 0 40px;
  animation: fadeInUp 1s ease 0.3s both;
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ============ Enhanced Button ============ */
.btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  border: none;
  color: var(--white);
  padding: 16px 40px;
  margin-top: 20px;
  min-width: 180px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(215, 28, 45, 0.3);
}

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

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(215, 28, 45, 0.4);
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(-1px);
  transition: transform 0.1s ease;
}

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

/* ============ Enhanced Loader ============ */
.loader {
  border: 4px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 4px solid var(--brand);
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 20px auto 0;
  display: none;
}

/* ============ Enhanced Footer ============ */
.site-footer {
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  letter-spacing: 1px;
  padding: 20px;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 5;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============ Responsive Design ============ */
@media (max-height: 700px) {
  .login-container {
    min-height: auto;
    padding: 40px 30px 30px;
  }
  
  .welcome-text {
    margin: 60px 0 30px;
  }
  
  .logo-container {
    top: -20px;
  }
  
  .logo-img {
    max-width: 150px;
    max-height: 150px;
  }
}

@media (max-width: 768px) {
  .login-container {
    width: min(95vw, 380px);
    padding: 40px 30px 30px;
  }
  
  .welcome-title {
    font-size: 24px;
  }
  
  .welcome-subtitle {
    font-size: 14px;
  }
  
  .btn {
    min-width: 160px;
    padding: 14px 32px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .login-container {
    width: 90vw;
    padding: 35px 25px 25px;
  }
  
  .logo-img {
    max-width: 100px;
    max-height: 100px;
  }
  
  .welcome-text {
    margin: 50px 0 25px;
  }
  
  .welcome-title {
    font-size: 22px;
  }
}

/* ============ Animation Delays ============ */
.logo-container { animation-delay: 0.1s; }
.welcome-text { animation-delay: 0.3s; }
.btn { animation-delay: 0.5s; }
.site-footer { animation-delay: 0.7s; }