/* ============================================
   EBONY STORE - Dark Theme
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #222;
  --bg-hover: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #999;
  --accent: #ff3d3d;
  --accent-hover: #e63232;
  --border: #333;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
header {
  background: var(--bg-secondary);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
}

.logo span {
  color: var(--text);
}

.search-bar {
  flex: 1;
  display: flex;
  max-width: 600px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-bar button {
  padding: 10px 18px;
  border: none;
  border-radius: 0 6px 6px 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.search-bar button:hover {
  background: var(--accent-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.admin-btn {
  background: var(--accent);
  color: white !important;
  padding: 8px 14px;
  border-radius: 6px;
}

.admin-btn:hover {
  background: var(--accent-hover);
}

/* ============================================
   CATEGORY BAR
   ============================================ */
.category-bar {
  background: var(--bg-secondary);
  padding: 10px 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.category-bar a {
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s;
}

.category-bar a:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.category-bar a.active {
  background: var(--accent);
  color: white;
}

/* ============================================
   CONTENT LAYOUT
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title .count {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

/* ============================================
   VIDEO GRID
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-hover);
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
}

.video-thumb .duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.8);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-info {
  padding: 12px;
}

.video-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

/* ============================================
   SIDEBAR / TRENDING
   ============================================ */
.sidebar {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

.sidebar h3 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--accent);
}

.trending-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item .thumb {
  width: 90px;
  aspect-ratio: 16/9;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.trending-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-item .tt {
  font-size: 13px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.trending-item .views {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   VIDEO PLAYER PAGE
   ============================================ */
.video-wrapper {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-wrapper video {
  width: 100%;
  max-height: 70vh;
  display: block;
}

.video-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.video-description {
  color: var(--text-muted);
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.video-stats {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-header h2 {
  font-size: 24px;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #bb2d3b;
}

.admin-form {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.admin-form h3 {
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.login-box h2 {
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 16px;
  font-size: 14px;
}

/* ============================================
   ADMIN VIDEO LIST
   ============================================ */
.admin-list {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-list-item .thumb {
  width: 80px;
  aspect-ratio: 16/9;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-list-item .info {
  flex: 1;
}

.admin-list-item .info h4 {
  font-size: 14px;
}

.admin-list-item .info p {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-list-item .actions {
  display: flex;
  gap: 8px;
}

/* ============================================
   CAROUSEL / BANNER
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--accent), #7a1a1a);
  border-radius: 10px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
}

.hero h1 {
  font-size: 30px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-btn.primary {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}

.hero-btn.ghost {
  background: transparent;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tag {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 5px 10px;
  border-radius: 6px;
  opacity: 0.95;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-secondary);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 40px;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

footer a:hover {
  color: var(--text);
}

/* ============================================
   MISC
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  color: var(--text);
  padding: 14px 20px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* ============================================
   VIP / SUBSCRIPTION
   ============================================ */
.vip-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #f5b301, #c98a00);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  z-index: 2;
}

.nav-link-vip {
  background: linear-gradient(135deg, #f5b301, #c98a00);
  color: #000 !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
}

/* Subscribe page */
.subscribe-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

.sub-hero {
  background: linear-gradient(135deg, #f5b301, #b8860b);
  border-radius: 10px;
  padding: 30px;
  color: #000;
  text-align: center;
  margin-bottom: 24px;
}

.sub-hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.sub-hero .price {
  font-size: 42px;
  font-weight: 800;
  margin: 10px 0;
}

.sub-perks {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
}

.pay-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.pay-tab {
  flex: 1;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s;
}

.pay-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pay-panel {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.pay-panel h3 {
  margin-bottom: 14px;
}

.qr-box {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  display: inline-block;
}

.qr-box img {
  width: 220px;
  height: 220px;
}

.crypto-address {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  margin: 10px 0;
  user-select: all;
}

.vip-unlock {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.vip-unlock h3 {
  margin-bottom: 10px;
}

.vip-unlock-row {
  display: flex;
  gap: 10px;
}

.vip-unlock-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.vip-unlock-row button {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5b301, #c98a00);
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.step-list {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.step-list li {
  margin-bottom: 6px;
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Members (admin) */
.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.member-item .grow {
  flex: 1;
}

.vip-active {
  color: #f5b301;
  font-weight: 700;
}

.vip-inactive {
  color: var(--text-muted);
}

.admin-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-row input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.status-paid {
  color: #28a745;
  font-weight: 700;
}

.status-pending {
  color: #ffc107;
}

/* Tier picker */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.tier-grid .pay-tab {
  border: 2px solid var(--border);
}

.tier-grid .pay-tab.active {
  background: linear-gradient(135deg, #f5b301, #c98a00);
  border-color: #f5b301;
  color: #000;
}

/* Models page */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.model-card:hover { transform: translateY(-3px); }

.model-card .model-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0b0b0b, #141414 60%, #050505);
  border-bottom: 1px solid #000;
}

.model-card .model-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) brightness(0.72) contrast(1.05);
}

.model-card .model-avatar-emoji {
  position: relative;
  font-size: 58px;
  text-shadow: 0 3px 14px rgba(0,0,0,0.9);
}

.model-card .model-info { padding: 14px; }

.model-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.model-card p {
  color: var(--text-muted);
  font-size: 13px;
  min-height: 34px;
}

.model-card .model-price {
  font-size: 13px;
  color: #f5b301;
  font-weight: 700;
  margin-bottom: 10px;
}

.model-card .btn { width: 100%; }

.model-chat-btn {
  background: linear-gradient(135deg, #f5b301, #c98a00);
  color: #000;
}

.model-chat-btn:hover { background: #f5b301; }

.chat-out {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
