/* KurdiaAI - Main Stylesheet */
@font-face {
  font-family: 'Rabar037';
  src: url('../fonts/Rabar_037.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #ffc73d;
  --primary-dark: #e6b000;
  --primary-light: #ffd96a;
  --bg-dark: #0d0d0d;
  --bg-card: #161616;
  --bg-card2: #1e1e1e;
  --bg-nav: rgba(13,13,13,0.95);
  --text-main: #f0f0f0;
  --text-muted: #888;
  --text-dim: #555;
  --border: #2a2a2a;
  --border-light: #333;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(255,199,61,0.15);
  --transition: all 0.3s ease;
}

[data-theme="light"] {
  --primary: #b87400;
  --primary-dark: #9a6000;
  --primary-light: #d48c00;
  --bg-dark: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card2: #f0f2f5;
  --bg-nav: rgba(255,255,255,0.97);
  --text-main: #0f0f0f;
  --text-muted: #404040;
  --text-dim: #707070;
  --border: #dde1e7;
  --border-light: #e8eaed;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 30px rgba(184,116,0,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Rabar037', 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  direction: rtl;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }
ul { list-style: none; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  transition: var(--transition);
}

.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.3); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-brand .brand-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #000;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu a {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
}

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

.nav-menu a:hover, .nav-menu a.active {
  color: var(--primary);
}

.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* سۆشیال میدیا ئایکۆنەکانی هیدەر */
.nav-social {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
  margin-left: 2px;
}
.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card2);
  color: var(--text-dim);
  font-size: 0.82rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}
.nav-social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255,199,61,0.08);
  transform: translateY(-2px);
}
.nav-social-link .fa-youtube:hover,
.nav-social-link:hover .fa-youtube { color: #ff0000; border-color: #ff0000; }
.nav-social-link:hover .fa-facebook-f { color: #1877f2; border-color: #1877f2; }
.nav-social-link:hover .fa-instagram { color: #e1306c; border-color: #e1306c; }
@media (max-width: 768px) {
  .nav-social { display: none; }
}

.theme-toggle {
  width: 52px; height: 28px;
  background: var(--border-light);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  flex-shrink: 0;
}

/* حلقەی مووبەڵ */
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px; right: 4px;
  width: 20px; height: 20px;
  background: var(--primary);
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 1;
}

/* ── Light mode: hero ── */
[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse at 60% 40%, rgba(184,116,0,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(184,116,0,0.04) 0%, transparent 50%);
}
[data-theme="light"] .hero-stars { display: none; }
[data-theme="light"] .hero h1 { color: #0f0f0f; }
[data-theme="light"] .hero h1 span { color: var(--primary); }

/* ── Light mode: hero-badge ── */
[data-theme="light"] .hero-badge {
  background: rgba(184,116,0,0.10);
  border-color: rgba(184,116,0,0.25);
  color: #7a4d00;
}

/* ── Light mode: hero circle ── */
[data-theme="light"] .hero-circle {
  border-color: rgba(184,116,0,0.25);
  background: rgba(184,116,0,0.05);
}
[data-theme="light"] .hero-circle::before,
[data-theme="light"] .hero-circle::after {
  border-color: rgba(184,116,0,0.15);
}

/* ── Light mode: section-tag ── */
[data-theme="light"] .section-tag {
  background: rgba(184,116,0,0.10);
  color: #7a4d00;
}

/* ── Light mode: cards ── */
[data-theme="light"] .card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
[data-theme="light"] .card:hover {
  border-color: rgba(184,116,0,0.35);
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
[data-theme="light"] .card-category { color: var(--primary); }

/* ── Light mode: stats ── */
[data-theme="light"] .stat-item .num { color: var(--primary); }

/* ── Light mode: news ticker ── */
[data-theme="light"] .news-ticker {
  background: #ffffff;
  border-color: #dde1e7;
}
[data-theme="light"] .ticker-label {
  background: var(--primary);
  color: #ffffff;
}
[data-theme="light"] .ticker-item { color: #333333; }

/* ── Light mode: navbar brand ── */
[data-theme="light"] .nav-brand { color: var(--primary); }

/* ── Light mode: footer ── */
[data-theme="light"] footer {
  background: #f0f2f5;
  border-top: 1px solid #dde1e7;
}

[data-theme="light"] .theme-toggle::after {
  transform: translateX(-24px);
}

/* ئایکۆنەکان */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  font-size: 0.72rem;
  line-height: 1;
  position: relative;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* dark mode: مانگ کار دەکات */
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0.3; }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; color: var(--primary); }

/* light mode: ڕۆژ کار دەکات */
[data-theme="light"] .theme-toggle .icon-sun  { opacity: 1; color: #f59e0b; }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0.3; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,199,61,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #000;
}

.btn-ghost {
  background: var(--bg-card2);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ HERO ============ */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  position: relative;
  padding: 60px 5% 70px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(255,199,61,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,199,61,0.10) 0%, transparent 50%);
}

.hero-stars {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20% 30%, rgba(255,199,61,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 70%, rgba(255,199,61,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,199,61,0.3) 0%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,199,61,0.1);
  border: 1px solid rgba(255,199,61,0.3);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text-main);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .hero h1 { font-size: clamp(0.88rem, 3.8vw, 1.4rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 22px)); }
}

