/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap");

/* CSS Variables for Theme Support */
:root {
  /* Light Theme Defaults */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --border-color: rgba(102, 126, 234, 0.1);
  --shadow-light: 0 8px 25px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 35px rgba(102, 126, 234, 0.4);
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-light: #8b9eff;
  --primary-dark: #5a6fd8;
  --error-color: #ff3b3b;
  --success-color: #4caf50;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #b0b3b8;
  --border-color: rgba(102, 126, 234, 0.2);
  --shadow-light: 0 8px 25px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 15px 35px rgba(102, 126, 234, 0.5);
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-light: #8b9eff;
  --primary-dark: #5a6fd8;
  --error-color: #ff6b6b;
  --success-color: #51cf66;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* الحاوية */
.container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  text-align: center;
}

/* البراند */
.branding h1 {
  font-size: 36px;
  color: var(--primary-color);
  font-weight: 700;
}
.branding p {
  font-size: 18px;
  color: var(--primary-dark);
  margin-top: 10px;
  font-family: "Nunito", sans-serif;
}

/* صندوق تسجيل الدخول */
.login-box {
  background: var(--bg-secondary);
  padding: 30px 25px;
  border-radius: 16px;
  box-shadow: var(--shadow-light);
  width: 350px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.login-box h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

/* الحقول */
.input-group {
  margin-bottom: 15px;
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 12px;
  padding-left: 12px;
  padding-right: 40px;
  border: 1px solid var(--primary-dark);
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  border: 2px solid var(--primary-color);
}

.input-group input::placeholder {
  color: var(--text-secondary);
}

/* أيقونات على اليمين */
.input-group i.icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-size: 16px;
  pointer-events: none;
}

/* حقل كلمة السر */
.password-group {
  position: relative;
}

.password-group input {
  padding-left: 40px;
  padding-right: 40px;
}

/* زر إظهار كلمة السر */
.password-group button {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  z-index: 2;
  transition: color 0.3s ease;
}

/* رسالة الخطأ */
.error-message {
  color: var(--error-color);
  font-size: 13px;
  margin-bottom: 10px;
  display: none;
}

/* الزر */
.btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* الروابط */
.links {
  margin-top: 15px;
}
.links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--primary-color);
  transition: color 0.3s ease;
}
.links a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* Header Actions */
.login-header {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

[dir="ltr"] .login-header {
  right: auto;
  left: 20px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-switcher,
.theme-switcher {
  display: flex;
  align-items: center;
}

.lang-btn,
.theme-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--primary-dark);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--primary-color);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .lang-btn,
[data-theme="dark"] .theme-btn {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.lang-btn:hover,
.theme-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .lang-btn:hover,
[data-theme="dark"] .theme-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lang-btn i,
.theme-btn i {
  font-size: 16px;
}

.lang-code {
  font-weight: 600;
  font-size: 12px;
}

/* خلفية particles */
.particles-container {
  position: fixed;
  inset: 0;
  z-index: -1;
}
