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

:root {
  --primary-dark: #0a0e27;
  --secondary-dark: #1a1f3a;
  --accent-orange: #d84a2a;
  --accent-orange-light: #e85d3a;
  --text-light: #f0f0f0;
  --text-muted: #b0b0b0;
  --gold: #d4af37;
  --border-color: #2a2f48;
}

body {
  background-color: var(--primary_dark);
  color: var(--text_light);
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* Snowflakes Animation */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.snowflake {
  position: absolute;
  top: -10vh;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5em;
  text-shadow: 0 0 5px rgba(216, 74, 42, 0.5);
  animation: snowfall 10s linear infinite;
  opacity: 0.8;
}

.snowflake:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}
.snowflake:nth-child(2) {
  left: 20%;
  animation-delay: 1s;
  animation-duration: 14s;
}
.snowflake:nth-child(3) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 11s;
}
.snowflake:nth-child(4) {
  left: 40%;
  animation-delay: 3s;
  animation-duration: 13s;
}
.snowflake:nth-child(5) {
  left: 50%;
  animation-delay: 0s;
  animation-duration: 15s;
}
.snowflake:nth-child(6) {
  left: 60%;
  animation-delay: 1.5s;
  animation-duration: 12s;
}
.snowflake:nth-child(7) {
  left: 70%;
  animation-delay: 2.5s;
  animation-duration: 14s;
}
.snowflake:nth-child(8) {
  left: 80%;
  animation-delay: 3.5s;
  animation-duration: 11s;
}
.snowflake:nth-child(9) {
  left: 90%;
  animation-delay: 0.5s;
  animation-duration: 13s;
}
.snowflake:nth-child(10) {
  left: 5%;
  animation-delay: 2s;
  animation-duration: 15s;
}
.snowflake:nth-child(11) {
  left: 25%;
  animation-delay: 3.5s;
  animation-duration: 12s;
}
.snowflake:nth-child(12) {
  left: 85%;
  animation-delay: 1s;
  animation-duration: 14s;
}

@keyframes snowfall {
  0% {
    top: -10vh;
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    top: 100vh;
    opacity: 0;
    transform: translateX(100px);
  }
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--accent-orange);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(216, 74, 42, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo h1 {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(216, 74, 42, 0.3);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-orange);
  transform: translateY(-2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-orange);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.auth-btn {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 2px solid var(--accent-orange);
  transition: all 0.3s ease;
}

.nav-link.auth-btn:hover {
  background: var(--accent-orange);
  color: white;
}

.nav-link.admin-btn {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  padding: 0.5rem 1rem;
  border-radius: 5px;
  color: white !important;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
}

.user-profile img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
}

.logout {
  padding: 0.3rem 0.8rem;
  background: var(--accent-orange);
  border-radius: 3px;
  color: white !important;
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -60px;
  padding-top: 60px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 14, 39, 0.8), rgba(26, 31, 58, 0.9));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(216, 74, 42, 0.4);
  letter-spacing: 3px;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  color: white;
  box-shadow: 0 8px 24px rgba(216, 74, 42, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(216, 74, 42, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-orange);
  border: 2px solid var(--accent-orange);
}

.btn-secondary:hover {
  background: var(--accent-orange);
  color: white;
  transform: translateY(-3px);
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  background: rgba(26, 31, 58, 0.5);
  border: 2px solid var(--accent-orange);
  border-radius: 5px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(216, 74, 42, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(216, 74, 42, 0.2);
}

.stat-card h3 {
  font-family: "Cinzel", serif;
  font-size: 2.5rem;
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Sections */
.about,
.members-section,
.apply-section,
.dashboard {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  border-top: 2px solid var(--border-color);
}

.section-title {
  font-family: "Cinzel", serif;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-description {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.6), rgba(26, 31, 58, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.feature-card:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, rgba(216, 74, 42, 0.1), rgba(26, 31, 58, 0.3));
  transform: translateY(-10px);
  box-shadow: 0 12px 32px rgba(216, 74, 42, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
  font-family: "Cinzel", serif;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Members Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.member-card {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.6), rgba(26, 31, 58, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.member-card:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, rgba(216, 74, 42, 0.1), rgba(26, 31, 58, 0.3));
  transform: translateY(-10px);
  box-shadow: 0 12px 32px rgba(216, 74, 42, 0.2);
}

.member-avatar {
  margin-bottom: 1rem;
}

.member-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent-orange);
  object-fit: cover;
}

.member-card h3 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.member-provider,
.member-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.no-members {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  font-size: 1.1rem;
}

/* Apply Form */
.apply-form-wrapper {
  max-width: 500px;
  margin: 2rem auto;
}

.apply-form {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.6), rgba(26, 31, 58, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent-orange);
  font-weight: 600;
  font-family: "Cinzel", serif;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(10, 14, 39, 0.8);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  border-radius: 5px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 10px rgba(216, 74, 42, 0.3);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* إضافة تنسيقات صفحة تسجيل الدخول */
.login-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
}