@keyframes float-mobile {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-circle {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(255,199,61,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: rotate 20s linear infinite;
  box-shadow: 0 0 40px rgba(255,199,61,0.12), inset 0 0 24px rgba(255,199,61,0.04);
}

.hero-circle::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px dashed rgba(255,199,61,0.3);
}

.hero-circle::after {
  content: '';
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  border: 1px solid rgba(255,199,61,0.1);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.04); }
}

.hero-icon-main {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #ffc73d, #d4a000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #000;
  animation: rotate-reverse 20s linear infinite, icon-breathe 4s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(255,199,61,0.15), 0 0 34px rgba(255,199,61,0.55), 0 0 60px rgba(255,199,61,0.25);
}

@keyframes icon-breathe {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-360deg) scale(1.08); }
}

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

/* ============ SECTIONS ============ */
.section { padding: 80px 5%; }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(255,199,61,0.1);
  color: var(--primary);
  border: 1px solid rgba(255,199,61,0.25);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 14px;
}

.section-header h2 span { color: var(--primary); }

#shop .section-header h2 {
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  white-space: nowrap;
}

.section-header p {
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100%; height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: right;
}

.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(255,199,61,0.1);
  border: 1px solid rgba(255,199,61,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: rgba(255,199,61,0.2);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

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

/* ============ GRID CARDS ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { transform: translateY(-4px); border-color: rgba(255,199,61,0.3); box-shadow: var(--shadow); }

.card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
  overflow: hidden;
}

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

.card-body { padding: 20px; }

.card-category {
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(255,199,61,0.1);
  padding: 3px 10px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 10px;
}

.card-body h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.card-body p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }

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

/* ============ PROMPT CARDS ============ */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  cursor: pointer;
}

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

.prompt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.prompt-header h3 { font-size: 0.98rem; line-height: 1.5; }

.prompt-tool {
  flex-shrink: 0;
  font-size: 0.72rem;
  background: rgba(255,199,61,0.1);
  color: var(--primary);
  border: 1px solid rgba(255,199,61,0.2);
  padding: 3px 10px;
  border-radius: 50px;
}

.prompt-content {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  line-height: 1.6;
  position: relative;
  max-height: 80px;
  overflow: hidden;
}

.prompt-content::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--bg-card2));
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  transition: var(--transition);
}

.copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.copy-btn.copied { border-color: #4caf50; color: #4caf50; }

/* ============ VIDEO CARDS ============ */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.video-card:hover { transform: translateY(-4px); border-color: rgba(255,199,61,0.3); }

.video-thumb {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
}

.video-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info { padding: 16px; }
.video-info h3 { font-size: 0.95rem; margin-bottom: 6px; }
.video-info p { font-size: 0.82rem; color: var(--text-muted); }

/* ============ STATS ============ */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat-item { text-align: center; }

.stat-item .num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-item .label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ============ ABOUT ============ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 { font-size: 2rem; margin-bottom: 18px; }
.about-text h2 span { color: var(--primary); }
.about-text p { color: var(--text-muted); margin-bottom: 14px; }

.about-features { margin-top: 28px; }
.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.about-feature .dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
}

