/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700&display=swap'); */

@font-face {
  font-family: 'Gandom';
  src: url('/static/fonts/Gandom.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ========== ROOT VARIABLES ========== */
:root {
  --bg-main: #06090d;
  --bg-secondary: #0b1118;
  --bg-card: rgba(13, 19, 28, 0.72);
  --bg-card-strong: rgba(9, 14, 22, 0.88);
  --bg-input: rgba(8, 18, 28, 0.82);
  --bg-hover: rgba(0, 255, 255, 0.08);

  --text-main: #eafaff;
  --text-soft: #b9dff1;
  --text-muted: #7ea3b8;

  --primary: #00ffff;
  --primary-2: #00cfff;
  --primary-3: #00b7ff;
  --success: #00ff9d;
  --warning: #ffc857;
  --danger: #ff5f6d;

  --border: rgba(0, 255, 255, 0.16);
  --border-strong: rgba(0, 255, 255, 0.35);

  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 18px rgba(0, 255, 255, 0.25);
  --glow-strong: 0 0 28px rgba(0, 255, 255, 0.42);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --transition: all 0.28s ease;

  --container-padding: 8%;
  --blur: blur(14px);
}

/* ========== RESET / BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Gandom', sans-serif;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

/* ===== پس‌زمینه‌ی اصلی ===== */
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-main);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Gandom', sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* ===== لایه‌ی اول (پس‌زمینه‌ی عمیق) ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 255, 255, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 183, 255, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 255, 255, 0.04) 0%, transparent 45%),
    linear-gradient(160deg, var(--bg-main) 0%, var(--bg-secondary) 100%);
  background-size: 250% 250%;
  animation: smoothFlow 11s ease-in-out infinite alternate;
}

/* ===== لایه‌ی دوم (هاله‌های محو) ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 30% 60%, rgba(0, 255, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(0, 183, 255, 0.04) 0%, transparent 35%);
  background-size: 220% 220%;
  animation: smoothFlow 13s ease-in-out infinite alternate-reverse;
  filter: blur(40px);
  opacity: 0.65;
}

/* ===== انیمیشن با حرکت نرم ===== */
@keyframes smoothFlow {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 30% 20%; }
  50%  { background-position: 60% 80%; }
  75%  { background-position: 80% 40%; }
  100% { background-position: 100% 100%; }
}

@media (min-width: 769px) {
  body {
    background-attachment: scroll;
  }
}


@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}


main {
  flex: 1;
}

.content-wrapper {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: rgba(0, 255, 255, 0.22);
  color: #fff;
}

/* اسکرول‌بار */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #071018;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-3));
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5cffff, #3dbfff);
}

/* ========== GLOBAL SURFACE STYLE ========== */
.feature-box,
.product-box,
.dashboard-card,
.dashboard-announcements,
.auth-box,
.error-box,
.uploader-form,
.uploader-info,
.about-box,
.person-section,
.team-neo-card,
.partner-neo-card,
.category-box,
.coin-rules-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-md);
}

/* ========== HEADER ========== */
.main-header,
.sources-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 10, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}

.logo,
.sources-page-header h1 {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.48);
}

.logo {
  font-size: 1.4rem;
}

.sources-page-header h1 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav a {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
  transition: width 0.25s ease;
}

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

nav a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 5px 0;
  border-radius: 999px;
  transition: var(--transition);
}

/* ========== AUTH BUTTONS ========== */
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-auth.login {
  border-color: rgba(0, 255, 255, 0.28);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.btn-auth.login:hover {
  background: rgba(0, 255, 255, 0.08);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}

.btn-auth.register {
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #041015;
  font-weight: bold;
  box-shadow: 0 8px 22px rgba(0, 255, 255, 0.22);
}

.btn-auth.register:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-strong);
}

.btn-auth.logout {
  border: 1px solid rgba(255, 95, 109, 0.4);
  color: #ff9ca5;
  background: rgba(255, 95, 109, 0.06);
}

.btn-auth.logout:hover {
  background: rgba(255, 95, 109, 0.12);
}

.user-name {
  color: var(--primary);
  font-size: 0.92rem;
}

/* ========== BUTTONS ========== */
.btn-glow,
.buy-button,
.download-btn,
.back-button,
.btn-home,
.btn-back,
.partner-btn,
.neo-link,
.glass-btn {
  transition: var(--transition);
}

.btn-glow {
  padding: 12px 24px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: rgba(0, 255, 255, 0.04);
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  box-shadow: inset 0 0 0 rgba(0, 255, 255, 0);
}

.btn-glow:hover {
  background: var(--primary);
  color: #031015;
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

.back-button,
.btn-home,
.btn-back {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #051017;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 255, 255, 0.2);
}

.back-button:hover,
.btn-home:hover,
.btn-back:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--glow-strong);
}

.buy-button {
  padding: 12px 28px;
  border: 1px solid var(--success);
  color: var(--success);
  background: rgba(0, 255, 157, 0.04);
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.buy-button:hover {
  background: var(--success);
  color: #03120d;
  box-shadow: 0 0 25px rgba(0, 255, 157, 0.35);
  transform: translateY(-2px);
}

.download-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary-3), var(--primary));
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 8px 24px rgba(0, 140, 255, 0.24);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 180, 255, 0.35);
}

.partner-btn,
.neo-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  background: rgba(0, 255, 255, 0.03);
}

.partner-btn:hover,
.neo-link:hover {
  background: var(--primary);
  color: #000;
  box-shadow: var(--glow);
}

/* ========== HERO ========== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px var(--container-padding);
  min-height: 82vh;
  gap: 44px;
  background: transparent;
  position: relative;
}

.hero-content {
  flex: 1;
  text-align: right;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--primary);
  text-shadow: 0 0 22px rgba(0, 255, 255, 0.45);
  margin-bottom: 18px;
  line-height: 1.35;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.08rem);
  color: var(--text-soft);
  max-width: 560px;
  line-height: 1.9;
  margin-bottom: 28px;
}

.hero-robot-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-robot {
  width: 100%;
  max-width: 320px;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 0 35px rgba(0, 255, 255, 0.38));
}

/* ========== MAIN SECTIONS ========== */
.features,
.contact,
.main-content,
.stats-counter,
.dashboard-main,
.ultra-upload,
.auth-page,
.error-page,
.about-neo {
  background: transparent;
}

.features,
.contact,
.stats-counter {
  padding: 90px var(--container-padding);
  position: relative;
  z-index: 1;
}

.features h2,
.contact h2,
.dashboard-sources-section h2,
.dashboard-announcements h2,
.about-box h2,
.uploader-info h3,
.uploader-header h1,
.auth-box h1,
.error-box h1 {
  color: var(--primary);
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.26);
}

.features h2,
.contact h2 {
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  margin-bottom: 44px;
  text-align: center;
}

/* ========== FEATURES GRID ========== */
.features-grid,
.product-grid,
.dashboard-grid,
.user-sources-grid,
.team-neo-grid,
.partners-neo-grid {
  display: grid;
  gap: 24px;
  justify-content: center;
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.product-grid,
.user-sources-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.team-neo-grid,
.partners-neo-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.feature-box,
.product-box,
.dashboard-card,
.team-neo-card,
.partner-neo-card,
.user-source-box {
  border-radius: 18px;
  padding: 24px;
  transition: var(--transition);
}

.feature-box:hover,
.product-box:hover,
.dashboard-card:hover,
.team-neo-card:hover,
.partner-neo-card:hover,
.user-source-box:hover {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--glow);
}

.feature-box h3,
.product-box h3,
.dashboard-card h3,
.team-neo-card h3,
.partner-neo-card h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-box p,
.product-box p,
.dashboard-card p,
.team-desc,
.partner-neo-card p {
  color: var(--text-soft);
}