.login-box {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.8), rgba(10, 14, 39, 0.9));
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 3rem 2rem;
  box-shadow: 0 20px 60px rgba(216, 74, 42, 0.15);
}

.login-title {
  font-family: "Cinzel", serif;
  font-size: 2rem;
  color: var(--accent-orange);
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.error-message {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #fca5a5;
  text-align: center;
  font-weight: 600;
}

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-footer a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Dashboard */
.dashboard {
  min-height: 80vh;
}

/* إضافة أنماط التبويبات والمودالات الفخمة */
.dashboard-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  padding: 0.8rem 1.5rem;
  background: rgba(26, 31, 58, 0.6);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.tab-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
  border-color: var(--accent-orange);
  color: white;
  box-shadow: 0 8px 16px rgba(216, 74, 42, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* أنماط البطاقات والمودالات */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.95), rgba(10, 14, 39, 0.99));
  border: 2px solid var(--accent-orange);
  border-radius: 15px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.modal-header h3 {
  color: var(--accent-orange);
  font-family: "Cinzel", serif;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--accent-orange);
  transform: rotate(90deg);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-buttons .btn {
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.config-panel,
.users-panel {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.6), rgba(26, 31, 58, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
}

.config-panel h2,
.users-panel h2 {
  color: var(--accent-orange);
  margin-bottom: 1.5rem;
  font-family: "Cinzel", serif;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th {
  background: rgba(216, 74, 42, 0.1);
  color: var(--accent-orange);
  padding: 1rem;
  text-align: right;
  border: 2px solid var(--border-color);
  font-family: "Cinzel", serif;
}

.users-table td {
  padding: 1rem;
  border: 1px solid var(--border-color);
  color: var(--text-light);
}

.users-table tr:hover {
  background: rgba(216, 74, 42, 0.05);
}

/* أنماط بطاقات الأسئلة المحسّنة */
.questions-list-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.question-card-enhanced {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.5), rgba(10, 14, 39, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.question-card-enhanced:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, rgba(216, 74, 42, 0.1), rgba(26, 31, 58, 0.5));
  transform: translateX(-5px);
}

.question-card-header {
  margin-bottom: 1rem;
}

.question-card-title {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.question-card-title h4 {
  color: var(--text-light);
  font-size: 1.1rem;
  margin: 0;
}

.question-type-badge {
  display: inline-block;
  background: rgba(216, 74, 42, 0.2);
  color: var(--accent-orange);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.required-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.question-card-actions {
  display: flex;
  gap: 1rem;
}

.btn-action {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: rgba(216, 74, 42, 0.1);
  color: var(--accent-orange);
}

.btn-action:hover {
  background: rgba(216, 74, 42, 0.2);
  transform: translateY(-2px);
}

.btn-edit {
  border: 2px solid var(--accent-orange);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 2px solid #ef4444;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* أنماط بطاقات الأعضاء المحسّنة */
.members-management-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.member-item-card {
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.5), rgba(10, 14, 39, 0.3));
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.member-item-card:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, rgba(216, 74, 42, 0.1), rgba(26, 31, 58, 0.5));
  transform: translateX(-5px);
}

.member-item-header {
  flex: 1;
  min-width: 200px;
}

.member-item-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.member-item-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
  object-fit: cover;
}

.member-item-text h4 {
  color: var(--text-light);
  margin: 0 0 0.3rem 0;
}

.provider-badge {
  display: inline-block;
  background: rgba(216, 74, 42, 0.2);
  color: var(--accent-orange);
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

.member-item-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-info {
  background: rgba(216, 74, 42, 0.1);
}
