/* ==========================================================================
   SHINOBIHUB THEME - MAIN CORE STYLES
   Palette: Obsidian & Electric Cyan
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ── Background Depths ── */
  --bg-deep:           #06080C;
  --bg-dark:           #0B0E14;
  --bg-surface:        #111520;
  --bg-card:           #161B29;
  --bg-card-hover:     #1C2236;
  --bg-glass:          rgba(17, 21, 32, 0.72);

  /* ── Borders ── */
  --border:            rgba(255, 255, 255, 0.07);
  --border-light:      rgba(255, 255, 255, 0.13);
  --border-accent:     rgba(0, 212, 255, 0.35);

  /* ── Primary Accent: Electric Cyan / Neon Sky Blue ── */
  --accent:            #00D4FF;
  --accent-hover:      #38BDF8;
  --accent-glow:       rgba(0, 212, 255, 0.40);
  --accent-subtle:     rgba(0, 212, 255, 0.10);
  --accent-subtle-md:  rgba(0, 212, 255, 0.18);

  /* ── Secondary Accent: Warm Golden Amber ── */
  --accent-gold:       #FFB703;
  --accent-gold-glow:  rgba(255, 183, 3, 0.38);
  --accent-gold-subtle:rgba(255, 183, 3, 0.12);

  /* ── Legacy aliases (keeps old CSS references working) ── */
  --cr-blue-primary:   var(--bg-dark);
  --cr-blue-dark:      var(--bg-deep);
  --cr-blue-deep:      var(--bg-deep);
  --cr-blue-surface:   var(--bg-surface);
  --cr-blue-card:      var(--bg-card);
  --cr-blue-card-hover:var(--bg-card-hover);
  --cr-blue-border:    var(--border);
  --cr-blue-border-light: var(--border-light);
  --cr-accent:         var(--accent);
  --cr-accent-hover:   var(--accent-hover);
  --cr-accent-gold:    var(--accent-gold);
  --cr-accent-glow:    var(--accent-glow);
  --cr-accent-subtle:  var(--accent-subtle);
  --cr-bg-black:       var(--bg-deep);
  --cr-bg-dark:        var(--bg-dark);
  --cr-bg-surface:     var(--bg-surface);
  --cr-bg-card:        var(--bg-card);
  --cr-bg-card-hover:  var(--bg-card-hover);
  --cr-border:         var(--border);
  --cr-border-light:   var(--border-light);

  /* ── Text ── */
  --cr-text-primary:   #FFFFFF;
  --cr-text-secondary: #9BAAC8;
  --cr-text-muted:     #5A6882;
  --cr-text-link:      var(--accent);

  /* ── Status Badges ── */
  --cr-badge-sub:      #00D4FF;
  --cr-badge-dub:      #FFB703;
  --cr-badge-king:     #FFB703;
  --cr-rating-star:    #FFD166;
  --cr-success:        #06D6A0;
  --cr-danger:         #EF476F;

  /* ── Layout ── */
  --header-height:     68px;
  --nav-bottom-height: 60px;
  --max-content-width: 1560px;
  --radius-sm:         6px;
  --radius-md:         10px;
  --radius-lg:         16px;
  --radius-xl:         24px;
  --radius-pill:       9999px;

  /* ── Shadows ── */
  --shadow-sm:   0 2px 8px  rgba(0, 0, 0, 0.55);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.75);
  --shadow-lg:   0 16px 48px rgba(0, 0, 0, 0.90);
  --shadow-blue: 0 0 24px   var(--accent-glow);
  --shadow-gold: 0 0 20px   var(--accent-gold-glow);

  /* ── Transitions ── */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.40s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-deep);
  color: var(--cr-text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Custom Scrollbars ── */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--cr-text-primary);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
}

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

/* ── App Shell ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
  width: 100%;
  margin: 0 auto;
}

.page-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .page-container {
    padding: 0 16px;
  }
}

/* ── View Sections ── */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0077FE);
  color: #ffffff;
  box-shadow: 0 2px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

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

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--cr-text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-light);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--cr-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cr-text-primary);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--accent);
  transform: scale(1.06);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.badge-sub {
  background: rgba(0, 212, 255, 0.12);
  color: var(--cr-badge-sub);
  border: 1px solid rgba(0, 212, 255, 0.35);
}

.badge-dub {
  background: rgba(255, 183, 3, 0.12);
  color: var(--cr-badge-dub);
  border: 1px solid rgba(255, 183, 3, 0.35);
}

.badge-king {
  background: linear-gradient(135deg, #FFB703, #FB5607);
  color: #000;
  font-weight: 800;
}

.badge-rating {
  background: rgba(255, 209, 102, 0.12);
  color: var(--cr-rating-star);
  border: 1px solid rgba(255, 209, 102, 0.30);
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.badge-hd {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: #ffffff;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
}

.toast.toast-success {
  border-left-color: var(--cr-success);
}

.toast.toast-error {
  border-left-color: var(--cr-danger);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastFadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  margin-top: 72px;
  color: var(--cr-text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  max-width: 1200px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1 1 340px;
  max-width: 420px;
}

.footer-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  user-select: none;
}

.footer-brand .footer-logo .footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-glow);
  margin-right: 8px;
  flex-shrink: 0;
}

.footer-brand .footer-logo .logo-main {
  font-weight: 800;
  color: #ffffff;
}

.footer-brand .footer-logo .logo-sub {
  font-weight: 400;
  color: var(--accent);
  margin-left: 3px;
}

.footer-brand p {
  color: var(--cr-text-muted);
  line-height: 1.6;
  max-width: 400px;
}

.footer-col {
  flex: 1 1 220px;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
  word-break: break-all;
}

.footer-col ul a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.footer-community-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--cr-text-muted);
}

.footer-community-box strong {
  color: #ffffff;
}

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

@media (max-width: 768px) {
  .footer-grid {
    flex-direction: column;
    gap: 32px;
  }
  .footer-brand, .footer-col {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   ADSTERRA IFRAME TRANSPARENCY & SOCIAL BAR POLISH
   ========================================================================== */
iframe {
  background: transparent !important;
  background-color: transparent !important;
  color-scheme: dark !important;
}

iframe[id*="container-"],
iframe[class*="container-"],
div[id*="container-"],
div[class*="container-"] {
  background: transparent !important;
  background-color: transparent !important;
  color-scheme: dark !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  max-height: 85px !important;
  overflow: visible !important;
}

@media (max-width: 768px) {
  iframe[id*="container-"],
  iframe[class*="container-"] {
    max-width: 90% !important;
    max-height: 80px !important;
    top: 6px !important;
    transform: scale(0.9) !important;
    transform-origin: top center !important;
  }
}