/* ========== CONTACT ========== */
.contact {
  text-align: center;
}

.contact form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.contact input,
.contact textarea,
.auth-box input,
.uploader-form input,
.uploader-form textarea,
.dark-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(0, 191, 255, 0.22);
  border-radius: 12px;
  padding: 13px 14px;
  color: #fff;
  outline: none;
  transition: var(--transition);
}

.contact input,
.contact textarea {
  max-width: 540px;
}

.contact input:focus,
.contact textarea:focus,
.auth-box input:focus,
.uploader-form input:focus,
.uploader-form textarea:focus,
.dark-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.08), var(--glow);
}

.contact textarea {
  height: 130px;
  resize: vertical;
}

/* ========== FOOTER ========== */
/* ===== فوتر ===== */
.main-footer {
    background: rgba(3, 6, 10, 0.86);
    border-top: 1px solid rgba(0, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    padding: 30px 20px 16px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== لینک‌های مفید ===== */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.05);
}

.footer-links > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-links h4 {
    color: var(--text-main, #eafaff);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 4px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--primary, #00ffff);
}

.footer-links a {
    color: var(--text-soft, #b9dff1);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary, #00ffff);
}

/* ===== ردیف پایین ===== */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


/* ===== کانال بله - فقط آیکون ===== */
.channel-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.channel-link svg {
    height: 62px;  /* اندازه دلخواه */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}


/* ===== کپی‌رایت ===== */
.copyright {
    color: var(--text-muted, #7ea3b8);
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
    flex: 1;
}

/* ===== موبایل ===== */
@media (max-width: 768px) {
    .footer-links {
        gap: 30px;
    }

    .footer-links > div {
        min-width: 100px;
    }

    .footer-bottom {
        flex-wrap: wrap;
        justify-content: center;
    }

    .channel-link {
        order: 2;
        margin-right: auto;
    }

    .copyright {
        order: 1;
        flex: 0 1 auto;
        margin: 0 auto;
    }

    .channel-link svg {
        height: 58px;
    }


    .copyright {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .channel-link svg {
        height: 48px;
    }

    .copyright {
        font-size: 0.7rem;
    }
}

/* ========== PAGES MAIN CONTENT ========== */
.main-content {
  padding: 80px var(--container-padding);
  text-align: center;
  min-height: 80vh;
  position: relative;
  z-index: 1;
}

/* ========== PRODUCT / SOURCE PAGE ========== */
.product-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  min-height: 300px;
}

.product-box h3 {
  font-size: 1.4rem;
}

.product-box p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ========== SINGLE SOURCE PAGE ========== */
.single-source-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 34px;
  padding: 40px;
  flex-wrap: wrap;
}

.source-image {
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
}

.source-details {
  max-width: 560px;
  text-align: right;
}

.source-details h1 {
  color: var(--primary);
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.4;
}

.source-details p {
  color: var(--text-soft);
  line-height: 1.95;
  margin-bottom: 24px;
}

.source-specs {
  list-style: disc inside;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.source-specs li {
  margin-bottom: 8px;
}

/* ========== SOURCE META / PUBLISHER ========== */
.source-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.publisher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.18);
  font-size: 0.9rem;
  transition: var(--transition);
}

.publisher:hover {
  background: rgba(0, 255, 255, 0.08);
  border-color: rgba(0, 255, 255, 0.42);
}

.publisher-icon {
  font-size: 14px;
  opacity: 0.85;
}

.publisher-name {
  font-weight: 600;
  color: var(--primary);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.22);
}

/* ========== SEARCH FORM ========== */
.dark-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  background: rgba(11, 20, 31, 0.72);
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

.dark-search-input {
  flex-grow: 1;
}

.dark-search-input::placeholder {
  color: var(--text-muted);
}

.dark-search-button {
  padding: 11px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--success), #1effc7);
  color: #032018;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(0, 255, 157, 0.22);
}

.dark-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 255, 157, 0.35);
}

.dark-search-button:active {
  transform: translateY(1px);
}

/* ========== 404 ========== */
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 40px 20px;
}

.error-box {
  text-align: center;
  max-width: 620px;
  padding: 40px 28px;
  border-radius: 20px;
}

.error-box h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  margin-bottom: 10px;
}

.error-box h2 {
  margin-bottom: 14px;
  color: var(--text-main);
}

.error-box p {
  color: var(--text-soft);
  margin-bottom: 28px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ========== AUTH PAGES ========== */
.auth-page {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.auth-box {
  width: 100%;
  max-width: 460px;
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: var(--shadow-lg);
}

.auth-box h1 {
  text-align: center;
  margin-bottom: 25px;
}

.auth-box form p {
  margin-bottom: 15px;
}

.auth-box label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.auth-error {
  color: #ff8894;
  margin-bottom: 15px;
  text-align: center;
}

.auth-switch {
  margin-top: 15px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.auth-switch a {
  color: var(--primary-3);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ========== DASHBOARD ========== */
.dashboard-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 34px var(--container-padding);
  background: transparent;
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
}

.dashboard-title-group h1 {
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  color: var(--primary);
  margin-bottom: 6px;
}

.dashboard-welcome {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.dashboard-main {
  padding: 30px var(--container-padding) 60px var(--container-padding);
}

.dashboard-announcements {
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 25px;
}

.dashboard-announcements h2 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.dashboard-announcements ul {
  list-style: none;
}

.dashboard-announcements li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.dashboard-announcements li:last-child {
  border-bottom: none;
}

.announcement-title {
  font-weight: 600;
  color: var(--text-main);
}

.announcement-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.announcement-body {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin-top: 4px;
}

.dashboard-card {
  border-radius: 18px;
}

.dashboard-card h3 {
  font-size: 1.08rem;
}

.dashboard-card p {
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.dashboard-sources-section {
  margin-top: 15px;
}

.dashboard-sources-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.user-source-desc {
  font-size: 0.92rem;
  color: #d2eefc;
  margin: 10px 0 14px 0;
}

.user-source-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  gap: 12px;
  flex-wrap: wrap;
}

.user-source-date {
  color: var(--text-muted);
}

.user-source-status {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
}

.user-source-status-accepted {
  background: rgba(0, 255, 170, 0.1);
  border: 1px solid #00ffaa;
  color: #00ffaa;
}

.user-source-status-pending {
  background: rgba(255, 196, 0, 0.1);
  border: 1px solid #ffc400;
  color: #ffc400;
}

.user-source-status-rejected {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid #ff4d4d;
  color: #ff8080;
}

.no-sources-text {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* ========== UPLOAD PAGE ========== */
.ultra-upload {
  padding: 50px 20px;
  animation: fadeInUp 0.8s ease;
}

.uploader-header {
  text-align: center;
  margin-bottom: 45px;
}

.uploader-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 1px;
  font-weight: bold;
  margin-bottom: 10px;
}

.uploader-header p {
  opacity: 0.88;
  margin-top: 8px;
  font-size: 1.05rem;
  color: var(--text-soft);
}

.uploader-shell {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.uploader-form,
.uploader-info {
  border-radius: 22px;
  padding: 30px;
}

.u-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}

.u-field > label {
  margin-bottom: 9px;
  font-size: 15px;
  color: #c4f7ff;
  text-shadow: 0 0 4px rgba(0, 255, 255, 0.22);
}

.dropbox {
  border: 2px dashed rgba(0, 255, 255, 0.36);
  padding: 25px;
  border-radius: 16px;
  text-align: center;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
}

.dropbox:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.drop-hint {
  display: block;
  margin-top: 8px;
  opacity: 0.65;
  font-size: 13px;
}

.uploader-btn {
  margin-top: 15px;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--primary-3));
  background-size: 200%;
  color: #001116;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 24px rgba(0, 255, 255, 0.18);
}

.uploader-btn:hover {
  background-position: right;
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

.uploader-info li {
  margin-bottom: 10px;
  opacity: 0.88;
  color: var(--text-soft);
}

/* ========== ABOUT / TEAM PAGE ========== */
.content-wrapper {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  justify-content: center;
}

.person-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: 18px;
  text-align: center;
}

.person-section img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

.person-info h2 {
  color: var(--primary-3);
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.3);
}

.person-info .degree {
  color: var(--text-main);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-weight: normal;
}

.person-info p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

.person-info .contact {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--primary);
}