/* ============ CTA ============ */
.cta-section {
  text-align: center;
  padding: 80px 5%;
  background: linear-gradient(135deg, rgba(255,199,61,0.06), rgba(255,199,61,0.02));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 { font-size: 2rem; margin-bottom: 14px; }
.cta-section p { color: var(--text-muted); margin-bottom: 32px; max-width: 500px; margin-inline: auto; }

/* ============ FOOTER ============ */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 5% 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.7; }

.social-links { display: flex; gap: 10px; }
.social-link {
  width: 38px; height: 38px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}
.social-link:hover { border-color: var(--primary); color: var(--primary); }

.footer-col h4 { font-size: 0.95rem; margin-bottom: 18px; color: var(--primary); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.87rem; color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ============ AUTH ============ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 5% 40px;
  background: radial-gradient(ellipse at center, rgba(255,199,61,0.05) 0%, transparent 60%);
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  width: 100%;
  max-width: 440px;
}

.auth-box h1 { font-size: 1.6rem; margin-bottom: 6px; text-align: center; }
.auth-box .subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; font-size: 0.88rem; color: var(--text-muted); }

.form-control {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  direction: rtl;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,199,61,0.1);
}

.form-control::placeholder { color: var(--text-dim); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.form-check input { accent-color: var(--primary); cursor: pointer; }
.form-check label { font-size: 0.88rem; color: var(--text-muted); cursor: pointer; }

.auth-link { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-muted); }
.auth-link a { color: var(--primary); }

/* ============ ALERTS ============ */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-danger { background: rgba(244,67,54,0.1); border: 1px solid rgba(244,67,54,0.3); color: #f44336; }
.alert-success { background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.3); color: #4caf50; }
.alert-warning { background: rgba(255,199,61,0.1); border: 1px solid rgba(255,199,61,0.3); color: var(--primary); }

/* ============ PAGE HEADER ============ */
.page-header {
  padding: 120px 5% 60px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(255,199,61,0.07) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
}

.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-header h1 span { color: var(--primary); }
.page-header p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* ============ SEARCH BAR ============ */
.search-bar {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto 50px;
}

.search-bar input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  direction: rtl;
}

.search-bar input:focus { outline: none; border-color: var(--primary); }

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.87rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.page-link {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
}

.page-link:hover, .page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

/* ============ NEWS SINGLE ============ */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 5% 60px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 30px;
}
.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body { line-height: 1.9; font-size: 1rem; }
.article-body p { margin-bottom: 16px; }
.article-body h2, .article-body h3 { margin: 24px 0 12px; color: var(--primary); }

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

.user-avatar {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.user-avatar:hover { opacity: 0.85; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 170px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.user-dropdown.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.user-dropdown a:hover { background: var(--bg-card2); color: var(--primary); }

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 900;
  box-shadow: 0 4px 14px rgba(255,199,61,0.4);
  transition: var(--transition);
}

#back-to-top:hover { transform: translateY(-3px); }
#back-to-top.show { display: flex; }

/* ============ LOADING ============ */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s;
}

.loader-spinner {
  width: 50px; height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.88rem;
  z-index: 1100;
  transform: translateX(120%);
  transition: transform 0.3s;
  max-width: 300px;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(0); }

/* ============ NEWS AUTHOR / READING TIME ============ */
.news-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.news-author i { color: var(--primary); }

/* ============ SHARE BAR ============ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 28px;
}
.share-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  color: #fff;
}
.share-btn:hover { transform: scale(1.12); opacity: 0.9; }
.share-fb { background: #1877f2; }
.share-x  { background: #000; }
.share-wa { background: #25d366; }
.share-tg { background: #229ed9; }
.share-copy { background: var(--bg-card); border: 1px solid var(--border); color: var(--primary); }
.share-copy:hover { background: var(--primary); color: #000; }

/* ============ AUTHOR BOX ============ */
.author-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
}
.author-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffc73d, #d4a000);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #000;
  flex-shrink: 0;
}
.author-avatar-img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}

