/* ── GLOBAL THEME VARIABLES ── */
:root {
  --bg: #f9f8f5; --bg2: #ffffff; --bg3: #f2f0ea; --bg4: #e9e6dd;
  --text: #18172e; --text2: #4b495f; --text3: #8b899f;
  --accent: #2d1b69; --accent2: #6c3fd4; --accent3: #a855f7; --accent4: #e9d5ff;
  --green: #16a34a; --red: #dc2626; --amber: #d97706;
  --border: #dedad2; --border2: #ccc9bf;
  --shadow: 0 2px 16px rgba(45,27,105,.07);
  --shadow-lg: 0 8px 40px rgba(45,27,105,.13);
  --r: 14px; --r-sm: 8px; --r-xs: 6px;
  --mono: 'Space Mono', monospace;
  --body: 'DM Sans', sans-serif;
  --ease: 0.22s cubic-bezier(.4,0,.2,1);
}
[data-theme="dark"] {
  --bg: #0d0c18; --bg2: #14121f; --bg3: #1a1728; --bg4: #211e30;
  --text: #ede9ff; --text2: #9d99bf; --text3: #605e7a;
  --accent: #7c4dff; --accent2: #a78bfa; --accent3: #c4b5fd; --accent4: #2e1b5e;
  --green: #22c55e; --red: #f87171; --amber: #fbbf24;
  --border: #252236; --border2: #332f4a;
  --shadow: 0 2px 16px rgba(0,0,0,.4); --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}

/* ── BASE RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; transition: background var(--ease), color var(--ease); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--body); border: none; outline: none; }
img { max-width: 100%; height: auto; }

/* ── CUSTOM SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent2), var(--accent3)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
html { scrollbar-color: var(--accent2) var(--bg3); scrollbar-width: thin; }

/* ── HEADER ── */
.mct-header-wrapper { background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; width: 100%; font-family: var(--body); z-index: 99999; box-shadow: var(--shadow); transition: background var(--ease), border-color var(--ease); }
.mct-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 80px; display: flex; align-items: center; justify-content: space-between; }
.mct-logo-link { display: flex; align-items: center; text-decoration: none; height: 100%; }
.mct-logo-link img { max-height: 60px !important; width: auto !important; object-fit: contain; }
.mct-actions { display: flex; align-items: center; gap: 12px; }
.mct-badge { font-size: 11px; font-weight: 700; color: var(--green); background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.2); padding: 5px 12px; border-radius: 20px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.mct-icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 0; outline: none; }
.mct-icon-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.mct-icon-btn svg { stroke: currentColor; }
.mct-hamburger, .mct-close-btn, .mct-overlay { display: none; }
.mct-header-pulse { height: 3px; overflow: hidden; }
.mct-header-pulse svg { display: block; animation: mctPulseSlide 3s ease-in-out infinite; }
@keyframes mctPulseSlide { 0%,100% { opacity: 0.3; } 50% { opacity: 0.8; } }

/* Desktop Nav */
@media (min-width: 992px) {
  .mct-nav { display: flex; gap: 5px; align-items: center; }
  .mct-nav-link { padding: 8px 14px; border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--text2); text-decoration: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
  .mct-nav-link:hover { background: var(--bg3); color: var(--accent2); }
  .mct-caret { transition: transform 0.3s ease; }
  .mct-dropdown { position: relative; display: inline-block; }
  .mct-dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: var(--bg2); min-width: 250px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 0; z-index: 100000; animation: mctFadeUp 0.2s ease forwards; }
  .mct-dropdown:hover .mct-dropdown-content { display: block; }
  .mct-dropdown-content a { padding: 8px 20px; display: block; color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; }
  .mct-dropdown-content a:hover { background: var(--bg3); color: var(--accent2); padding-left: 24px; }
}

/* Mobile Nav */
@media (max-width: 991px) {
  .mct-badge { display: none !important; }
  .mct-hamburger { display: flex !important; }
  .mct-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999998; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
  .mct-overlay.open { opacity: 1; pointer-events: auto; }
  .mct-nav { position: fixed; top: 0; right: -320px; width: 300px; height: 100dvh; background: var(--bg2); box-shadow: -5px 0 30px rgba(0,0,0,0.15); display: flex; flex-direction: column; padding: 80px 20px 30px; z-index: 999999; transition: right 0.3s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; }
  .mct-nav.open { right: 0; }
  .mct-close-btn { display: flex !important; position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); align-items: center; justify-content: center; font-size: 18px; cursor: pointer; outline: none; }
  .mct-close-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
  .mct-nav-link { width: 100%; padding: 15px 5px; font-size: 16px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); text-decoration: none; display: flex; justify-content: space-between; align-items: center; }
  .mct-dropdown { width: 100%; }
  .mct-dropdown-content { display: none; border-left: 3px solid var(--accent2); padding: 5px 0; margin-left: 10px; margin-bottom: 10px; margin-top: 5px; }
  .mct-dropdown.open .mct-dropdown-content { display: block; }
  .mct-dropdown-content a { padding: 10px 15px; display: block; color: var(--text2); text-decoration: none; font-size: 14px; border-bottom: 1px solid rgba(0,0,0,0.05); }
  .mct-dropdown-content a:last-child { border-bottom: none; }
  .mct-caret { transition: transform 0.3s ease; }
  .mct-dropdown.open .mct-caret { transform: rotate(180deg); }
}

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