.person-info .contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
}

.person-info .contact a:hover {
  color: #fff;
}

/* ========== ABOUT NEW ========== */
.about-neo {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-hero-neo {
  text-align: center;
}

.about-hero-neo h1 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--primary);
  text-shadow: 0 0 22px rgba(0, 255, 255, 0.38);
  margin-bottom: 15px;
}

.about-hero-neo p {
  max-width: 720px;
  margin: auto;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.about-box {
  border-radius: 22px;
  padding: 32px;
}

.about-box h2 {
  margin-bottom: 18px;
}

.team-neo-card {
  text-align: center;
}

.team-neo-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  margin: 0 auto 15px auto;
}

.team-desc {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.team-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 999px;
}

.team-badge.core {
  background: rgba(0, 255, 255, 0.12);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.partners-neo {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.partner-neo {
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.14);
  color: var(--text-main);
  transition: var(--transition);
}

.partner-neo:hover {
  background: rgba(0, 255, 255, 0.12);
  box-shadow: var(--glow);
}

.partner-neo-card {
  text-align: center;
}

.partner-neo-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 15px auto;
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.35));
}

.rules-neo {
  list-style: disc;
  padding-right: 20px;
  line-height: 2;
  color: var(--text-soft);
}

/* ========== RANK BADGE ========== */
.rank-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 20, 30, 0.6);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 15px;
  gap: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.rank-label {
  font-size: 0.7rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rank-number {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.35);
}

/* ========== STATS COUNTER ========== */
.stats-counter {
  position: relative;
  text-align: center;
}

.stats-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(0, 255, 255, 0.04);
  border-radius: 24px;
  border: 1px solid rgba(0, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.stat-item h2 {
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.55);
  margin-bottom: 10px;
  font-weight: 800;
}

.stat-item p {
  font-size: 1.15rem;
  color: var(--text-soft);
  opacity: 0.95;
  letter-spacing: 0.4px;
}

.stats-counter::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  background: var(--primary);
  filter: blur(160px);
  opacity: 0.08;
  z-index: 0;
}

/* ========== MESSAGES ========== */
.messages-container {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  z-index: 9999;
}

.message {
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeInDown 0.4s ease-out;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message.success { background: rgba(40, 167, 69, 0.92); }
.message.error   { background: rgba(220, 53, 69, 0.92); }
.message.warning { background: rgba(255, 193, 7, 0.94); color: #333; }
.message.info    { background: rgba(23, 162, 184, 0.92); }

.close-message {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0 5px;
}

/* ========== FORM ERRORS ========== */
.form-errors,
.field-error {
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 90, 120, 0.4);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.form-errors p,
.field-error p {
  margin: 0;
  color: #ff97a5;
  font-size: 14px;
}

/* ========== CATEGORY BOX ========== */
.category-box {
  border-radius: 18px;
  padding: 20px;
  margin: 25px auto;
  max-width: 900px;
  width: 90%;
}

.category-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
  text-align: center;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.category-btn {
  padding: 7px 14px;
  background: rgba(0, 153, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid rgba(0, 191, 255, 0.18);
  transition: var(--transition);
}

.category-btn:hover {
  background: rgba(0, 191, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.pagination .step-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.glass-btn:active {
  transform: translateY(0);
}

.pagination .current {
  font-size: 0.9rem;
  color: #fff;
  padding: 4px 8px;
}

/* ========== COIN BADGE ========== */
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 215, 0, 0.12);
  color: #ffd35f;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

/* ========== CATEGORY SELECT IN UPLOAD ========== */
.category-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.category-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.45);
  background: transparent;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.category-item input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
  background-color: #00f5c4;
}

.category-item input[type="checkbox"]:checked {
  border-color: #00f5c4;
  background: rgba(0, 245, 196, 0.12);
}

.category-item input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.category-item:has(input:checked) {
  background: rgba(0, 245, 196, 0.10);
  border: 1px solid #00f5c4;
  box-shadow: 0 0 15px rgba(0,245,196,0.22);
  transform: translateY(-2px);
}

.category-item span {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

/* ========== USER MENU ========== */
.user-menu {
  position: relative;
}

.user-btn {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border: 1px solid rgba(0, 255, 255, 0.16);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  transition: var(--transition);
}

.user-btn:hover {
  background: rgba(0, 255, 255, 0.08);
  box-shadow: var(--glow);
}

.user-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  background: rgba(8, 13, 20, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  width: 220px;
  padding: 15px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 255, 255, 0.12);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.user-dropdown.active {
  display: flex;
}

.user-info {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.user-info .name {
  display: block;
  font-weight: bold;
  color: white;
}

.user-info .coins {
  color: #ffd700;
  font-size: 14px;
}

.dropdown-item {
  color: white;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.logout {
  color: #ff7f8f;
}

/* ========== COIN RULES BOX ========== */
.coin-rules-box {
  padding: 20px 22px;
  border-radius: 16px;
  margin: 20px 0;
}

.coin-rules-box h3 {
  margin: 0 0 12px 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.coin-rules-box ul {
  margin: 0;
  padding-right: 20px;
}

.coin-rules-box li {
  margin-bottom: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 1.9;
  list-style: disc;
}

.coin-rules-box .note {
  margin-top: 12px;
  color: rgba(255,255,255,0.60);
  font-size: 13px;
  font-style: italic;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .main-header,
  .sources-page-header {
    padding: 15px 30px;
  }

  .hamburger {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(5, 10, 16, 0.96);
    backdrop-filter: blur(12px);
    padding: 20px;
    z-index: 999;
    border-bottom: 1px solid rgba(0, 255, 255, 0.12);
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .hero {
    flex-direction: column;
    padding: 65px 6%;
    text-align: center;
    min-height: auto;
  }

  .hero-content {
    order: 2;
    text-align: center;
  }

  .hero-content p {
    margin: 0 auto 25px auto;
  }

  .hero-robot-wrapper {
    order: 1;
    margin-bottom: 30px;
    width: 100%;
  }

  .hero-robot {
    max-width: 210px;
  }

  .features,
  .contact,
  .stats-counter {
    padding: 60px 6%;
  }

  .uploader-shell {
    grid-template-columns: 1fr;
  }

  .uploader-info {
    order: -1;
  }

  .dashboard-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 25px 6%;
  }

  .dashboard-main {
    padding: 20px 6% 40px 6%;
  }

  .single-source-content {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .source-details {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .person-section {
    width: 90%;
    margin: 0 auto 2rem auto;
  }
}

@media (min-width: 768px) {
  .content-wrapper {
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
  }

  .person-section {
    width: 30%;
    margin-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  .main-header {
    padding: 12px 20px;
  }

  .main-content,
  .ultra-upload {
    padding: 40px 5%;
  }

  .dashboard-grid,
  .product-grid,
  .user-sources-grid,
  .features-grid,
  .team-neo-grid,
  .partners-neo-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card,
  .product-box,
  .user-source-box {
    width: 100%;
  }

  .auth-buttons {
    gap: 8px;
  }

  .btn-auth {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .dark-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .dark-search-button {
    width: 100%;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .single-source-content {
    padding: 15px;
  }

  .source-image {
    max-width: 100%;
  }

  footer {
    padding: 15px 20px;
    font-size: 0.85rem;
  }

  .about-box {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .pagination .step-links {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .pagination .current {
    margin: 4px 0;
    text-align: center;
    width: 100%;
  }

  .category-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-item {
    padding: 8px 10px;
  }

  .messages-container {
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* برای موبایل‌های ضعیف‌تر */
@media (max-width: 768px) {
  /* هر المانی که بک‌دراپ داره، روی موبایل غیرفعال بشه */
  * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}































/* استایل کامنت سورس ها */
.comments-section {
  margin-top: 48px;
  padding: 30px;
  background: linear-gradient(180deg, rgba(8, 14, 22, 0.92), rgba(6, 10, 16, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  position: relative;
  overflow: hidden;
}

.comments-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(0, 255, 255, 0.06), transparent 28%),
    radial-gradient(circle at bottom left, rgba(0, 183, 255, 0.05), transparent 30%);
  pointer-events: none;
}

.comments-section > * {
  position: relative;
  z-index: 1;
}

.comments-section h3 {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-section h3::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.22);
}

.reply-form-shell {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-strong));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.reply-form-shell:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-strong));
  transform: none;
}

.reply-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.reply-form-meta span strong {
  color: var(--primary);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-input);
  color: var(--text-main);
  padding: 14px 16px;
  font-size: 0.96rem;
  line-height: 1.9;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
}

.comment-form textarea::placeholder {
  color: var(--text-muted);
}

.comment-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.08), 0 0 16px rgba(0, 255, 255, 0.12);
  background: rgba(8, 20, 30, 0.95);
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.submit-reply-btn,
.reply-btn,
.cancel-reply {
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-family: inherit;
}

.submit-reply-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #03141a;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(0, 255, 255, 0.18);
}

.submit-reply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 255, 255, 0.28), 0 0 16px rgba(0, 255, 255, 0.2);
  filter: brightness(1.05);
}

.submit-reply-btn:active {
  transform: translateY(0);
}

.cancel-reply {
  background: rgba(255, 95, 109, 0.12);
  color: var(--danger);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 95, 109, 0.22);
}

.cancel-reply:hover {
  background: rgba(255, 95, 109, 0.18);
  box-shadow: 0 0 18px rgba(255, 95, 109, 0.12);
  transform: translateY(-1px);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-card {
  background: linear-gradient(180deg, rgba(11, 17, 24, 0.94), rgba(8, 13, 20, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}

.comment-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.05), transparent 65%);
  pointer-events: none;
}

.comment-card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.comment-header,
.reply-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-author,
.reply-header strong {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 800;
}

.comment-author::before,
.reply-header strong::before {
  content: "•";
  color: var(--primary);
  margin-left: 6px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.16);
}

.comment-body p,
.reply-body p {
  margin: 0;
  color: var(--text-soft);
  line-height: 2;
  font-size: 0.96rem;
  word-break: break-word;
}

.comment-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.reply-btn {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0, 255, 255, 0.08);
  color: var(--primary);
  border: 1px solid rgba(0, 255, 255, 0.18);
}

.reply-btn:hover {
  background: rgba(0, 255, 255, 0.14);
  border-color: rgba(0, 255, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.14);
  transform: translateY(-1px);
}

.reply-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #04151b;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.22);
}

.comment-replies {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reply-card {
  margin-right: 28px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 18, 28, 0.88), rgba(6, 14, 22, 0.92));
  border: 1px solid rgba(0, 255, 255, 0.1);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.reply-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: -18px;
  width: 14px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,255,255,0.45), transparent);
  opacity: 0.7;
}

