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

:root {
  --primary: #a78bfa;
  --primary-dark: #7c3aed;
  --accent: #f472b6;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(30, 30, 50, 0.4);
  --border: rgba(167, 139, 250, 0.2);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --glow: rgba(167, 139, 250, 0.3);
}

html, body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
  animation: float 20s infinite ease-in-out;
}

.orb1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -200px;
  right: -200px;
}

.orb2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -150px;
  left: -150px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 50px) scale(0.9); }
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
}

.logo i {
  font-size: 1.5rem;
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

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

.search-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.search-btn:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 20px var(--glow);
}

main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 6rem 2rem 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.topic-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.topic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(167, 139, 250, 0.1));
  opacity: 0;
  transition: opacity 0.4s;
}

.topic-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(167, 139, 250, 0.3);
}

.topic-card:hover::before {
  opacity: 1;
}

.topic-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.4);
}

.topic-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.topic-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.articles-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--primary);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s;
  position: relative;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(167, 139, 250, 0.2);
}

.article-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .article-cover {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
}

.article-topic {
  display: inline-block;
  background: rgba(167, 139, 250, 0.2);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.article-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.5;
}

.article-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.article-detail-header {
  margin-bottom: 2rem;
}

.article-detail-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-detail-cover {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.article-detail-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-detail-content h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--primary);
}

.article-detail-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
}

.article-detail-content p {
  margin-bottom: 1rem;
}

.article-detail-content ul, .article-detail-content ol {
  margin: 1rem 0;
  padding-right: 2rem;
}