/* ============ NEWS TICKER ============ */
.news-ticker {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 999;
  width: 100%;
}
.ticker-label {
  background: var(--primary);
  color: #000;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 1;
}
.ticker-track {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}
.ticker-inner {
  display: flex;
  direction: ltr;
  width: max-content;
  min-width: max-content;
  will-change: transform;
}
.ticker-inner.running        { animation: ticker-rtl var(--td,18s) linear infinite; -webkit-animation: ticker-rtl var(--td,18s) linear infinite; }
.ticker-inner.running:hover  { animation-play-state: paused; -webkit-animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 40px;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s;
  direction: rtl;
  unicode-bidi: isolate;
}
.ticker-item:hover { color: var(--primary); }
.ticker-item::before {
  content: '◆';
  color: var(--primary);
  font-size: 0.38rem;
  flex-shrink: 0;
}
@keyframes ticker-rtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
@-webkit-keyframes ticker-rtl {
  0%   { -webkit-transform: translateX(0); }
  100% { -webkit-transform: translateX(50%); }
}
@media (max-width: 768px) {
  .ticker-item { padding: 0 24px; font-size: 0.82rem; }
}

/* ============ MOST VIEWED ============ */
.most-viewed-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 768px) {
  .most-viewed-list { grid-template-columns: 1fr; }
}
.most-viewed-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
  position: relative;
}
.most-viewed-item:hover {
  border-color: var(--primary);
  background: var(--bg-card2);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.mv-rank {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,199,61,0.12);
  border: 1.5px solid rgba(255,199,61,0.35);
  color: var(--primary);
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.most-viewed-item:first-child .mv-rank {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.mv-body { flex: 1; }
.mv-body h4 {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
.mv-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.mv-meta i { color: var(--primary); margin-left: 4px; }
.mv-arrow { display: none; }
.most-viewed-item:hover .mv-arrow { color: var(--primary); }

/* ============ PAGE HERO ============ */
.page-hero {
  padding: 120px 5% 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,199,61,0.07) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
}
.page-hero-content { max-width: 600px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 16px 0 14px; }
.page-hero h1 span { color: var(--primary); }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: 0.7rem; color: var(--text-dim); }

/* ============ SHOP FILTER BAR ============ */
.shop-filter-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.shop-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px;
  font-size: 0.85rem; color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.shop-tab:hover, .shop-tab.active {
  color: #000; background: var(--primary);
  border-color: var(--primary);
}
.shop-search-form { display: flex; gap: 8px; }
.shop-search-input {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-main);
  font-family: inherit; font-size: 0.9rem;
  min-width: 200px;
  transition: var(--transition);
}
.shop-search-input:focus { outline: none; border-color: var(--primary); }

/* ============ SHOP GRID ============ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ============ SHOP CARD ============ */
.shop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.shop-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.shop-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-card2);
}
.shop-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.shop-card:hover .shop-card-img img { transform: scale(1.05); }
.shop-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-dark));
}
.shop-card-badge {
  position: absolute; bottom: 10px; right: 10px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.badge-book { background: rgba(59,130,246,0.9); color: #fff; }
.badge-course { background: rgba(168,85,247,0.9); color: #fff; }
.badge-masterclass { background: rgba(245,158,11,0.92); color: #000; font-weight: 700; }
.shop-card-body {
  padding: 18px 18px 12px;
  flex: 1;
}
.shop-card-body h3 {
  font-size: 1rem; margin-bottom: 8px; line-height: 1.5;
}
.shop-card-body h3 a:hover { color: var(--primary); }
.shop-card-body p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.shop-card-author {
  margin-top: 10px; font-size: 0.8rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.shop-card-footer {
  padding: 12px 18px 18px;
  display: flex; align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.shop-price { display: flex; align-items: baseline; gap: 4px; }
.price-amount { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.price-currency { font-size: 0.8rem; color: var(--text-muted); }
.price-free { color: #22c55e; font-weight: 700; font-size: 1rem; }

/* ============ SHOP SINGLE ============ */
.shop-single-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}
.shop-single-placeholder {
  width: 100%; aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-dark));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
  border: 1px solid var(--border);
}
.shop-badge-large {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  margin-top: 16px;
}
.shop-price-big {
  display: flex; align-items: baseline; gap: 6px;
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(255,199,61,0.05);
  border: 1px solid rgba(255,199,61,0.2);
  border-radius: var(--radius-sm);
}
.price-amount-big {
  font-size: 2rem; font-weight: 700; color: var(--primary);
}
.learn-box {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
}
.learn-box h4 { margin-bottom: 12px; font-size: 0.95rem; }
.learn-box ul { display: flex; flex-direction: column; gap: 8px; }
.learn-box li { font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: flex-start; gap: 6px; }
.shop-cta-btns { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.shop-meta-list {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.shop-meta-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-muted);
}
.shop-meta-item i { color: var(--primary); font-size: 0.8rem; }
.shop-description-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
}
.shop-description-box h3 { margin-bottom: 16px; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--text-main); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .hero-visual {
    left: 2%;
  }
  .about-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 70px 5% 90px;
    gap: 0;
  }
  .hero-content {
    max-width: 100%;
    order: 1;
  }
  .hero-content .stats-row {
    margin-top: 24px !important;
  }
  .hero-visual {
    display: flex;
    position: static;
    transform: none;
    animation: float-mobile 6s ease-in-out infinite;
    justify-content: center;
    order: 2;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    z-index: 0;
  }
  .hero-circle {
    width: 150px; height: 150px;
  }
  .hero-circle::before { inset: -10px; }
  .hero-circle::after  { inset: -22px; }
  .hero-icon-main {
    width: 44px; height: 44px;
    font-size: 1.1rem;
    animation: rotate-reverse 20s linear infinite;
  }
}

@media (max-width: 768px) {
  .shop-single-grid { grid-template-columns: 1fr; }
  .shop-filter-bar { flex-direction: column; align-items: stretch; }
  .shop-search-form { width: 100%; }
  .shop-search-input { flex: 1; min-width: 0; }
  .nav-menu { display: none; }
  .hamburger { display: flex; }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; right: 0; left: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 20px 5%;
    gap: 4px;
    z-index: 999;
  }

  .nav-menu.open a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border);
    display: block;
  }

  .hero { text-align: center; padding-top: 80px; padding-bottom: 40px; min-height: auto; }
  .hero-btns { justify-content: center; }
  .stats-row { justify-content: center !important; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

  .stats-row { gap: 30px; }
  .section { padding: 60px 5%; }
}

