/* public/css/style.css */
@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn"), local("Vazir"), local("Tahoma"), sans-serif;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #10b981;
  --accent: #f59e0b;
  --bg-color: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-radius: 24px;
}

body {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  padding: 40px 15px; /* فضای خالی از بالا و پایین */
  display: flex;
  justify-content: center;
  align-items: flex-start; /* قبلاً center بود که باعث مشکل می‌شد */
  min-height: 100vh;
  direction: rtl;
  color: var(--text-main);
  overflow-x: hidden; /* جلوگیری از اسکرول افقی */
}

/* --- انیمیشن پس‌زمینه (جدید) --- */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: #a5b4fc; /* بنفش روشن */
  top: -50px;
  left: -50px;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background: #6ee7b7; /* سبز روشن */
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.blob-3 {
  width: 150px;
  height: 150px;
  background: #fde047; /* زرد */
  top: 40%;
  left: 60%;
  opacity: 0.4;
  animation-duration: 15s;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(20px, 40px);
  }
}

/* --- کانتینر شیشه‌ای (Glass Effect) --- */
.container {
  background: rgba(255, 255, 255, 0.85); /* شفافیت */
  backdrop-filter: blur(12px); /* تار کردن پشت */
  -webkit-backdrop-filter: blur(12px);
  width: 100%;
  max-width: 480px;
  border-radius: var(--border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  position: relative;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 35px 20px 50px 20px;
  text-align: center;
  border-radius: 0 0 30px 30px;
  position: relative;
  z-index: 2;
}

.header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
}
.header p {
  margin: 8px 0 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.user-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 0.85rem;
}
.credit-pill {
  background: var(--accent);
  color: #78350f;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 800;
}

/* Content & Form */
.content {
  padding: 0 24px 24px 24px;
  margin-top: -25px;
  position: relative;
  z-index: 3;
}

.form-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.2s;
  background: #f8fafc;
  appearance: none; /* حذف استایل پیش‌فرض مرورگر */
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* استایل دراپ‌داون */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  background-size: 1.2em;
}

.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-primary {
  background: linear-gradient(to left, var(--primary), var(--primary-dark));
}
.btn-success {
  background: linear-gradient(to left, #10b981, #059669);
}
.btn-link {
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 15px;
  display: block;
  text-align: center;
  text-decoration: none;
}

/* Pricing Card */
.pricing-card {
  background: white;
  border: 2px solid var(--secondary);
  border-radius: 20px;
  padding: 25px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}
.pricing-badge {
  background: var(--secondary);
  color: white;
  padding: 6px 16px;
  border-radius: 0 0 12px 12px;
  font-size: 0.8rem;
  font-weight: bold;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.price-amount {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 20px 0 5px;
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: right;
  border-top: 1px dashed #e2e8f0;
  padding-top: 15px;
}
.features-list li::before {
  content: "✓";
  color: white;
  background: var(--secondary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-left: 8px;
}

/* --- Post Preview (جدید: شبیه پست ایتا) --- */
.post-preview {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
  border: 1px solid #e2e8f0;
}

.post-header {
  padding: 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.avatar {
  width: 40px;
  height: 40px;
  background: #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-left: 10px;
}

.post-info h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-main);
}
.post-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-body {
  padding: 20px;
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.8;
  color: #334155;
  font-size: 0.95rem;
}

.post-actions {
  padding: 10px;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  background: white;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: 0.2s;
}
.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Alerts */
.alert {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-right: 4px solid;
  font-size: 0.9rem;
}
.alert-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}
.alert-success {
  background: #f0fdf4;
  border-color: #10b981;
  color: #166534;
}

/* Loading */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 100;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
