/* ==========================================================================
   1. GLOBAL RESET & DESIGN VARIABLES
   ========================================================================== */
:root {
  --bg-main: #0c0d14;
  --card-bg: #161722;
  --card-border: #232538;
  --accent: #00aff0; /* Sky blue (OnlyFans style) - swap to #e91e63 if preferred */
  --accent-glow: rgba(0, 175, 240, 0.25);
  --accent-hover: #0098d4;
  --text-main: #ffffff;
  --text-muted: #8b8f9e;
  --text-dim: #5e6273;
  --danger: #fe3c72;
  --success: #2ecc71;
  --gold: #ffd700;
  --radius-lg: 14px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

img {
  max-width: 100%;
  display: block;
}

button, input {
  font-family: inherit;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.of-header, .header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  width: 100%;
}

.of-brand, .brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.of-brand span, .brand span {
  color: var(--accent);
}

.nav-links, .user-status {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav-links a, .link-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s ease;
}

.nav-links a:hover, .link-btn:hover {
  color: #ffffff;
}

.badge.vip {
  background: var(--gold);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   3. CREATOR PROFILE HEADER
   ========================================================================== */
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, #1b1c2b, #0d1b2a);
  width: 100%;
}

.profile-info {
  max-width: 600px;
  margin: -50px auto 25px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-main);
  background: #252839;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  user-select: none;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-check {
  color: var(--accent);
  font-size: 18px;
  font-weight: bold;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 16px;
  max-width: 440px;
}

/* Generic Hero Header for subpages */
.hero {
  text-align: center;
  padding: 35px 20px 20px;
}

.hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.hero p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================================================
   4. FEED & POST CARDS (HOMEPAGE)
   ========================================================================== */
.feed-container {
  max-width: 550px;
  margin: 0 auto;
  padding: 0 16px;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.post-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #252839;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  user-select: none;
}

.post-author {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.post-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Media Box */
.post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  background: #000000;
  overflow: hidden;
}

.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blurred-locked {
  filter: blur(28px);
  transform: scale(1.12);
  transition: filter 0.3s ease;
}

/* Glassmorphic Paywall Overlay */
.paywall-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(12,13,20,0.5) 0%, rgba(12,13,20,0.9) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.lock-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Social Engagement Bar */
.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-group {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease, transform 0.15s ease;
}

.btn-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  display: block;
}

.btn-action:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-action.liked {
  color: var(--danger);
}

.btn-action.liked svg {
  fill: var(--danger);
  stroke: var(--danger);
}

.btn-action.saved {
  color: var(--accent);
}

.btn-action.saved svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.post-caption {
  padding: 4px 18px 14px;
  font-size: 14px;
  color: #e0e0e0;
}

/* Collapsible Comments Section */
.comments-section {
  display: none;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}

.comments-list {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}

.comment-item {
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.comment-user {
  font-weight: 700;
  color: #ffffff;
  margin-right: 6px;
}

.comment-text {
  color: var(--text-muted);
}

.comment-input-wrap {
  display: flex;
  gap: 10px;
}

.comment-input {
  flex: 1;
  background: #0f1017;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 9px 15px;
  color: #ffffff;
  font-size: 13px;
}

.comment-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-post-comment {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-post-comment:hover {
  opacity: 0.9;
}

/* ==========================================================================
   5. BUTTONS & CALL TO ACTIONS
   ========================================================================== */
.btn-unlock, .btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: transform 0.15s ease, opacity 0.2s ease, background-color 0.2s ease;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn:hover, .btn-unlock:hover {
  background-color: var(--accent-hover);
  transform: scale(1.02);
}

.btn:active, .btn-unlock:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 12px;
  border-radius: 18px;
}

/* ==========================================================================
   6. GRID LAYOUTS (VAULT / ADMIN)
   ========================================================================== */
.gallery-container, .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.media-box {
  position: relative;
  aspect-ratio: 4/5;
  background: #000;
  overflow: hidden;
}

.media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta {
  padding: 12px;
  text-align: center;
}

.meta h4 {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   7. MODAL STYLES (PAYPAL & LIGHTBOX)
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  margin: 10vh auto;
  padding: 25px;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.close {
  position: absolute;
  right: 18px;
  top: 14px;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  color: #fff;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

/* ==========================================================================
   8. RESPONSIVENESS
   ========================================================================== */
@media (max-width: 600px) {
  .of-header, .header {
    padding: 12px 16px;
  }
  
  .profile-cover {
    height: 140px;
  }
  
  .avatar-ring {
    width: 84px;
    height: 84px;
    font-size: 30px;
  }

  .post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -16px;
    margin-right: -16px;
  }
}