@media (max-width: 480px) {
  .auth-box { padding: 28px 22px; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ============ PROMPTS SHOW-MORE (مۆبایل) ============ */
.prompts-show-more {
  display: none;
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .cards-grid .prompt-card:nth-child(n+5) {
    display: none;
  }
  .cards-grid.prompts-expanded .prompt-card {
    display: block;
  }
  .prompts-show-more {
    display: flex;
  }
  .prompts-show-more.hidden {
    display: none;
  }
}


/* ═══════════════════════════════════════════════
   BOURSE — بۆرسەی تەکنەلۆژیا
═══════════════════════════════════════════════ */

/* Live ticker bar */
.bourse-ticker-bar {
  display: flex; align-items: center; gap: 0;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(34,197,94,0.3);
  height: 38px; overflow: hidden; position: relative;
}
.bourse-ticker-label {
  flex-shrink: 0; padding: 0 14px;
  font-size: 0.72rem; font-weight: 700; color: #22c55e;
  border-left: 1px solid rgba(34,197,94,0.3);
  height: 100%; display: flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,0.08);
  white-space: nowrap;
}
.bourse-ticker-wrap { flex: 1; overflow: hidden; }
.bourse-ticker-track {
  display: flex; gap: 0; white-space: nowrap;
  animation: bourse-scroll 40s linear infinite;
}
.bourse-ticker-track:hover { animation-play-state: paused; }
@keyframes bourse-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 18px; font-size: 0.78rem; white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.07);
}
.ticker-chip strong { font-weight: 700; }
.ticker-chip .ticker-cur { color: rgba(255,255,255,0.4); font-size:0.7rem; }
.ticker-chip em { font-style: normal; font-weight: 700; margin-right: 2px; }
.ticker-chip.up   { color: #e2e8f0; } .ticker-chip.up em   { color: #22c55e; }
.ticker-chip.down { color: #e2e8f0; } .ticker-chip.down em { color: #ef4444; }

/* Hero */
.bourse-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f2218 100%) !important;
  border-bottom: 1px solid rgba(34,197,94,0.2);
  position: relative; overflow: hidden;
}
.bourse-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(34,197,94,0.08) 0%, transparent 70%);
}
.bourse-hero-sub {
  color: rgba(255,255,255,0.65); font-size: 1rem; margin: 10px 0 16px; max-width: 600px;
}
.bourse-live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.35);
  color: #22c55e; padding: 5px 14px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  animation: live-pulse 1.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.6); }
}