.reply-card:hover {
  transform: none;
  border-color: rgba(0, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
}

.inline-reply-form {
  margin-top: 16px;
  animation: fadeSlideIn 0.28s ease;
}

.empty-comments {
  margin: 8px 0 0;
  text-align: center;
  color: var(--text-muted);
  padding: 28px 16px;
  border: 1px dashed rgba(0, 255, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

.comments-login-note {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.comments-login-note a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

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

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

@media (max-width: 768px) {
  .comments-section {
    padding: 20px 16px;
    margin-top: 36px;
  }

  .comments-section h3 {
    font-size: 1.25rem;
  }

  .comment-card,
  .reply-form-shell {
    padding: 16px;
  }

  .reply-card {
    margin-right: 12px;
    padding: 14px;
  }

  .reply-card::before {
    display: none;
  }

  .reply-form-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-actions,
  .comment-form-actions {
    justify-content: stretch;
  }

  .submit-reply-btn,
  .reply-btn,
  .cancel-reply {
    width: 100%;
    text-align: center;
  }
}



/* تیک آبی مدیر در کامنت سورس */
.comment-author,
.reply-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.verified-pro {
    /* حالت نمایشی مانند تلگرام */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    
    /* اندازه خودکار بر اساس فونت متن */
    width: 1.1em;
    height: 1.1em;
    font-size: inherit; /* از والد ارث‌بری می‌کند */
    
    /* تراز عمودی: کمی بالاتر از خط مبنا */
    vertical-align: middle;
    margin: 0 0.05em;
    transform: translateY(-0.24em); /* تنظیم دقیق ارتفاع */
    
    /* جلوه‌های بصری */
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s ease, filter 0.2s ease;
    
    /* اگر خواستی کلیک‌پذیر باشد */
    cursor: default;
}

/* استایل SVG داخل */
.verified-pro svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor; /* رنگ از والد ارث‌بری می‌شود */
}

/* جلوه‌ی hover (مثل تلگرام) 
.verified-pro:hover {
    transform: translateY(-0.08em) scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}*/

/* تنظیم رنگ با استفاده از کلاس والد */
.verified-blue {
    color: #3390ec; /* رنگ آبی تلگرام */
}

.verified-white {
    color: #ffffff; /* اگر روی پس‌زمینه تیره باشد */
}








/* برچسب آزمایشی */
.experimental-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    box-shadow:
        0 6px 18px rgba(37, 99, 235, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    white-space: nowrap;
    user-select: none;
    margin-bottom: 10px;
}



/* برچسب خودتان در کامنت */
.badge-own {
    font-size: 0.8em;
    color: #4caf50;
    font-weight: bold;
}













/* استایل های بخش اعلان ها */
.notify-wrapper {
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
}

.notify-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card); /* همان شیشه‌ای که داری */
    backdrop-filter: var(--blur);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden; /* برای افکت‌های آینده */
    transition: var(--transition);
}

/* اضافه کردن افکت درخشش هنگام هاور */
.notify-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-strong);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.notify-body {
    flex: 1;
    margin-left: 20px;
}

/* استایل نقل‌قول (خیلی تمیزتر و سایبرپانک) */
.quoted-text {
    color: var(--text-muted);
    border-right: 2px solid var(--primary); /* چون سایت فارسی است، سمت راست بهتر است */
    padding-right: 12px;
    margin: 8px 0;
    font-size: 0.85rem;
    font-style: italic;
    background: rgba(0, 255, 255, 0.03); /* یک سایه خیلی نرم پشت نقل‌قول */
    padding: 6px 12px;
    border-radius: 4px;
}

