* {
  margin: 0;
  padding: 0;
  outline: none;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  background-image: url('../images/elc-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: ltr;
}

header {
  background-color: #edb82d;
  padding: 15px 30px;
  margin-bottom: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav img {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 18px;
  padding: 10px 15px;
  transition: all 0.3s ease;
  border-radius: 5px;
}

nav ul li a:hover {
  background-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.container {
  max-width: 450px;
  margin: 50px auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(135deg, #edb82d, #f0c34d, #e6ac1f);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

h2 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

h2::before {
  content: '🔐';
  font-size: 1.5em;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: #edb82d;
  width: 16px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
  direction: ltr;
  text-align: left;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #edb82d;
  box-shadow: 0 0 0 3px rgba(237, 184, 45, 0.1);
  background: white;
  transform: translateY(-2px);
}

/* Remember Me Styling */
.remember-me {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  direction: ltr;
}

.remember-me:hover {
  background: #f1f3f4;
  border-color: #edb82d;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #edb82d;
  cursor: pointer;
}

.remember-me label {
  color: #555;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me label::before {
  content: '💾';
  font-size: 1.1em;
}

button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #edb82d, #f0c34d);
  color: #333;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(237, 184, 45, 0.3);
}

button::before {
  content: '🚀';
  font-size: 1.2em;
}

button:hover {
  background: linear-gradient(135deg, #e6ac1f, #edb82d);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(237, 184, 45, 0.4);
}

button:active {
  transform: translateY(-1px);
}

.error {
  color: #d9534f;
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f8d7da, #f1b0b7);
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: shake 0.5s ease-in-out;
  direction: ltr;
}

.error::before {
  content: '⚠️';
  font-size: 1.2em;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.login-footer {
  text-align: center;
  margin-top: 25px;
  color: #666;
  font-size: 0.9rem;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  direction: ltr;
}

.login-footer::before {
  content: '🏢';
  margin-right: 8px;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
  html {
    font-size: 12px;
  }
  
  .container {
    margin: 30px auto;
    padding: 30px 25px;
    width: 90%;
  }
  
  header {
    padding: 10px 20px;
  }
  
  nav {
    height: 50px;
  }
  
  nav img {
    width: 150px;
  }
  
  nav ul li a {
    font-size: 16px;
    padding: 8px 12px;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  input[type="text"],
  input[type="password"] {
    padding: 12px 15px;
  }
  
  button {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 20px auto;
    padding: 25px 20px;
  }
  
  nav ul {
    gap: 10px;
  }
  
  nav ul li a {
    font-size: 14px;
    padding: 6px 10px;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  .remember-me {
    padding: 12px;
  }
  
  .remember-me label {
    font-size: 0.85rem;
  }
}

/* تأثيرات دخول */
.container {
  animation: containerEntrance 0.6s ease-out;
}

@keyframes containerEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* تحسينات إضافية */
.form-group:focus-within label {
  color: #edb82d;
}

.remember-me:has(input:checked) {
  background: rgba(237, 184, 45, 0.1);
  border-color: #edb82d;
}