/* Filter bar */
.bourse-filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.bourse-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600; text-decoration: none;
  background: var(--bg-card2); color: var(--text-muted);
  border: 1px solid var(--border); transition: all 0.2s;
}
.bourse-tab:hover { border-color: var(--primary); color: var(--primary); }
.bourse-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-count {
  background: rgba(255,255,255,0.2); border-radius: 50px;
  padding: 0 6px; font-size: 0.7rem; font-weight: 700;
}
.bourse-tab.active .tab-count { background: rgba(255,255,255,0.25); }

/* Meta bar */
.bourse-meta-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: 20px; padding: 8px 14px;
  background: var(--bg-card2); border-radius: 8px; border: 1px solid var(--border);
}
.bourse-source { color: var(--primary); }

/* Grid */
.bourse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Card */
.bourse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative; overflow: hidden;
}
.bourse-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 3px; height: 100%; border-radius: 0 var(--radius) var(--radius) 0;
}
.bourse-card.card-up::before   { background: #22c55e; }
.bourse-card.card-down::before { background: #ef4444; }
.bourse-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(255,255,255,0.12); }

.bourse-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.bourse-cat-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.bourse-card-info { flex: 1; min-width: 0; }
.bourse-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 2px; line-height: 1.3; }
.bourse-brand { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.bourse-cat-label { font-size: 0.72rem; color: var(--primary); }
.bourse-arrow { flex-shrink: 0; font-size: 1.1rem; }
.bourse-arrow.arrow-up   { color: #22c55e; }
.bourse-arrow.arrow-down { color: #ef4444; }

.bourse-card-price {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 12px; padding: 10px 14px;
  background: var(--bg-card2); border-radius: 8px;
}
.bourse-price-val {
  font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; transition: color 0.3s;
}
.bourse-price-cur { font-size: 0.82rem; color: var(--text-muted); }

.bourse-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.bourse-change { font-size: 0.8rem; font-weight: 700; }
.change-up   { color: #22c55e; }
.change-down { color: #ef4444; }
.change-flat { color: var(--text-muted); font-weight: 400; }
.bourse-updated { font-size: 0.72rem; color: var(--text-dim, rgba(255,255,255,0.3)); }

/* Flash animation */
@keyframes flash-up   { 0%,100%{color:inherit;} 50%{color:#22c55e;} }
@keyframes flash-down { 0%,100%{color:inherit;} 50%{color:#ef4444;} }
.flash-up   { animation: flash-up   0.55s ease; }
.flash-down { animation: flash-down 0.55s ease; }

/* Spin for refresh */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear; }

/* Homepage bourse widget */
.bourse-widget-strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.bourse-widget-strip::-webkit-scrollbar { display: none; }
.bourse-widget-chip {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; min-width: 130px;
  text-decoration: none; color: var(--text-main);
  transition: all 0.2s; position: relative;
}
.bourse-widget-chip:hover { border-color: var(--primary); transform: translateY(-2px); }
.bourse-widget-chip .chip-emoji { font-size: 1.5rem; }
.bourse-widget-chip .chip-name { font-size: 0.78rem; font-weight: 600; text-align: center; }
.bourse-widget-chip .chip-price { font-size: 0.95rem; font-weight: 800; color: var(--primary); }
.bourse-widget-chip .chip-change { font-size: 0.72rem; font-weight: 700; }
.bourse-widget-chip .chip-up   { color: #22c55e; }
.bourse-widget-chip .chip-down { color: #ef4444; }
.bourse-widget-chip .chip-bar {
  position: absolute; bottom: 0; right: 0; left: 0; height: 3px; border-radius: 0 0 12px 12px;
}
.bourse-widget-chip.wup   .chip-bar { background: #22c55e; }
.bourse-widget-chip.wdown .chip-bar { background: #ef4444; }

@media (max-width: 768px) {
  .bourse-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .bourse-card { padding: 12px; }
  .bourse-price-val { font-size: 1.2rem; }
  .bourse-cat-icon { font-size: 1.5rem; }
  .bourse-ticker-bar { height: 32px; }
  .bourse-meta-bar { flex-direction: column; gap: 4px; text-align: center; }
  .bourse-tab { padding: 5px 12px; font-size: 0.78rem; }
}