.sender-name {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.comment-text {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 6px;
}

/* دکمه مشاهده با ظاهر Neon */
.btn-view {
    flex-shrink: 0;
    background: rgba(0, 255, 255, 0.1); /* حالت محو اولیه */
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view:hover {
    background: var(--primary);
    color: var(--bg-main);
    box-shadow: var(--glow-strong); /* درخشش نئونی هنگام هاور */
}
.notify-title{
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    letter-spacing: 1px;
    text-shadow: 0 0 8px var(--primary);
}

















.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;  /* ← این فاصله از کناره‌ها رو تضمین میکنه */
    width: 100%;
    box-sizing: border-box;
}



/* ===== فرم ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* ===== گروه ورودی ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.form-group label {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    padding-right: 4px;
}

/* ===== ورودی ===== */
.input-wrapper {
    position: relative;
    width: 100%;
}



/* ===== ورودی‌های فرم (input و textarea) ===== */
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}


.input-wrapper input {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 16px;
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
    height: 52px;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: 15px;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.12);
}

/* ===== توضیحات زیر ورودی ===== */
.hint {
    color: var(--text-muted);
    font-size: 13px;
    padding-right: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.hint-icon {
    font-size: 15px;
}

/* ===== دکمه ===== */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    border: none;
    border-radius: var(--radius-sm);
    color: #0b1118;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ===== کارت فرم ===== */
.auth-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg), var(--glow);
    transition: var(--transition);
    margin: 20px auto;
    box-sizing: border-box;
}

.auth-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow-strong);
}

/* ===== هدر کارت ===== */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.auth-header h1 {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ===== ریسپانسیو موبایل ===== */
@media (max-width: 520px) {
    .auth-card {
        padding: 28px 18px;
        border-radius: var(--radius-md);
        margin: 12px 10px;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .auth-header p {
        font-size: 13px;
    }

    .input-wrapper input {
        padding: 14px 16px;
        font-size: 15px;
        height: 48px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
        height: 48px;
    }

    .form-group label {
        font-size: 13px;
    }

    .hint {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 20px 14px;
        margin: 8px 6px;
    }

    .auth-header .icon {
        font-size: 32px;
    }

    .auth-header h1 {
        font-size: 18px;
    }

    .input-wrapper input {
        padding: 12px 14px;
        font-size: 14px;
        height: 44px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 14px;
        height: 44px;
    }
}

/* ===== استایل شماره تلفن نمایش داده شده ===== */
.phone-display {
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
    margin-top: 8px;
    display: inline-block;
    background: rgba(0, 255, 255, 0.06);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ===== تایمر ===== */
.timer {
    color: var(--warning);
    font-weight: 600;
    font-size: 15px;
}























/* ===== کارت پروفایل کاربر ===== */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 30px;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-md), var(--glow);
    transition: var(--transition);
}

.profile-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow-strong);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.profile-info h2 {
    color: var(--text-main);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.profile-info .profile-email {
    color: var(--text-soft);
    font-size: 14px;
    margin: 4px 0 0;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.profile-status,
.profile-phone,
.profile-joined {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-soft);
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
}

.status-badge.verified {
    background: rgba(0, 255, 157, 0.12);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-badge.unverified {
    background: rgba(255, 95, 109, 0.12);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.verify-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

.verify-link:hover {
    background: var(--primary);
    color: #0b1118;
}

.phone-number {
    color: var(--text-main);
    font-weight: 600;
}

.joined-date {
    color: var(--text-main);
}

/* ===== ریسپانسیو ===== */
@media (max-width: 600px) {
    .profile-card {
        padding: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-status,
    .profile-phone,
    .profile-joined {
        justify-content: center;
    }
}
















.gift-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.gift-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.gift-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gift-form input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}






.source-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden;
    max-width: 100%;
}

.source-description * {
    color: var(--text-soft);
    max-width: 100%;
    box-sizing: border-box;
}










/* ===== نمایش لیست‌های ادیتور در source-description ===== */
.source-description ul,
.source-description ol {
    padding-right: 30px !important;  /* فاصله از راست برای نمایش علامت‌ها */
    padding-left: 0 !important;
    margin: 12px 0 16px 0 !important;
    list-style-position: outside !important;  /* علامت‌ها بیرون از متن */
}

.source-description ul {
    list-style-type: disc !important;  /* نقطه توپر */
}

.source-description ol {
    list-style-type: decimal !important;  /* اعداد */
}

.source-description li {
    margin-bottom: 6px;
    line-height: 1.9;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* زیرلیست‌ها */
.source-description ul ul {
    list-style-type: circle !important;
    margin-top: 4px;
}

.source-description ol ol {
    list-style-type: lower-alpha !important;
    margin-top: 4px;
}

.source-description ul ul ul {
    list-style-type: square !important;
}

.source-description ol ol ol {
    list-style-type: lower-roman !important;
}



.img-center {
    display: block;
    margin: 16px auto;
}
.img-right {
    display: block;
    margin: 16px 0 16px auto;
}
.img-left {
    display: block;
    margin: 16px auto 16px 0;
}


figure.image {
    max-width: 100%;
    margin: 16px 0;
    text-align: center;
}

figure.image img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

figcaption {
    display: block;
    margin-top: 10px;
    color: #7ea3b8;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    word-break: break-word;
}















/* 
   استایل سفارشی پایانوین - فقط کادر و اسکرول
   (رنگ‌های هایلایت رو Prism انجام میده)
*/
pre[class*="language-"] {
    background: rgba(9, 14, 22, 0.95) !important;
    border: 1px solid rgba(0, 255, 255, 0.16) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    padding-top: 48px !important;
    margin: 20px 0 !important;
    overflow-x: auto !important;
    direction: ltr !important;
    text-align: left !important;
    position: relative !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35) !important;
}

pre[class*="language-"] code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    background: none !important;
    padding: 0 !important;
    color: #eafaff !important;
    text-shadow: none !important;
}

/* اسکرول‌بار نئونی */
pre[class*="language-"]::-webkit-scrollbar { height: 8px; }
pre[class*="language-"]::-webkit-scrollbar-track { background: #071018; border-radius: 20px; }
pre[class*="language-"]::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #00ffff, #00b7ff); border-radius: 20px; }

/* کدهای inline */
code:not([class*="language-"]):not(pre code) {
    background: rgba(0, 255, 255, 0.08);
    color: #00ffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid rgba(0, 255, 255, 0.16);
}




/* ========== BLOG GRID ========== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px var(--container-padding);
}

/* ========== BLOG CARD ========== */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow);
}

/* تصویر کارت */
.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.25);
    transition: var(--transition);
}

.blog-card:hover .blog-img {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.45);
}

/* بدنه کارت */
.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.blog-card h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.blog-card p {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
    flex: 1;
}

/* متای پست */
.blog-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* دکمه */
.blog-btn {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--primary);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    width: fit-content;
}

.blog-btn:hover {
    background: var(--primary);
    color: #041015;
    border-color: var(--primary);
    box-shadow: var(--glow-strong);
    transform: translateY(-2px);
}

.title-blog {
  color: var(--primary); 
  text-align: center; 
  margin-bottom: 30px;
}











.blog-detail {
    max-width: 90%;
    margin: 40px auto;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.blog-detail h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 15px;
}

.blog-detail-img {
    width: 50%;
    max-height: 1000px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 20px 0;
    margin: 24px auto;
    border: 1px solid var(--border);
    display: block;  
}

.blog-content {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 2;
}


/*جدول =========================== */

/* ===== فقط برای جدول‌های داخل محتوای بلاگ ===== */
.blog-content table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-collapse: collapse;
    margin: 20px 0;
}

.blog-content td,
.blog-content th {
    padding: 8px 14px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}


.blog-content td:first-child,
.blog-content th:first-child {
    padding-right: 16px;
}

