/* ============================================================
   Podstrm - shared styles
   Use this on every page before loading page-specific CSS.
   ============================================================ */

/* ---------- Theme tokens ---------- */
:root,
[data-theme="dark"] {
  --page-max:      1180px;
  --page-gutter:   24px;
  --bg:            #0a0a0c;
  --bg-alt:        #0e0e12;
  --surface:       #121217;
  --surface-2:     #16161c;
  --text:          #ffffff;
  --text-muted:    #9a9aa3;
  --text-soft:     #c7c7cf;
  --border:        #23232b;

  --blue:          #1f4fff;
  --blue-card:     #1f43f5;
  --cyan:          #1fd6e0;
  --green:         #6cdb1f;
  --coral:         #f06a5d;

  --nav-bg:        rgba(10, 10, 12, 0.85);
  --card-faq:      #131319;
  --faq-light-bg:  #ffffff;
  --faq-light-text:#0a0a0c;
  --shadow:        0 10px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg:            #f1f2f4;
  --bg-alt:        #ffffff;
  --surface:       #ffffff;
  --surface-2:     #ffffff;
  --text:          #0a0a0c;
  --text-muted:    #6b6b73;
  --text-soft:     #44444c;
  --border:        #e3e4e8;

  --blue:          #1f4fff;
  --blue-card:     #1f43f5;
  --cyan:          #1fd6e0;
  --green:         #6cdb1f;
  --coral:         #f06a5d;

  --nav-bg:        rgba(255, 255, 255, 0.9);
  --card-faq:      #ffffff;
  --faq-light-bg:  #ffffff;
  --faq-light-text:#0a0a0c;
  --shadow:        0 10px 30px rgba(20, 20, 40, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img,
svg,
canvas {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-dark {
  background: #16161c;
  color: #fff;
  border: 1px solid var(--border);
}
[data-theme="light"] .btn-dark { background: #0a0a0c; }

.btn-white {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
[data-theme="dark"] .btn-white { background: #ffffff; color: #0a0a0c; border: none; }

.btn-outline {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}
[data-theme="light"] .btn-outline { background: var(--blue); color: #fff; border: none; }

.btn-follow {
  background: var(--cyan);
  color: #06262a;
  padding: 8px 22px;
  border-radius: 8px;
  font-weight: 600;
  width: 100%;
}
.btn-signin {
  background: #fff;
  color: #0a0a0c;
  padding: 10px 18px;
}
[data-theme="light"] .btn-signin { background: var(--blue); color: #fff; }

.btn-block { width: 100%; }

.play-dot { font-size: 9px; }
.arrow { font-size: 14px; font-weight: 700; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; font-weight: 800; }
.logo-image {
  display: block;
  width: 140px;
  height: 34px;
  object-fit: contain;
}
.logo-image-dark { display: none; }
[data-theme="light"] .logo-image-light { display: none; }
[data-theme="light"] .logo-image-dark { display: block; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-links { display: flex; gap: 8px; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
}
[data-theme="light"] .nav-link.is-active { background: #e7e8ec; }

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

.public-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.public-menu-toggle svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.public-nav-drawer,
.public-nav-backdrop {
  display: none;
}

.nav-icon-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.nav-icon-link:hover,
.nav-icon-link:focus-visible,
.nav-icon-link.is-active {
  background: var(--surface-2);
  border-color: var(--border);
}

.nav-icon-link:active {
  transform: translateY(1px);
}

.nav-avatar {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.15s ease;
}

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

.nav-avatar:hover,
.nav-avatar:focus-visible {
  border-color: var(--blue);
}

.nav-avatar:active {
  transform: translateY(1px);
}

/* ---------- User account dropdown ---------- */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-menu-trigger {
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 244px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 200;
}

.user-menu.is-open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu[open] .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

summary.user-menu-trigger {
  list-style: none;
}

summary.user-menu-trigger::-webkit-details-marker {
  display: none;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-head img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-dropdown-id {
  min-width: 0;
}

.user-dropdown-id strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.user-dropdown-id span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.user-dropdown-item:hover,
.user-dropdown-item:focus-visible {
  background: var(--surface-2);
}

.user-dropdown-item svg,
.user-dropdown-item i {
  width: 19px;
  height: 19px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.creator-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.creator-user-dropdown {
  top: calc(100% + 10px);
  width: 312px;
  padding: 0;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid #415475;
  border-radius: 5px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.creator-user-dropdown .user-dropdown-head {
  gap: 10px;
  min-height: 53px;
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid #26354d;
}

.creator-user-dropdown .user-dropdown-head img {
  width: 28px;
  height: 28px;
}

.creator-user-dropdown .user-dropdown-id strong {
  color: #f8fbff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.creator-user-dropdown .user-dropdown-id span {
  margin-top: 2px;
  color: #c6d1e3;
  font-size: 12px;
}

.creator-user-dropdown .user-dropdown-item {
  min-height: 35px;
  gap: 11px;
  padding: 10px 18px;
  border-radius: 0;
  border-bottom: 1px solid #26354d;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.creator-user-dropdown .user-dropdown-item:last-child {
  border-bottom: 0;
}

.creator-user-dropdown .user-dropdown-item:hover,
.creator-user-dropdown .user-dropdown-item:focus-visible {
  background: #121d31;
}

.creator-user-dropdown .user-dropdown-item svg,
.creator-user-dropdown .user-dropdown-item i {
  width: 15px;
  height: 15px;
  color: #ffffff;
}

[data-theme="light"] .creator-user-dropdown {
  background: #ffffff;
  border-color: #d6dce8;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .creator-user-dropdown .user-dropdown-head,
[data-theme="light"] .creator-user-dropdown .user-dropdown-item {
  border-bottom-color: #e5e9f0;
}

[data-theme="light"] .creator-user-dropdown .user-dropdown-id strong,
[data-theme="light"] .creator-user-dropdown .user-dropdown-item {
  color: #0f172a;
}

[data-theme="light"] .creator-user-dropdown .user-dropdown-id span {
  color: #667085;
}

[data-theme="light"] .creator-user-dropdown .user-dropdown-item:hover,
[data-theme="light"] .creator-user-dropdown .user-dropdown-item:focus-visible {
  background: #f3f6fb;
}

[data-theme="light"] .creator-user-dropdown .user-dropdown-item svg,
[data-theme="light"] .creator-user-dropdown .user-dropdown-item i {
  color: #0f172a;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
}
.theme-toggle:hover { background: var(--surface-2); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 56px;
}
[data-theme="dark"] .footer { background: #0c0c10; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 30px;
  padding-bottom: 50px;
}
.footer-brand p { color: var(--text-muted); font-size: 13px; margin-top: 14px; }
.footer-col h5,
.footer-news h5 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text); }
.footer-news p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.news-form {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
}
[data-theme="dark"] .news-form { background: #000; }
.news-form input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  padding: 10px 0;
}
.news-form input::placeholder { color: var(--text-muted); }
.news-form button {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: var(--bg-alt);
  font-size: 16px;
  cursor: pointer;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  padding-bottom: 30px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-legal { display: flex; gap: 28px; }
.footer-legal a:hover { color: var(--text); }

/* ---------- Shared responsive ---------- */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-inner { height: auto; padding-top: 14px; padding-bottom: 14px; gap: 14px; }
  .nav-links { display: none; }
  .nav-actions { gap: 8px; }
  .public-menu-toggle { display: grid; }
  .navbar .nav-icon-link,
  .navbar .btn-signin {
    display: none;
  }
  .public-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(86vw, 330px);
    padding: 22px;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.34);
    transform: translateX(102%);
    transition: transform 0.22s ease;
  }
  .public-menu-open .public-nav-drawer {
    transform: translateX(0);
  }
  .public-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .public-menu-open .public-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.public-menu-open {
    overflow: hidden;
  }
  .public-drawer-head {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .public-drawer-links {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 28px 0;
  }
  .public-drawer-links .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
  }
  .public-drawer-links .nav-link svg {
    width: 18px;
    height: 18px;
  }
  .public-drawer-actions {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .public-drawer-btn {
    width: 100%;
    min-height: 44px;
  }
  :root { --page-gutter: 18px; }
  .container { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
  .logo-image { width: 118px; height: auto; }
  .btn-signin { padding: 9px 12px; font-size: 12px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 14px; }
}
