/* Variables */
:root {
  --primary: #4a90e2;
  --secondary: #50c878;
  --accent: #ff6b6b;
  --text: #2c3e50;
  --text-light: #ffffff;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --border: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Login Container */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a90e2 0%, #50c878 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>')
    repeat;
  opacity: 0.1;
  animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: -2s;
}

.floating-element:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 30%;
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(20px, 20px) rotate(180deg);
  }
}

/* Login Content */
.login-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
  z-index: 1;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.login-content:hover {
  transform: translateY(-5px);
}

.login-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.login-content p {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* Form Styles */
.form-group {
  text-align: left;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group.checkbox input {
  width: auto;
}

/* Buttons */
.login-btn,
.register-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-btn {
  background: var(--primary);
  color: white;
}

.login-btn:hover {
  background: #357abd;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.register-btn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.register-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  margin: 2rem auto;
  box-shadow: var(--shadow);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--accent);
}

/* Language Selector */
.language-selector {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 2rem;
  border-radius: 10px;
  background: white;
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

.notification.success {
  background: var(--secondary);
  color: white;
}

.notification.error {
  background: var(--accent);
  color: white;
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
  }

  .login-content {
    padding: 2rem;
  }

  .login-content h1 {
    font-size: 2rem;
  }

  .language-selector {
    bottom: 1rem;
    right: 1rem;
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --text-light: #ffffff;
    --bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --border: #404040;
  }

  .login-content,
  .modal-content {
    background: rgba(45, 45, 45, 0.95);
  }

  .form-group input {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
  }

  .form-group input:focus {
    background: rgba(255, 255, 255, 0.15);
  }

  .lang-btn {
    background: rgba(45, 45, 45, 0.9);
  }
}