.blog-content td:last-child,
.blog-content th:last-child {
    padding-left: 16px;
}

.blog-content table tbody tr:last-child td {
    padding-top: 0px;
}

/* ===== نوار اسکرول ===== */
.blog-content table::-webkit-scrollbar {
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

.blog-content table::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.25);
    border-radius: 4px;
}

.blog-content table::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.45);
}

/* ===== فایرفاکس ===== */
.blog-content table {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 255, 0.25) rgba(0, 0, 0, 0.06);
}

/* جدول ================================= */

.blog-detail ul,
.blog-detail ol {
    padding-right: 2rem;   /* فاصله از لبه‌ی چپ کادر */
    margin: 1.5em 0;      /* فاصله از بالا و پایین نسبت به سایر المان‌ها */
}

.blog-detail li {
    margin-bottom: 0.5em; /* فاصله بین آیتم‌های لیست */
}




/* ===== کد بلاک ===== */
.code-block-wrapper {
    position: relative;
    background: rgba(9, 14, 22, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.16);
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    margin: 20px 0;
    /* حواست باشه: این div فقط نقش کادر رو داره. اسکرول نداره. */
}

.code-block-wrapper pre {
    margin: 0 !important;
    padding: 24px !important;
    padding-top: 48px !important; /* همون فضا برای دکمه */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    /* فقط اسکرول افقی */
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* دکمه کپی (تمیز و شیک) */
.code-block-wrapper .custom-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.35);
    color: #00ffff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.28s ease;
}

.code-block-wrapper .custom-copy-btn:hover {
    background: rgba(0, 255, 255, 0.16);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.25);
}

/* ===== حذف استایل‌های قبلی pre برای جلوگیری از تداخل ===== */
pre[class*="language-"] {
    /* همه رو پاک کن */
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* دکمه کپی (موبایل و دسکتاپ) */
.code-block-wrapper .custom-copy-btn {
    position: absolute;
    top: 2px;
    right: 3px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.35);
    color: #00ffff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.28s ease;
    min-height: 40px;    /* برای لمس بهتر در موبایل */
    min-width: 80px;
    touch-action: manipulation;
}

/* هاور برای دسکتاپ */
@media (hover: hover) {
    .code-block-wrapper .custom-copy-btn:hover {
        background: rgba(0, 255, 255, 0.16);
        box-shadow: 0 0 18px rgba(0, 255, 255, 0.25);
        transform: scale(1.03);
    }
}

/* حالت اکتیو (کلیک/لمس) */
.code-block-wrapper .custom-copy-btn:active {
    transform: scale(0.95);
    background: rgba(0, 255, 255, 0.25);
}








.callout-info {
    background: rgba(0, 255, 255, 0.08);
    border-right: 4px solid #00ffff;
    padding: 16px;
    margin: 20px 0;
    border-radius: 8px;
}

.callout-warning {
    background: rgba(255, 196, 0, 0.1);
    padding: 16px;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #ffc857;
}

.loading-indicator{
  display:none;
  text-align:center;
  padding:20px;color:
  #7ea3b8;
}











/* ===== بخش قبول قوانین ===== */
.terms-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 20px 0;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm, 10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition, all 0.28s ease);
}

.terms-group:hover {
    background: var(--bg-hover, rgba(0, 255, 255, 0.08));
    border-color: var(--border, rgba(0, 255, 255, 0.16));
}

