/* 
 * Login & Authentication Styles
 * Modern, high-tech split-screen design for streaming platform authentication
 */

/* Animated streaming background */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Analog waveform animation */
.login-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    /* Primary analog waveform */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1000" preserveAspectRatio="none"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" style="stop-color:rgba(102,126,234,0.3);stop-opacity:1" /><stop offset="50%" style="stop-color:rgba(147,51,234,0.3);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(102,126,234,0.3);stop-opacity:1" /></linearGradient></defs><path d="M0,500 Q150,350 300,500 T600,500 T900,500 T1200,500" stroke="url(%23grad1)" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M0,500 Q150,350 300,500 T600,500 T900,500 T1200,500" stroke="rgba(102,126,234,0.5)" stroke-width="1" fill="none" stroke-dasharray="5,5" stroke-linecap="round" opacity="0.6"/></svg>'),
    /* Secondary waveform offset */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1000" preserveAspectRatio="none"><defs><linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" style="stop-color:rgba(42,245,152,0.2);stop-opacity:1" /><stop offset="50%" style="stop-color:rgba(42,245,152,0.2);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(42,245,152,0.2);stop-opacity:1" /></linearGradient></defs><path d="M0,550 Q150,450 300,550 T600,550 T900,550 T1200,550" stroke="url(%23grad2)" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
  background-repeat: repeat-x;
  background-size: 1200px 100%, 1200px 100%;
  background-position: 0 15%, 0 35%;
  animation: analogWaveflow 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Tertiary layer - analog noise/grid */
.login-container::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    /* Top frequency waveform */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1000" preserveAspectRatio="none"><path d="M0,300 Q100,250 200,300 T400,300 T600,300 T800,300 T1000,300 T1200,300" stroke="rgba(99,102,241,0.25)" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>'),
    /* Bottom frequency waveform */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1000" preserveAspectRatio="none"><path d="M0,700 Q100,650 200,700 T400,700 T600,700 T800,700 T1000,700 T1200,700" stroke="rgba(147,51,234,0.2)" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>'),
    /* Subtle grid overlay */
    linear-gradient(90deg,
      transparent 0%,
      rgba(102, 126, 234, 0.08) 50%,
      transparent 100%);
  background-repeat: repeat-x, repeat-x, repeat;
  background-size: 1200px 200px, 1200px 200px, 100% 100%;
  background-position: 0 25%, 0 60%, 0 0;
  animation: analogWaveflow2 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes analogWaveflow {
  0% {
    background-position: 0 15%, 0 35%;
  }

  100% {
    background-position: -1200px 15%, -1200px 35%;
  }
}

@keyframes analogWaveflow2 {
  0% {
    background-position: 0 25%, 0 60%, 0 0;
  }

  100% {
    background-position: -1200px 25%, -1200px 60%, 0 0;
  }
}

/* Login wrapper - two column layout */
.login-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.37),
    0 0 60px rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: cardSlideIn 0.6s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Left section - Branding and quotes */
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Right section - Form */
.login-right {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

/* Logo/Brand section */
.login-brand {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.login-logo svg,
.login-logo i {
  font-size: 3rem;
  color: white;
}

/* Logo image when using configured APP_LOGO_PATH */
.login-logo-img {
  /* max-width: 80px; */
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.login-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Greeting Section */
.login-greeting {
  text-align: center;
  margin: 2rem 0 1.5rem 0;
  position: relative;
  z-index: 1;
}

.login-greeting h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  animation: greetingFadeIn 0.8s ease-out;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes greetingFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Motivational Quote */
.login-quote {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-left: 4px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: auto;
  animation: quoteFadeIn 1s ease-out 0.2s both;
  position: relative;
  z-index: 1;
}

@keyframes quoteFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-quote blockquote {
  font-size: 1rem;
  font-style: italic;
  color: white;
  margin: 0 0 0.75rem 0;
  line-height: 1.6;
}

.login-quote cite {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-style: normal;
  display: block;
  text-align: right;
}

.login-quote .quote-icon {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Form header in right section */
.form-header {
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: #64748b;
  font-size: 0.95rem;
}

/* Form elements */
.login-form {
  margin-top: 0;
}

.form-group-login {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group-login label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group-login .input-wrapper {
  position: relative;
}

.form-group-login .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  pointer-events: none;
}

.form-group-login input:focus+.input-icon,
.form-group-login input:not(:placeholder-shown)+.input-icon {
  color: #667eea;
}

.form-control-login {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  color: #1e293b;
}

.form-control-login::placeholder {
  color: #cbd5e1;
}

.form-control-login:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-control-login:hover {
  border-color: #cbd5e1;
}

/* Remember me checkbox */
.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: #667eea;
}

.remember-me label {
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

/* Submit button */
.btn-login {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-login::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-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

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

/* Links section */
.login-links {
  margin-top: 1.5rem;
  text-align: center;
}

.login-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.login-links a:hover {
  color: #764ba2;
  transform: translateX(3px);
}

.login-links a i {
  font-size: 0.75rem;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.login-divider span {
  padding: 0 1rem;
}

/* Error messages */
.login-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: errorShake 0.5s ease;
}

@keyframes errorShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

.login-error h3 {
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.login-error ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-error li {
  color: #991b1b;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-error li::before {
  content: '⚠';
  font-size: 1rem;
}

/* Success messages */
.login-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #065f46;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: successSlide 0.5s ease;
}

@keyframes successSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-success::before {
  content: '✓';
  font-size: 1.25rem;
  font-weight: bold;
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  color: #94a3b8;
  font-size: 0.813rem;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login-footer a:hover {
  color: #764ba2;
}

/* Password hint */
.password-hint {
  font-weight: normal;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 0.25rem;
}

/* Streaming icon animation */
.icon-stream {
  animation: streamPulse 2s ease-in-out infinite;
}

@keyframes streamPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Loading state */
.btn-login.loading {
  position: relative;
  color: transparent;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

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

/* Responsive design */
@media (max-width: 992px) {
  .login-wrapper {
    flex-direction: column;
    max-width: 600px;
  }

  .login-left {
    padding: 2rem;
    min-height: 300px;
  }

  .login-right {
    padding: 2rem;
  }



  .login-logo svg,
  .login-logo i {
    font-size: 2.5rem;
  }

  .login-logo-img {
    max-width: 70px;
    max-height: 70px;
  }

  .login-title {
    font-size: 2rem;
  }

  .login-greeting h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    margin: 1rem;
    border-radius: 15px;
  }

  .login-left {
    padding: 1.5rem;
    min-height: 250px;
  }

  .login-right {
    padding: 1.5rem;
  }

  .login-title {
    font-size: 1.75rem;
  }



  .login-logo svg,
  .login-logo i {
    font-size: 2rem;
  }

  .form-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 1rem;
  }

  .login-right {
    padding: 1rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .form-control-login {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.938rem;
  }

  .btn-login {
    padding: 0.875rem;
    font-size: 0.938rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .login-right {
    background: #1e293b;
  }

  .form-header h2 {
    color: #f1f5f9;
  }

  .form-header p {
    color: #94a3b8;
  }

  .form-group-login label {
    color: #e2e8f0;
  }

  .form-control-login {
    background: rgba(51, 65, 85, 0.5);
    border-color: #475569;
    color: #f1f5f9;
  }

  .form-control-login:focus {
    background: rgba(51, 65, 85, 0.7);
  }

  .remember-me label {
    color: #cbd5e1;
  }
}