/* ===== Sponsor Profile Page ===== */

.sp-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  min-height: 60vh;
}

/* Loading */
.sp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 40vh;
  color: var(--text-muted, #94a3b8);
}

/* Not found */
.sp-not-found {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted, #94a3b8);
}
.sp-not-found i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.sp-not-found h2 {
  color: var(--text, #e2e8f0);
  margin: 0 0 0.5rem;
}
.sp-not-found p {
  margin: 0 0 1.5rem;
}

/* ── Header ── */
.sp-header {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sp-header-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
}

.sp-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.sp-logo {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sp-logo--placeholder {
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #8b5cf6;
}

.sp-header-info {
  min-width: 0;
}

.sp-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--text, #f1f5f9);
}

.sp-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sp-social {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.sp-social:hover {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* ── Sections ── */
.sp-section {
  margin-bottom: 2rem;
}

.sp-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sp-section-title i {
  font-size: 0.9rem;
  color: #8b5cf6;
}

.sp-about-text {
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
}

/* ── Stats grid ── */
.sp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.sp-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.sp-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #8b5cf6;
}

.sp-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Team grid ── */
.sp-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.sp-team-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.sp-team-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sp-team-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sp-team-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-team-role {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  text-transform: capitalize;
}

/* ── Giveaway cards grid ── */
.sp-giveaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.sp-ga-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.sp-ga-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.sp-ga-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.sp-ga-img--placeholder {
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #8b5cf6;
}

.sp-ga-info {
  padding: 0.65rem 0.75rem;
}

.sp-ga-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-ga-platform {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Campaign items ── */
.sp-campaign-item {
  margin-bottom: 0.5rem;
}

.sp-campaign-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text, #e2e8f0);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.sp-campaign-toggle:hover {
  background: rgba(255,255,255,0.08);
}

.sp-campaign-arrow {
  color: var(--text-muted, #64748b);
  font-size: 0.7rem;
  transition: transform 0.2s;
  width: 16px;
  text-align: center;
}
.sp-campaign-arrow.sp-arrow-open {
  transform: rotate(90deg);
}

.sp-campaign-name {
  font-weight: 600;
  flex: 1;
  text-align: left;
}

.sp-campaign-count {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.sp-camp-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.sp-camp-badge--ended {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.sp-campaign-giveaways {
  padding: 0.65rem 0 0 1.5rem;
}

.sp-empty {
  color: var(--text-muted, #475569);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0.5rem 0;
}

/* ── Winners list ── */
.sp-winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sp-winner-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.sp-winner-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.sp-winner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sp-winner-info {
  flex: 1;
  min-width: 0;
}

.sp-winner-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
}

.sp-winner-detail {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-winner-detail strong { color: var(--text-secondary, #cbd5e1); }

.sp-winner-ago {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .sp-page {
    padding: 1rem 0.75rem 2rem;
  }

  .sp-header-inner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .sp-logo, .sp-logo--placeholder {
    width: 72px;
    height: 72px;
  }

  .sp-name { font-size: 1.35rem; }

  .sp-socials { justify-content: center; }

  .sp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-stat-value { font-size: 1.4rem; }

  .sp-team-grid {
    grid-template-columns: 1fr;
  }

  .sp-giveaways-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-ga-img { height: 80px; }
}

@media (max-width: 480px) {
  .sp-giveaways-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .sp-ga-card { border-radius: 8px; }
  .sp-ga-img { height: 70px; }
  .sp-ga-info { padding: 0.5rem; }
  .sp-ga-title { font-size: 0.75rem; }
}

/* ── Light theme overrides ── */
[data-theme="light"] .sp-not-found h2 {
  color: var(--text-primary, #1e293b);
}

[data-theme="light"] .sp-header-bg {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.06));
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .sp-logo {
  border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .sp-name {
  color: var(--text-primary, #1e293b);
}

[data-theme="light"] .sp-social {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: var(--text-secondary, #475569);
}
[data-theme="light"] .sp-social:hover {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}

[data-theme="light"] .sp-section-title {
  color: var(--text-primary, #1e293b);
  border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .sp-about-text {
  color: var(--text-secondary, #475569);
}

[data-theme="light"] .sp-stat-card {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .sp-stat-label {
  color: var(--text-muted, #64748b);
}

[data-theme="light"] .sp-team-member {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .sp-team-name {
  color: var(--text-primary, #1e293b);
}

[data-theme="light"] .sp-ga-card {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .sp-ga-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

[data-theme="light"] .sp-ga-title {
  color: var(--text-primary, #1e293b);
}

[data-theme="light"] .sp-campaign-toggle {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
  color: var(--text-primary, #1e293b);
}
[data-theme="light"] .sp-campaign-toggle:hover {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .sp-winner-item {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .sp-winner-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .sp-winner-name {
  color: var(--text-primary, #1e293b);
}

[data-theme="light"] .sp-winner-detail strong {
  color: var(--text-secondary, #475569);
}