/* ===== چک‌باکس ===== */
.terms-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--primary, #00ffff);
    cursor: pointer;
    background: var(--bg-input, rgba(8, 18, 28, 0.82));
    border: 2px solid var(--border, rgba(0, 255, 255, 0.2));
    border-radius: 6px;
    transition: var(--transition, all 0.28s ease);
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.terms-group input[type="checkbox"]:checked {
    background: var(--primary, #00ffff);
    border-color: var(--primary, #00ffff);
}

.terms-group input[type="checkbox"]:checked::after {
    content: "✓";
    color: #041015;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.terms-group input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--border-strong, rgba(0, 255, 255, 0.35));
}

/* ===== لیبل (متن کنار چک‌باکس) ===== */
.terms-group label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-soft, #b9dff1);
    user-select: none;
    line-height: 1.6;
    transition: var(--transition, all 0.28s ease);
}

/* ===== لینک قوانین (بهبودیافته) ===== */
.terms-group label a {
    color: var(--primary, #00ffff);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: var(--transition, all 0.28s ease);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

/* ===== افکت هاور لینک ===== */
.terms-group label a:hover {
    color: var(--primary-2, #00cfff);
    text-shadow: var(--glow, 0 0 18px rgba(0, 255, 255, 0.25));
    border-bottom-color: var(--primary, #00ffff);
}

/* ===== افکت فوکوس (وقتی با Tab به لینک می‌روید) ===== */
.terms-group label a:focus-visible {
    outline: 2px solid var(--primary, #00ffff);
    outline-offset: 4px;
    border-radius: 4px;
}





/* دکمه انصراف صفحه تغییر رمزعبور */
.btn-secondary {
    padding: 12px 24px;
    border: 1px solid var(--border);
    color: var(--text-soft, #b9dff1);
    background: transparent;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    text-align: center;
    flex: 1;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
}















/* ===== تصویر پروفایل ===== */
.avatar-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.avatar-container {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border, rgba(0, 255, 255, 0.16));
    box-shadow: var(--shadow-sm), var(--glow);
    flex-shrink: 0;
    transition: all 0.3s ease;  /* ← برای نرمی حرکت */
    cursor: pointer;    
}

/* ===== هاور ===== */
.avatar-preview:hover {
    border-color: var(--primary, #00ffff);          /* حاشیه نئونی */
    box-shadow: var(--shadow-md), var(--glow-strong); /* درخشش بیشتر */
    transform: scale(1.05);                         /* ۵٪ بزرگ‌تر */
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-form {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.avatar-form .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.avatar-form .form-group input[type="file"] {
    padding: 10px 12px;
    background: var(--bg-input, rgba(8, 18, 28, 0.82));
    border: 1px solid var(--border, rgba(0, 255, 255, 0.16));
    border-radius: var(--radius-sm, 10px);
    color: var(--text-main, #eafaff);
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
}

.avatar-form .form-group input[type="file"]::file-selector-button {
    background: var(--primary, #00ffff);
    color: #041015;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-form .form-group input[type="file"]::file-selector-button:hover {
    background: var(--primary-2, #00cfff);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
    .avatar-container {
        flex-direction: column;
        align-items: center;
    }

    .avatar-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .avatar-form .form-group {
        min-width: unset;
    }

    .avatar-form .btn-small {
        width: 100%;
    }
}










/* ===== آواتار کاربر در کامنت ===== */
.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border, rgba(0, 255, 255, 0.2));
    transition: var(--transition, all 0.28s ease);
    cursor: pointer;  /* برای بزرگنمایی با کلیک */
    position: relative;
}

.comment-avatar:hover {
    border-color: var(--primary, #00ffff);
    box-shadow: 0 0 16px rgba(0, 255, 255, 0.2);
    transform: scale(1.05);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== آواتار کوچک (برای پاسخ‌ها) ===== */
.comment-avatar.small {
    width: 32px;
    height: 32px;
    border-width: 1.5px;
}

.comment-avatar.userlist {
    width: 52px;
    height: 52px;
    border-width: 2px;
}

/* ===== آواتار بزرگ (برای نمایش در مودال) ===== */
.avatar-modal-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary, #00ffff);
    box-shadow: var(--glow-strong);
}



/* ===== مودال بزرگنمایی تصویر ===== */
.avatar-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease;
}

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

.avatar-modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 50%;
    border: 4px solid var(--primary, #00ffff);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    object-fit: cover;
    width: 300px;
    height: 300px;
}

.avatar-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.avatar-modal-close:hover {
    color: var(--primary, #00ffff);
    transform: rotate(90deg);
}

.avatar-modal-caption {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
    .avatar-modal-content {
        width: 200px;
        height: 200px;
    }
    
    .avatar-modal-close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}





/* ===== مودال بزرگنمایی تصویر (نسخه کامل) ===== */
.avatar-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease;
}

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

/* ===== تصویر داخل مودال (کامل، بدون گردی) ===== */
.avatar-modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 12px;  /* ← گردی ملایم (اختیاری) */
    border: 3px solid var(--primary, #00ffff);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    object-fit: contain;   /* ← نسبت تصویر حفظ می‌شود */
    background: #0b1118;   /* ← پس‌زمینه تیره برای تصاویر با نسبت متفاوت */
    padding: 4px;
}

/* ===== دکمه بستن ===== */
.avatar-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.avatar-modal-close:hover {
    color: var(--primary, #00ffff);
    transform: rotate(90deg);
}

/* ===== کپشن پایین تصویر ===== */
.avatar-modal-caption {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ===== انیمیشن ===== */
@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
    .avatar-modal-content {
        max-width: 95%;
        max-height: 70%;
        border-radius: 8px;
    }
    
    .avatar-modal-close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}





/* ===== هدر کامنت با آواتار ===== */
.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author {
    color: var(--text-main, #eafaff);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-time {
    color: var(--text-muted, #7ea3b8);
    font-size: 0.7rem;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 600px) {
    .comment-avatar {
        width: 34px;
        height: 34px;
    }
    
    .comment-avatar.small {
        width: 26px;
        height: 26px;
    }
}





/* ===== آواتار کامنت اصلی ===== */
.cmt-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #00ffff), var(--primary-3, #00b7ff));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 2px solid var(--border, rgba(0, 255, 255, 0.15));
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
    transition: var(--transition, all 0.28s ease);
    color: #041015;
    user-select: none;
}


/* ===== آواتار پاسخ (کوچک‌تر) ===== */
.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-2, #00cfff), var(--primary-3, #00b7ff));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    border: 1.5px solid var(--border, rgba(0, 255, 255, 0.12));
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.1);
    color: #041015;
    user-select: none;
}








/* ===== بخش بیوگرافی ===== */
.bio-section {
    margin: 24px 0 16px 0;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: var(--transition);
}

.bio-section:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md), var(--glow);
}

.bio-title {
    text-align: center;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
}

.bio-text {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
    padding: 0 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}















/* ==============================================
   لیست بهترین کاربران (Top Users)
   ============================================== */

.top-users-section {
    padding: 60px var(--container-padding);
    text-align: center;
}

.top-users-section .section-title {
    color: var(--primary);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    margin-bottom: 8px;
}

.top-users-section .section-sub {
    color: var(--text-soft);
    font-size: 1.05rem;
    margin-bottom: 40px;
    opacity: 0.85;
}

/* شبکه کارت‌ها */
.top-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* کارت هر کاربر */
.top-user-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 18px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 48px;
}

.top-user-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow);
}

/* رتبه (شماره) */
.top-rank {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}


/* نام کاربر (لینک به پروفایل) */
.top-user-card .user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.top-user-card .user-name:hover {
    color: var(--primary);
    text-shadow: 0 0 16px rgba(0, 255, 255, 0.3);
}


/* امتیاز یا هر اطلاعات اضافی */
.top-user-card .user-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.top-user-card .user-stats span {
    background: rgba(255,255,255,0.04);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255,255,255,0.05);
}


/* دکمه‌ی مشاهده پروفایل */
.btn-profile {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-profile:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--glow);
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
    .top-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .top-user-card {
        padding: 20px 12px 16px;
        padding-top: 32px;
    }

    .top-user-card .user-name {
        font-size: 0.95rem;
    }

    .top-rank {
        font-size: 1.4rem;
        top: 8px;
        right: 10px;
    }
}

@media (max-width: 400px) {
    .top-users-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}


/* درست قرار گرفتن منتشر کننده و دکمه خرید در صفحه جزئیات سورس */
/* ===== کانتینر اصلی ===== */
.action-wrapper {
    display: flex;
    flex-direction: column;    /* ستونی: اسپن‌ها بالا، دکمه پایین */
    align-items: center;       /* همه‌چیز را افقی وسط‌چین می‌کند */
    justify-content: center;   /* در صورت نیاز عمودی وسط (اختیاری) */
    gap: 12px;                /* فاصله‌ی بین ردیف اسپن‌ها و دکمه */
    width: 100%;              /* کل عرض را بگیرد */
}

/* ===== ردیف بالایی (دو اسپن کنار هم) ===== */
.top-row {
    display: flex;
    align-items: center;
    gap: 16px;               /* فاصله‌ی بین دو اسپن */
}

/* ===== اسپن اول ===== */
.label {
    color: #b9dff1;
    font-size: 1rem;
}

/* ===== اسپن دوم ===== */
.value {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ===== دکمه ===== */
.btn-primary {
    padding: 10px 28px;
    background: #00ffff;
    color: #041015;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* ===== واکنش‌گرایی برای موبایل ===== */
@media (max-width: 600px) {
    .action-wrapper {
        gap: 10px;
    }

    .top-row {
        gap: 10px;
    }

    .label {
        font-size: 0.85rem;
    }

    .value {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

/* ===== صفحه‌های خیلی کوچک (اختیاری) ===== */
@media (max-width: 400px) {
    .top-row {
        flex-direction: column; /* در صورت نیاز اسپن‌ها زیر هم */
        gap: 4px;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }
}






/* ===== اسم + تیک آبی (حل مشکل سرریز) ===== */
.name-with-badge {
    display: inline-flex;          /* چیدمان در یک خط */
    align-items: center;          /* وسط‌چین عمودی */
    max-width: 100%;              /* حداکثر عرض برابر با والد */
    gap: 4px;                     /* فاصله بین اسم و تیک */
    vertical-align: middle;       /* تراز با بقیه متن */
}

/* قسمت اسم */
.name-with-badge .name-text {
    overflow: hidden;             /* مخفی کردن سرریز */
    white-space: nowrap;          /* جلوگیری از شکستن خط */
    text-overflow: ellipsis;      /* نمایش ... برای سرریز */
    min-width: 0;                 /* حیاتی برای اینکه flex به درستی کوچک شود */
    max-width: 180px;             /* حداکثر عرض اسم (می‌توانی تغییر دهی) */
}








































/* ========================================== */
/* docs.css - استایل‌های بخش مستندات (نسخه‌ی ساده و یکپارچه) */
/* ========================================== */

/* ===== ۱. هدر مستندات ===== */
.docs-header {
    text-align: center;
    padding: 60px clamp(20px, 4vw, 80px) 30px;
}

.docs-header h1 {
    color: var(--primary);
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    margin-bottom: 12px;
}

.docs-header p {
    color: var(--text-soft);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.85;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    padding: 40px clamp(20px, 4vw, 80px) 60px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
    justify-items: center;  /* کارت‌ها را در ستون خود وسط می‌کند */
}

.library-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 380px;  /* ← اندازه‌ی ایده‌آل برای کارت‌ها */
}

.library-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.04), transparent 70%);
    pointer-events: none;
    transition: var(--transition);
}

.library-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), var(--glow);
}

.library-card:hover::before {
    top: -30%;
    right: -30%;
}

/* آیکون کتابخانه - نسخه فشرده و خوانا */
.library-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 16px;
    transition: 0.3s ease;
}

