/* Tab Content */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

/* Main Layout for Builder Tab */
.main-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 280px;
    background: var(--surface-tertiary);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-primary);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-section h3 {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.sidebar-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.sidebar-item:hover {
    background: var(--hover-primary);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-item.active {
    background: linear-gradient(45deg, var(--hover-secondary), var(--hover-primary));
    border-left: 3px solid var(--primary-color);
    color: var(--primary-color);
}

/* Main Content */
.content {
    flex: 1;
    padding: 32px;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Export page grid layout and monetized card styles */
.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}

.monetized-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-badge {
  background: linear-gradient(45deg, #10B981, #059669);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.monetized-card .card-body {
  margin-top: 6px;
}

.feature-list {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

#buy-source-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Monetized Source locked overlay */
.monetized-card {
  position: relative;
  overflow: hidden;
}
.monetized-card .card-body {
  position: relative;
}
.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2; /* ensure overlay is above card content */
}
.locked-overlay::before {
  /* Strong washed blur to fully obfuscate content */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.65); /* deeper dim */
  backdrop-filter: blur(24px) saturate(140%) brightness(0.6) contrast(0.85);
  -webkit-backdrop-filter: blur(24px) saturate(140%) brightness(0.6) contrast(0.85);
}
.locked-overlay .overlay-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.overlay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
}
.overlay-price-btn {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 800;
  color: #0b1220;
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 10px 30px rgba(16,185,129,0.35);
  cursor: pointer;
}
.overlay-price-btn:hover {
  transform: translateY(-1px);
}
.nsfw-icon {
  font-size: 40px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

/* Unlocked state hides overlay */
#source-card[data-unlocked="true"] .locked-overlay { display: none; }
#source-card[data-unlocked="true"] .unlocked-controls { display: block !important; }

/* Sidebar footer (Suggestions & Feedback) */
.sidebar-footer {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    /* Match the sidebar background exactly to avoid a visible band */
    background: var(--surface-tertiary);
    margin-top: auto;
}

.sidebar-separator {
    height: 1px;
    background: var(--border-primary);
    /* Full-bleed across the padded sidebar (24px left/right) */
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
    margin-top: 8px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.sidebar-footer .sidebar-item {
    margin-bottom: 8px;
}
