/* ==========================================================================
   D-hub Dark Luxury Media Platform - Design System & Responsive Upgrades
   ========================================================================== */

:root {
  --bg-main: #090a10;
  --bg-secondary: #121420;
  --panel-bg: rgba(20, 23, 38, 0.7);
  --panel-border: rgba(255, 255, 255, 0.12);
  --panel-glow: rgba(224, 169, 109, 0.15);

  --accent-gold: #e0a96d;
  --accent-gold-hover: #f4c085;
  --accent-magenta: #ff007f;
  --accent-cyan: #00f0ff;
  --accent-green: #06d6a0;

  --text-main: #f8f9fa;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body, html {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10000;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-gold);
  color: #111;
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 3px;
}

.hidden, .d-none {
  display: none !important;
}

.max-w-1200 {
  max-width: 1200px;
}

/* ==========================================================================
   Futuristic Page Preloader
   ========================================================================== */
.preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #06070b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preloader-logo-ring {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(224, 169, 109, 0.2);
  border-top-color: var(--accent-gold);
  border-right-color: var(--accent-magenta);
  animation: spin 1.2s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-logo-mark {
  width: 68px;
  height: 68px;
  object-fit: contain;
  animation: pulse-glow 1.5s ease-in-out infinite alternate;
}

.preloader-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preloader-subtext {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  from { opacity: 0.7; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

/* ==========================================================================
   Glassmorphism Container & Components
   ========================================================================== */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(224, 169, 109, 0.3);
}

.text-dim { color: var(--text-dim) !important; }
.font-bold { font-weight: 700; }

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #c98845) !important;
  color: #000 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(224, 169, 109, 0.3);
  transition: var(--transition-smooth);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 169, 109, 0.5);
  background: linear-gradient(135deg, var(--accent-gold-hover), #d89854) !important;
}

.btn-telegram {
  color: #06171d !important;
  border: 1px solid rgba(0, 240, 255, 0.65) !important;
  background: linear-gradient(135deg, #2aabee, var(--accent-cyan)) !important;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.2);
  transition: var(--transition-smooth);
}

.btn-telegram:hover {
  color: #020a0d !important;
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(0, 240, 255, 0.35);
}

.telegram-service {
  max-width: 360px;
}

/* Badges */
.badge {
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-cyan { background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 240, 255, 0.3); }
.badge-magenta { background: rgba(255, 0, 127, 0.15); color: var(--accent-magenta); border: 1px solid rgba(255, 0, 127, 0.3); }
.badge-gold { background: rgba(224, 169, 109, 0.2); color: var(--accent-gold); border: 1px solid rgba(224, 169, 109, 0.4); }

/* Top Navbar Header */
header.app-header {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 16, 0.88);
  backdrop-filter: blur(15px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-tag {
  font-size: 0.65rem;
  background: rgba(224, 169, 109, 0.15);
  color: var(--accent-gold);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(224, 169, 109, 0.3);
  font-weight: 700;
  margin-left: 0.5rem;
}

/* Profile Header Section */
.profile-cover {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--bg-secondary) 100%);
}

.profile-details-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -50px;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}

.profile-avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--bg-main);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.avatar-wrapper {
  position: relative;
}

.online-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 3px solid var(--bg-main);
  position: absolute;
  bottom: 6px;
  right: 6px;
}

.verified-icon {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.profile-stats-row {
  display: flex;
  background: rgba(10, 12, 20, 0.6);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Feed Filter Tabs */
.feed-filter-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.feed-filter-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.feed-filter-tab.active {
  background: rgba(224, 169, 109, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(224, 169, 109, 0.4);
}

/* Media Cards Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.media-card {
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.media-card:focus-visible {
  border-color: var(--accent-cyan);
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--panel-glow);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-card:hover .card-thumb {
  transform: scale(1.05);
}

.blur-preview {
  filter: blur(14px) brightness(0.6);
  transform: scale(1.1);
}

.media-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
}

/* Locked Paywall Overlay */
.locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(10, 10, 18, 0.4);
}

.lock-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(224, 169, 109, 0.8));
}

.lock-price-tag {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.card-info {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Modals & Ultra-Luxury Paywall Design
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 6, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
}

/* Paywall Modal Specific Dialog */
.paywall-dialog {
  max-width: 500px;
  background: rgba(16, 18, 30, 0.92);
  border: 1px solid rgba(224, 169, 109, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(224, 169, 109, 0.15);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  animation: modal-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-scale-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.paywall-close-circle {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.paywall-close-circle:hover {
  background: rgba(255, 0, 127, 0.2);
  color: #fff;
  border-color: var(--accent-magenta);
}

.paywall-item-card-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(10, 12, 22, 0.8);
  padding: 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.paywall-thumb-compact {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.paywall-price-badge {
  background: linear-gradient(135deg, rgba(224, 169, 109, 0.25), rgba(224, 169, 109, 0.1));
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Segmented Gateway Tabs */
.segmented-nav {
  display: flex;
  background: rgba(10, 12, 20, 0.8);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.segmented-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.55rem 0.5rem;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.segmented-tab.active {
  background: linear-gradient(135deg, var(--accent-gold), #c98845);
  color: #000;
  box-shadow: 0 4px 12px rgba(224, 169, 109, 0.4);
}

.crypto-qr-container {
  background: rgba(10, 12, 22, 0.85);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
}

/* ==========================================================================
   Mobile Bottom Navigation Bar (Mobile Devices)
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(9, 10, 16, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-around;
  padding: 0.4rem 0;
}

.mobile-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav-btn.active {
  color: var(--accent-gold);
}

.mobile-nav-btn .nav-icon {
  font-size: 1.2rem;
}

@media (max-width: 576px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
  .profile-cover {
    height: 150px;
  }
  .profile-avatar-img {
    width: 85px;
    height: 85px;
  }
  .profile-details-wrapper {
    margin-top: -40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