.library-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.library-card:hover .library-icon {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    transform: scale(1.02);
}

.library-card h3 {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.library-card .library-desc {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 16px;
    opacity: 0.85;
}

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

.library-card .library-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== ۴. دکمه‌ها ===== */
.btn-docs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: #031015;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 255, 255, 0.2);
}

.btn-docs:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-strong);
}

.btn-docs-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-docs-outline:hover {
    background: rgba(0, 255, 255, 0.08);
    box-shadow: var(--glow);
}

/* ===== ۵. صفحه جزئیات کتابخانه ===== */
.library-detail-page {
    padding: 40px clamp(20px, 4vw, 80px) 60px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.library-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.library-detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.library-detail-info {
    flex: 1;
}

.library-detail-info h1 {
    color: var(--text-main);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 6px;
}

.library-detail-info .subtitle {
    color: var(--text-soft);
    font-size: 1rem;
    opacity: 0.8;
}

.library-detail-info .official-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    transition: var(--transition);
}

.library-detail-info .official-link:hover {
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ===== ۶. باکس توضیحات ===== */
.library-description-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
}

.library-description-box h2 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-description-box p {
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 1rem;
    margin: 0;
}

/* ===== ۷. لیست مستندات ===== */
.docs-list-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

.docs-list-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.docs-list-section .section-header h2 {
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 600;
}

.docs-list-section .section-header .count {
    color: var(--text-muted);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
}

/* ===== ۸. هر آیتم مستند ===== */
.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    border-radius: 8px;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-item:last-child {
    border-bottom: none;
}

.doc-item:hover {
    background: rgba(0, 255, 255, 0.04);
}

.doc-item .doc-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.doc-item .doc-icon {
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0.6;
}

.doc-item .doc-title {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-item .doc-title:hover {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.doc-item .doc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.doc-item .doc-meta .tag {
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 0.7rem;
}

.doc-item .btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.06);
    color: var(--primary);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.doc-item .btn-sm:hover {
    background: rgba(0, 255, 255, 0.14);
    border-color: var(--border-strong);
}

/* ===== ۹. صفحه نمایش مستند ===== */
.doc-detail-page {
    padding: 40px clamp(20px, 4vw, 80px) 60px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.doc-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.doc-detail-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.doc-detail-header .breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.doc-detail-header .breadcrumb a:hover {
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

.doc-detail-header .library-badge {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--text-soft);
}

/* ===== ۱۰. محتوای اصلی مستند ===== */
.doc-content-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px clamp(24px, 4vw, 56px);
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
}

.doc-content-box .doc-title {
    color: var(--text-main);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.doc-content-box .doc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.doc-content-box .doc-meta .tag {
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 0.75rem;
}

.doc-content-box .doc-body {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 2;
}

.doc-content-box .doc-body h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
}

.doc-content-box .doc-body h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-top: 24px;
    margin-bottom: 12px;
}

.doc-content-box .doc-body p {
    margin-bottom: 16px;
}

.doc-content-box .doc-body ul,
.doc-content-box .doc-body ol {
    margin: 12px 0 20px 24px;
    padding-right: 20px;
}

.doc-content-box .doc-body ul li,
.doc-content-box .doc-body ol li {
    margin-bottom: 8px;
}

.doc-content-box .doc-body code {
    background: rgba(0, 255, 255, 0.06);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(0, 255, 255, 0.12);
}

.doc-content-box .doc-body pre {
    background: rgba(9, 14, 22, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 20px 0;
    direction: ltr;
    text-align: left;
}

.doc-content-box .doc-body pre code {
    background: none;
    border: none;
    color: #eafaff;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== ۱۱. ناوبری ===== */
.doc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.doc-navigation .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    max-width: 45%;
}

.doc-navigation .nav-btn:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: var(--border-strong);
    color: var(--primary);
    transform: translateX(var(--hover-x, 0));
}

.doc-navigation .nav-btn.prev:hover {
    --hover-x: -3px;
}

.doc-navigation .nav-btn.next:hover {
    --hover-x: 3px;
}

.doc-navigation .nav-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.doc-navigation .nav-btn .nav-label {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
}

.doc-navigation .nav-btn .nav-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}


.pull-left {
    margin-right: auto;
}



/* دکمه بازگشت */
.back-to-library {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.back-to-library:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: var(--border-strong);
    color: var(--primary);
}

/* ===== ۱۲. واکنش‌گرایی ===== */
@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
        padding: 20px clamp(16px, 3vw, 40px) 40px;
    }

    .library-detail-header,
    .library-description-box,
    .docs-list-section {
        padding: 22px 18px;
    }

    .library-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .doc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 0;
    }

    .doc-item .doc-meta {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .doc-item .doc-info {
        width: 100%;
    }

    .doc-detail-page {
        padding: 20px clamp(16px, 3vw, 40px) 40px;
    }

    .doc-content-box {
        padding: 24px 18px;
    }

    .doc-content-box .doc-title {
        font-size: 1.4rem;
    }

    .doc-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .doc-navigation .nav-btn {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .doc-navigation .nav-btn .nav-title {
        max-width: 140px;
    }

    .doc-detail-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .doc-detail-header .library-badge {
        margin-right: 0;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .library-grid {
        grid-template-columns: 1fr;
    }

    .library-card {
        padding: 20px 16px;
    }

    .library-detail-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .doc-item .doc-title {
        font-size: 0.85rem;
        white-space: normal;
    }

    .doc-content-box {
        padding: 18px 14px;
    }

    .doc-content-box .doc-title {
        font-size: 1.2rem;
    }

    .doc-content-box .doc-body {
        font-size: 0.95rem;
    }

    .doc-content-box .doc-body pre {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    .doc-navigation .nav-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .doc-navigation .nav-btn .nav-title {
        max-width: 100px;
    }
}


/* ===== اضافه کن به style.css (در بخش docs) ===== */

/* دکمه‌های کارت کتابخانه */
.library-card .btn-docs {
    margin-top: auto;       /* دکمه را به پایین کارت می‌چسباند */
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: 16px;       /* فاصله از محتوای بالا */
}






















/* ========================================== */

/* ===== استایل منوی انتخاب نسخه ===== */
.version-switcher {
    position: relative;
    display: inline-block;
    min-width: 130px;
    font-family: inherit;
    margin: 12px 0 30px 0;  
}

/* دکمه نمایش نسخه فعلی */
.version-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    width: 100%;
    min-width: 130px;
}

.version-btn:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
    box-shadow: var(--glow);
}

.version-btn .arrow {
    font-size: 0.6rem;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.version-btn .arrow.open {
    transform: rotate(180deg);
}

/* ===== منوی کشویی ===== */
.version-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 100%;
    background: var(--bg-card-strong);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 0;
    box-shadow: var(--shadow-lg), var(--glow);
    z-index: 100;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.version-dropdown.open {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* آیتم‌های نسخه */
.version-item {
    display: block;
    padding: 8px 16px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    border-right: 2px solid transparent;
}

.version-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-right-color: var(--primary);
}

.version-item.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(0, 255, 255, 0.04);
    border-right-color: var(--primary);
}

.version-item .badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid var(--border);
    margin-right: 6px;
    color: var(--text-muted);
}

.version-item.active .badge {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== اسکرول‌بار منو ===== */
.version-dropdown::-webkit-scrollbar {
    width: 4px;
}
.version-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.version-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 20px;
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 600px) {
    .version-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        min-width: 110px;
    }
    .version-item {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

























/* ===== استایل حالت خالی (وسط‌چین کامل) ===== */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20vh;
    text-align: center;
    margin: 0 auto;   /* ← وسط‌چین افقی */
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 500px;
}