.article-detail-content li {
  margin-bottom: 0.5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.back-btn:hover {
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-box {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

#searchInput {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary);
}

.search-results {
  padding: 1rem;
}

.search-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s;
}

.search-item:hover {
  background: var(--bg-card);
}

.search-item h4 {
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.search-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.footer {
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.4);
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.9rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-stats {
    gap: 1.5rem;
  }
  .stat-num {
    font-size: 1.8rem;
  }
}
.admin-tabs { display:flex; gap:.5rem; margin:1.5rem 0; flex-wrap:wrap; }
.tab-btn { padding:.7rem 1.4rem; background:var(--bg-card); border:1px solid var(--border); border-radius:12px; color:var(--text-muted); cursor:pointer; font-family:inherit; font-size:1rem; display:flex; align-items:center; gap:.4rem; transition:all .3s; }
.tab-btn.active, .tab-btn:hover { background:linear-gradient(135deg,var(--primary),var(--primary-dark)); color:#fff; border-color:transparent; box-shadow:0 8px 24px rgba(167,139,250,.35); }
.admin-top { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; }
.btn-danger { background:rgba(239,68,68,.15); color:#ef4444; }
.admin-row { padding:1.2rem 1.5rem; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.admin-row h3 { margin-bottom:.3rem; font-size:1.05rem; }
.admin-row .muted { color:var(--text-muted); font-size:.85rem; }
.form-field { margin-bottom:1rem; }
.form-field label { display:block; margin-bottom:.5rem; color:var(--text-muted); }
.form-field input, .form-field textarea, .form-field select { width:100%; padding:.8rem; background:var(--bg-dark); border:1px solid var(--border); border-radius:10px; color:var(--text); font-family:inherit; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline:none; border-color:var(--primary); }
.icon-btn { padding:.5rem .9rem; }
.article-card { background: linear-gradient(180deg, rgba(124,58,237,.28), rgba(30,30,50,.4) 210px), var(--bg-card); }
.article-detail-cover { max-height: 420px; object-fit: cover; }
.article-cover, .article-detail-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1033 0%, #2a1045 50%, #0a0a0f 100%);
  border-radius: 12px;
  display: block !important;
  visibility: visible !important;
}
.article-detail-cover {
  height: 420px;
  border-radius: 16px;
  margin-bottom: 2rem;
}
img.article-cover, img.article-detail-cover {
  opacity: 1 !important;
}
.topics-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2.5rem 1.5rem; justify-items: center; max-width: 1000px; }
.topic-card { width: 170px; height: 170px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; position: relative; }
.topic-card::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed rgba(233,196,106,.45); animation: spin 26s linear infinite; }
.topic-card:hover::after { border-color: var(--primary); }
.topic-card p { display: none; }
.topic-card h3 { font-size: 1.05rem; margin-top: .4rem; }
.topic-icon { width: 58px; height: 58px; border-radius: 50%; font-size: 1.7rem; margin-bottom: .2rem; }
.topic-card { width: 210px; height: 210px; }
.topic-icon { width: 78px; height: 78px; font-size: 2.3rem; }
.topic-card h3 { font-size: 1.3rem; }
.topics-grid { max-width: 1200px; gap: 3rem 2rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.topics-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem 2.5rem; max-width: 1250px; margin: 4rem auto; }
.topic-card { width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(167,139,250,.3), rgba(20,16,40,.85) 65%); border: 1px solid rgba(233,196,106,.35); box-shadow: 0 0 40px rgba(124,58,237,.25), inset 0 0 30px rgba(167,139,250,.15); }
.topic-card:hover { transform: translateY(-12px) scale(1.06); box-shadow: 0 20px 60px rgba(233,196,106,.35), inset 0 0 40px rgba(233,196,106,.2); border-color: #e9c46a; }
.topic-icon { width: 86px; height: 86px; font-size: 2.6rem; }
.topic-card h3 { font-size: 1.35rem; }
.topic-card p { display: none; }
.topic-count { margin-top: .4rem; color: var(--text-muted); font-size: .85rem; background: rgba(167,139,250,.15); padding: .25rem .9rem; border-radius: 20px; }
.quote-banner { max-width: 900px; margin: 4rem auto; text-align: center; padding: 2.5rem 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.quote-banner i { font-size: 2rem; color: #e9c46a; }
.quote-banner p { font-size: 1.4rem; margin-top: .8rem; font-weight: 600; }
.tg-banner { max-width: 900px; margin: 2rem auto 4rem; display: flex; align-items: center; gap: 1.5rem; padding: 1.8rem 2.2rem; border-radius: 20px; background: linear-gradient(135deg, rgba(34,158,217,.2), rgba(124,58,237,.2)); border: 1px solid rgba(34,158,217,.4); cursor: pointer; transition: .3s; }
.tg-banner:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(34,158,217,.3); }
.tg-banner > i { font-size: 2.6rem; color: #22a7e0; }
.tg-banner h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.tg-banner p { color: var(--text-muted); }
@media (max-width: 640px) { .topic-card { width: 160px; height: 160px; } .topic-icon { width: 60px; height: 60px; font-size: 1.8rem; } .topic-card h3 { font-size: 1.05rem; } }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.topics-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem 2.5rem; max-width: 1250px; margin: 4rem auto; }
.topic-card { width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(167,139,250,.3), rgba(20,16,40,.85) 65%); border: 1px solid rgba(233,196,106,.35); box-shadow: 0 0 40px rgba(124,58,237,.25), inset 0 0 30px rgba(167,139,250,.15); }
.topic-card:hover { transform: translateY(-12px) scale(1.06); box-shadow: 0 20px 60px rgba(233,196,106,.35), inset 0 0 40px rgba(233,196,106,.2); border-color: #e9c46a; }
.topic-icon { width: 86px; height: 86px; font-size: 2.6rem; }
.topic-card h3 { font-size: 1.35rem; }
.topic-card p { display: none; }
.topic-count { margin-top: .4rem; color: var(--text-muted); font-size: .85rem; background: rgba(167,139,250,.15); padding: .25rem .9rem; border-radius: 20px; }
.quote-banner { max-width: 900px; margin: 4rem auto; text-align: center; padding: 2.5rem 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.quote-banner i { font-size: 2rem; color: #e9c46a; }
.quote-banner p { font-size: 1.4rem; margin-top: .8rem; font-weight: 600; }
.tg-banner { max-width: 900px; margin: 2rem auto 4rem; display: flex; align-items: center; gap: 1.5rem; padding: 1.8rem 2.2rem; border-radius: 20px; background: linear-gradient(135deg, rgba(34,158,217,.2), rgba(124,58,237,.2)); border: 1px solid rgba(34,158,217,.4); cursor: pointer; transition: .3s; }
.tg-banner:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(34,158,217,.3); }
.tg-banner > i { font-size: 2.6rem; color: #22a7e0; }
.tg-banner h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.tg-banner p { color: var(--text-muted); }
@media (max-width: 640px) { .topic-card { width: 160px; height: 160px; } .topic-icon { width: 60px; height: 60px; font-size: 1.8rem; } .topic-card h3 { font-size: 1.05rem; } }
.cosmos { position: relative; height: 540px; max-width: 1100px; margin: 2rem auto; }
.planet { position: absolute; width: 175px; height: 175px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; background: radial-gradient(circle at 32% 26%, var(--c1), var(--c2) 72%); box-shadow: 0 0 50px var(--gl), inset 0 0 28px rgba(255,255,255,.18); border: none; animation: drift var(--dur) ease-in-out infinite; color: #fff; }
.planet::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.35); animation: spin 24s linear infinite; }
.planet .topic-icon { background: rgba(255,255,255,.16); box-shadow: none; width: 64px; height: 64px; font-size: 1.9rem; }
.planet h3 { font-size: 1.1rem; margin-top: .4rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.planet .topic-count { background: rgba(0,0,0,.28); color: #fff; margin-top: .35rem; font-size: .8rem; padding: .2rem .8rem; border-radius: 20px; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(var(--dx), var(--dy)); } 66% { transform: translate(calc(var(--dx) * -0.6), calc(var(--dy) * 0.7)); } }
@media (max-width: 700px) { .cosmos { height: 460px; } .planet { width: 125px; height: 125px; } .planet .topic-icon { width: 46px; height: 46px; font-size: 1.4rem; } .planet h3 { font-size: .9rem; } .planet .topic-count { font-size: .68rem; } }
.cosmos { position: static; height: auto; display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; align-content: center; gap: 3.5rem 2rem; max-width: 1250px; min-height: calc(100vh - 160px); margin: 5.5rem auto 3rem; padding: 0 1.5rem; }
.planet { position: static; width: min(26vw, 330px); height: min(26vw, 330px); animation: bob2 9s ease-in-out infinite; }
.planet .topic-icon { width: 96px; height: 96px; font-size: 3rem; }
.planet h3 { font-size: 1.5rem; }
.planet .topic-count { font-size: .95rem; }
.planet:nth-child(2) { animation-delay: -1.5s; }
.planet:nth-child(3) { animation-delay: -3s; }
.planet:nth-child(4) { animation-delay: -4.5s; }
.planet:nth-child(5) { animation-delay: -6s; }
.planet:nth-child(6) { animation-delay: -7.5s; }
@keyframes bob2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@media (max-width: 900px) {
  .cosmos { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; min-height: auto; margin-top: 5rem; }
  .planet { width: min(40vw, 240px); height: min(40vw, 240px); }
  .planet .topic-icon { width: 70px; height: 70px; font-size: 2.2rem; }
  .planet h3 { font-size: 1.15rem; }
}
.cosmos { position: relative; height: calc(100vh - 140px); min-height: 560px; display: block; max-width: 1250px; margin: 5.5rem auto 2rem; }
.planet { position: absolute; width: min(24vw, 320px); height: min(24vw, 320px); animation: drift3 calc(var(--dur) * 0.55) ease-in-out infinite; }
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(calc(var(--dx) * 1.4), var(--dy)) rotate(2deg); }
  50% { transform: translate(var(--dx), calc(var(--dy) * 1.6)) rotate(0deg); }
  75% { transform: translate(calc(var(--dx) * -1.1), calc(var(--dy) * 0.8)) rotate(-2deg); }
}
@media (max-width: 900px) {
  .cosmos { display: grid; grid-template-columns: repeat(2, 1fr); justify-items: center; gap: 2.8rem 1rem; height: auto; min-height: 0; margin-top: 5rem; }
  .planet { position: static; width: min(42vw, 230px); height: min(42vw, 230px); }
  .planet:nth-child(even) { margin-top: 2.2rem; }
  .planet:nth-child(3) { margin-left: -1.2rem; }
  .planet:nth-child(5) { margin-right: -1rem; }
}
.title-row { display: flex; align-items: center; justify-content: center; gap: 1.2rem; }
.hero h1 { font-size: clamp(3rem, 8vw, 5rem); font-weight: 900; background: linear-gradient(90deg, #e9c46a, #f472b6, #a78bfa, #67e8f9, #e9c46a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 7s linear infinite; }
@keyframes shine { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.hero .deco { color: #e9c46a; font-size: 2.2rem; display: inline-block; animation: spin 14s linear infinite; text-shadow: 0 0 20px rgba(233,196,106,.8); }
.cosmos { position: relative; display: block; height: 640px; max-width: 1250px; margin: 2rem auto; }
.planet { position: absolute; width: min(24vw, 320px); height: min(24vw, 320px); }
.planet:nth-child(1) { animation: floatA 14s ease-in-out infinite; }
.planet:nth-child(2) { animation: floatB 17s ease-in-out infinite; }
.planet:nth-child(3) { animation: floatC 15s ease-in-out infinite; }
.planet:nth-child(4) { animation: floatB 19s ease-in-out infinite reverse; }
.planet:nth-child(5) { animation: floatA 16s ease-in-out infinite reverse; }
.planet:nth-child(6) { animation: floatC 18s ease-in-out infinite reverse; }
@keyframes floatA { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(70px, 45px) rotate(2deg); } 65% { transform: translate(-45px, 80px) rotate(-2deg); } }
@keyframes floatB { 0%, 100% { transform: translate(0, 0); } 35% { transform: translate(-80px, 55px) rotate(-2deg); } 70% { transform: translate(55px, -45px) rotate(2deg); } }
@keyframes floatC { 0%, 100% { transform: translate(0, 0); } 40% { transform: translate(50px, -60px) rotate(2deg); } 75% { transform: translate(-60px, 40px) rotate(-2deg); } }
@media (max-width: 900px) {
  .cosmos { display: block; height: 540px; }
  .planet { position: absolute; width: 138px; height: 138px; }
  .planet .topic-icon { width: 52px; height: 52px; font-size: 1.6rem; }
  .planet h3 { font-size: 1rem; }
  .planet .topic-count { font-size: .68rem; }
}
.marquee { overflow: hidden; margin: 3rem 0 1rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .9rem 0; }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: slide 30s linear infinite; }
.marquee-track span { color: #e9c46a; font-size: 1.05rem; white-space: nowrap; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.glow-stats { display: flex; justify-content: center; gap: 3.5rem; flex-wrap: wrap; margin: 2.5rem 0; }
.glow-stat { text-align: center; }
.glow-stat b { display: block; font-size: 2.4rem; color: #e9c46a; text-shadow: 0 0 25px rgba(233,196,106,.6); }
.glow-stat span { color: var(--text-muted); }
.wisdom { text-align: center; margin: 2.5rem auto; max-width: 800px; padding: 0 1rem; }
.wisdom p { font-size: 1.5rem; font-weight: 600; transition: opacity .8s; }
.wisdom .wq { color: #e9c46a; }
.wisdom-card { max-width: 850px; margin: 3rem auto; padding: 3rem 2rem 2.2rem; position: relative; border: 1px solid rgba(233,196,106,.35); border-radius: 24px; background: radial-gradient(circle at 50% 0%, rgba(233,196,106,.1), transparent 60%), var(--bg-card); text-align: center; }
.wisdom-card::before { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(233,196,106,.3); border-radius: 16px; pointer-events: none; }
.wisdom-card .corner { position: absolute; color: #e9c46a; font-size: 1.3rem; text-shadow: 0 0 15px rgba(233,196,106,.8); }
.wisdom-card p { font-size: 1.7rem; font-weight: 700; transition: opacity .8s; line-height: 2; }
.wisdom-card .src { display: block; margin-top: 1.2rem; color: var(--text-muted); font-size: .95rem; font-weight: 400; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 1100px; margin: 3rem auto; padding: 0 1rem; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 2.2rem 1.5rem; text-align: center; transition: .3s; }
.feature:hover { transform: translateY(-6px); border-color: #e9c46a; box-shadow: 0 15px 40px rgba(233,196,106,.15); }
.feature i { font-size: 2.4rem; color: #e9c46a; display: block; margin-bottom: 1rem; }
.feature h3 { margin-bottom: .6rem; font-size: 1.15rem; }
.feature p { color: var(--text-muted); font-size: .9rem; line-height: 1.8; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .wisdom-card p { font-size: 1.3rem; } }
.wisdom-card { max-width: 850px; margin: 3rem auto; padding: 3rem 2rem 2.2rem; position: relative; border: 1px solid rgba(233,196,106,.35); border-radius: 24px; background: radial-gradient(circle at 50% 0%, rgba(233,196,106,.1), transparent 60%), var(--bg-card); text-align: center; }
.wisdom-card::before { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(233,196,106,.3); border-radius: 16px; pointer-events: none; }
.wisdom-card .corner { position: absolute; color: #e9c46a; font-size: 1.3rem; text-shadow: 0 0 15px rgba(233,196,106,.8); }
.wisdom-card p { font-size: 1.7rem; font-weight: 700; transition: opacity .8s; line-height: 2; }
.wisdom-card .src { display: block; margin-top: 1.2rem; color: var(--text-muted); font-size: .95rem; font-weight: 400; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 1100px; margin: 3rem auto; padding: 0 1rem; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 2.2rem 1.5rem; text-align: center; transition: .3s; }
.feature:hover { transform: translateY(-6px); border-color: #e9c46a; box-shadow: 0 15px 40px rgba(233,196,106,.15); }
.feature i { font-size: 2.4rem; color: #e9c46a; display: block; margin-bottom: 1rem; }
.feature h3 { margin-bottom: .6rem; font-size: 1.15rem; }
.feature p { color: var(--text-muted); font-size: .9rem; line-height: 1.8; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .wisdom-card p { font-size: 1.3rem; } }
.wisdom-card { margin-top: 5rem; }
.wisdom-card .q-ar { display: block; font-size: 1.7rem; font-weight: 700; line-height: 2; }
.wisdom-card .q-fa { display: block; margin-top: .9rem; font-size: 1.05rem; font-weight: 400; opacity: .85; }
.tool-card { max-width: 850px; margin: 3rem auto; padding: 2.5rem 2rem; border: 1px solid rgba(167,139,250,.4); border-radius: 24px; background: radial-gradient(circle at 50% 0%, rgba(167,139,250,.12), transparent 60%), var(--bg-card); text-align: center; }
.tool-card h2 { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: .8rem; }
.tool-card h2 i { color: #a78bfa; font-size: 1.6rem; }
.tool-desc { color: var(--text-muted); margin-bottom: 1.5rem; }
.tool-row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.tool-row input { width: min(420px, 80%); padding: .9rem 1.2rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-dark); color: var(--text); font-family: inherit; font-size: 1.05rem; }
.tool-row input:focus { outline: none; border-color: #a78bfa; }
.abjad-total { margin-top: 1.8rem; font-size: 1.2rem; }
.abjad-total b { color: #e9c46a; font-size: 1.6rem; text-shadow: 0 0 20px rgba(233,196,106,.5); }
.abjad-sub { margin-top: .6rem; color: var(--text-muted); }
.abjad-sub b { color: #a78bfa; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.2rem; }
.chip { padding: .35rem .8rem; border: 1px solid rgba(233,196,106,.4); border-radius: 20px; color: #e9c46a; font-size: .9rem; background: rgba(233,196,106,.08); }
.tool-err { color: #ef4444; margin-top: 1rem; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 640px; margin: 0 auto 1.2rem; }
.tool-grid label { display: block; text-align: right; margin-bottom: .4rem; color: var(--text-muted); font-size: .9rem; }
.tool-grid input { width: 100%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-dark); color: var(--text); font-family: inherit; }
.tool-grid input:focus { outline: none; border-color: #a78bfa; }
.mj-cards { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.mj-card { border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.4rem; background: var(--bg-dark); min-width: 220px; text-align: right; }
.mj-card b { color: #a78bfa; }
.mj-card .line { margin-top: .4rem; font-size: .92rem; color: var(--text-muted); }
.verdict { margin-top: 1.6rem; padding: 1.5rem; border-radius: 16px; border: 1px solid rgba(233,196,106,.4); background: rgba(233,196,106,.08); }
.verdict h3 { color: #e9c46a; margin-bottom: .6rem; font-size: 1.2rem; }
.verdict p { line-height: 1.9; }
.mj-note { margin-top: 1.2rem; color: var(--text-muted); font-size: .85rem; line-height: 1.8; }
@media (max-width: 700px) { .tool-grid { grid-template-columns: 1fr; } }
.footer { background: linear-gradient(180deg, transparent, rgba(10,10,15,.92) 20%), var(--bg-card); border-top: 1px solid rgba(233,196,106,.25); position: relative; z-index: 2; margin-top: 5rem; padding: 3.5rem 1.5rem 1.5rem; backdrop-filter: blur(20px); }
.footer::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, #e9c46a, transparent); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1.2fr 1.4fr; gap: 2.5rem; }
.f-col h4 { color: #e9c46a; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.f-col a { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; transition: .3s; }
.f-col a:hover { color: #e9c46a; transform: translateX(-4px); }
.f-brand p { color: var(--text-muted); line-height: 2; }
.f-tag { display: block; color: var(--text-muted); margin-bottom: .6rem; transition: .3s; }
.f-tag:hover { color: #e9c46a; transform: translateX(-4px); }
.f-join { width: 100%; justify-content: center; }
.f-id { margin-top: .8rem; color: var(--text-muted); direction: ltr; text-align: center; }
.footer-bottom { max-width: 1200px; margin: 2.5rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer { background: linear-gradient(180deg, transparent, rgba(10,10,15,.92) 20%), var(--bg-card); border-top: 1px solid rgba(233,196,106,.25); position: relative; z-index: 2; margin-top: 5rem; padding: 3.5rem 1.5rem 1.5rem; backdrop-filter: blur(20px); }
.footer::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, #e9c46a, transparent); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1.2fr 1.4fr; gap: 2.5rem; }
.f-col h4 { color: #e9c46a; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.f-col a { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; transition: .3s; }
.f-col a:hover { color: #e9c46a; transform: translateX(-4px); }
.f-brand p { color: var(--text-muted); line-height: 2; }
.f-tag { display: block; color: var(--text-muted); margin-bottom: .6rem; transition: .3s; }
.f-tag:hover { color: #e9c46a; transform: translateX(-4px); }
.f-join { width: 100%; justify-content: center; }
.f-id { margin-top: .8rem; color: var(--text-muted); direction: ltr; text-align: center; }
.footer-bottom { max-width: 1200px; margin: 2.5rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.dream-search { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dream-search input { width: min(480px, 85%); padding: .9rem 1.2rem; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-dark); color: var(--text); font-family: inherit; font-size: 1.05rem; }
.dream-search input:focus { outline: none; border-color: #a78bfa; }
.dream-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.dream-chips .chip { cursor: pointer; }
.dream-results { display: grid; gap: 1rem; margin-top: 1.5rem; }
.dream-card { text-align: right; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 16px; padding: 1.3rem 1.5rem; }
.dream-card h4 { color: #e9c46a; margin-bottom: .5rem; display: flex; justify-content: space-between; align-items: center; }
.dream-card h4 span { color: var(--text-muted); font-size: .8rem; font-weight: 400; }
.dream-card p { line-height: 1.9; }
