/* ==========================================
   EXTRO GLOBAL STYLES - Instagram-style dark mode
   Path: static/css/global.css
   ========================================== */

/* =========================
   Global Reset & Fonts
   ========================= */
* {
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
}

body {
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}

/* =========================
   Header / Navigation
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-light);
}

.site-header__inner {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 14px 24px;
}

.site-logo {
  font-family: "Times New Roman", Times, serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 36px;
}

.nav-center a {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 0.2px;
  opacity: 0.45;
  transition: opacity 120ms ease;
}

.nav-center a:hover {
  opacity: 0.7;
}

.nav-center a.active {
  font-weight: 900;
  opacity: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.nav-avatar-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 999px;
}

.nav-avatar-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--color-primary);
}

.nav-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-medium);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 2000;
}

.nav-dropdown.is-open {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
}

.nav-dropdown a:hover {
  background: var(--color-bg-hover);
}

.nav-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 6px 0;
}

.nav-logout-form {
  margin: 0;
}

.nav-logout-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-error-text);
}

.nav-logout-btn:hover {
  background: rgba(176, 0, 32, 0.08);
}

.nav-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.nav-login:hover {
  color: var(--color-text-primary);
}

.nav-activityLink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-activityDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff2d55;
  display: inline-block;
  box-shadow: 0 0 0 2px var(--color-bg-card);
}

/* =========================
   Global Create Poll Button
   ========================= */
.create-poll-float-global {
  position: fixed;
  left: calc(50% - 310px - 140px);
  top: 190px;
  z-index: 1001;
  
  border: none;
  background: var(--color-primary);
  color: var(--color-bg-card);
  
  padding: 16px 24px;
  border-radius: 50px;
  
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.2px;
  
  box-shadow: var(--shadow-button);
  cursor: pointer;
  
  transition: all 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.create-poll-float-global:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.create-poll-float-global:active {
  transform: translateY(0) scale(0.96);
}

.create-poll-float-global .create-poll-text {
  display: inline-block;
}

@media (max-width: 1200px) {
  .create-poll-float-global {
    display: none;
  }
}

/* =========================
   PYMK Sidebar
   ========================= */
.pymkFloat {
  position: fixed;
  top: 200px;
  left: calc(50% + 310px + 48px);
  width: 360px;
  z-index: 900;
}

@media (max-width: 1200px) {
  .pymkFloat {
    display: none;
  }
}

.pymkCard {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pymkHeader {
  padding: 16px 18px 14px;
  font-weight: 900;
  font-size: 14px;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: -0.01em;
}

.pymkList {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pymkRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
}

.pymkRow:hover {
  background: var(--color-bg-hover);
}

.pymkLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.pymkAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-medium);
  flex: 0 0 auto;
}

.pymkMeta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pymkName {
  font-weight: 900;
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pymkUser {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pymkSub {
  font-weight: 700;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.pymkSubStrong {
  color: var(--color-text-primary);
  font-weight: 900;
}

.pymkMutualRow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.pymkMutualAvatars {
  display: flex;
  align-items: center;
  margin-right: 2px;
}

.pymkMutualAvatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--color-bg-card);
  margin-left: -5px;
  object-fit: cover;
  background: var(--color-bg-tertiary);
}

.pymkMutualAvatar:first-child {
  margin-left: 0;
}

.pymkMutualText {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
  line-height: 1;
}

.pymkRight {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* =========================
   Follow Button — unified (matches base.html)
   ========================= */
.follow-btn {
  min-width: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: background 120ms ease, border-color 120ms ease;
  background: var(--color-btn-action);
  color: var(--color-btn-action-text);
  border: 1px solid var(--color-btn-action);
}

.follow-btn:hover {
  background: var(--color-btn-action-hover);
  border-color: var(--color-btn-action-hover);
}

.follow-btn.following {
  background: var(--color-btn-subtle);
  color: var(--color-btn-subtle-text);
  border: 1px solid var(--color-border-medium);
}

.follow-btn.following:hover {
  background: var(--color-btn-subtle-hover);
  border-color: var(--color-border-strong);
}