@font-face {
  font-family: samim;
  src: url(./Samim-Medium.woff);
}

.persian-font {
  font-family: samim;
}

/*  */

:root {
  --glass-bg: rgba(30, 30, 40, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  --primary-color: #6366f1;
  --primary-light: #8b5cf6;
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body {
  background: var(--bg-gradient);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-light);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* پس زمینه دارک با الگوهای هندسی */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 20%);
  z-index: -1;
}

/* استایل هدر شیشه‌ای دارک */
header {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  opacity: 0.3;
  z-index: -1;
}

header h1 {
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  letter-spacing: 1px;
}

/* کارت‌های شیشه‌ای دارک */
.card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px !important;
  box-shadow: 0 8px 32px var(--glass-shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-shadow {
  box-shadow: 0 8px 32px var(--glass-shadow) !important;
}

/* هدر کارت‌ها */
.card-header {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8)) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  border-radius: 20px 20px 0 0 !important;
  padding: 1.2rem 1.5rem !important;
}

.card-header h2 {
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* استایل فرم‌ها */
.form-control {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 0.75rem 1rem;
  color: var(--text-light);
  transition: all 0.3s;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
  color: var(--text-light);
}

/* دکمه‌های زیبا */
.btn {
  border-radius: 12px !important;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
}

.btn-success {
  background: linear-gradient(90deg, #8B5CF6, #7C3AED) !important;
  /* بنفش */
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-outline-secondary {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--primary-color) !important;
}

.btn-outline-secondary:hover {
  background: var(--primary-color) !important;
  color: white !important;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light)) !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* هشدار */
.alert {
  background: rgba(30, 41, 59, 0.8) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--text-light);
}

.alert-danger {
  border-left: 5px solid var(--danger-color) !important;
}

.alert ul {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.alert li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

/* مودال شیشه‌ای دارک */
.modal-content {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  color: var(--text-light);
}

.modal-header {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9)) !important;
  border-radius: 20px 20px 0 0 !important;
  color: white;
  border-bottom: 1px solid var(--glass-border) !important;
}

.modal-title {
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid var(--glass-border) !important;
}

/* لودر - اصلاح شده */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
}

.loader {
  width: 100px;
  height: 100px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.loader-inner {
  width: 100%;
  height: 100%;
  border: 8px solid rgba(0, 0, 0, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* فوتر - اصلاح شده و کوچک‌تر */
.footer {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem !important;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center !important;
  position: relative;
  margin-top: auto;
  width: 100%;
}

.footer p {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

.footer a::after {
  content: "→";
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s;
}

.footer a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* مودال پیام */
#msgBox .modal-content {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* responsive adjustments */
@media (max-width: 768px) {
  .card {
    border-radius: 16px !important;
  }

  .btn,
  .form-control {
    padding: 0.6rem 1rem;
  }

  .footer {
    padding: 0.8rem !important;
    font-size: 0.85rem;
  }
}

/* انیمیشن ورود */
.card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* استایل input-group */
.input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.input-group .form-control {
  border-radius: 12px 0 0 12px !important;
  border-right: none;
}

.input-group .btn {
  border-radius: 0 12px 12px 0 !important;
}

/* بهبود ظاهر textarea */
#dataMsg {
  background: rgba(30, 41, 59, 0.7) !important;
  border-radius: 12px !important;
  border: 1px solid var(--glass-border) !important;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  resize: vertical;
  color: var(--text-light);
}

/* دکمه بستن مودال */
.btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

/* اصلاح layout اصلی */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

section {
  flex: 1;
  padding-bottom: 2rem;
}

/* اضافه کردن به فایل style.css - فقط برای input file */

input[type="file"] {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 0.75rem 1rem;
  color: var(--text-light) !important;
  transition: all 0.3s;
  cursor: pointer;
}

/* دکمه Choose File */
input[type="file"]::file-selector-button {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light)) !important;
  color: white !important;
  border: none !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px !important;
  margin-right: 1rem !important;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

/* hover effect */
input[type="file"]::file-selector-button:hover {
  background: linear-gradient(90deg, var(--primary-light), var(--primary-color)) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* active state */
input[type="file"]::file-selector-button:active {
  transform: translateY(0);
}

/* focus state */
input[type="file"]:focus::file-selector-button {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* متن نمایش فایل انتخاب شده */
input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light)) !important;
  color: white !important;
  border: none !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px !important;
  margin-right: 1rem !important;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

/* برای مرورگرهای مختلف */
input[type="file"]::-moz-file-upload-button {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light)) !important;
  color: white !important;
  border: none !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px !important;
  margin-right: 1rem !important;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

/* responsive */
@media (max-width: 768px) {
  input[type="file"]::file-selector-button {
    padding: 0.4rem 1rem !important;
    font-size: 0.85rem;
  }
}