/* 
========================================================================
   NEBULASTREAM GLOBAL STYLES & DESIGN SYSTEM
========================================================================
*/

/* --- Design Tokens --- */
:root {
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette (Teal Theme based on #084d48) */
  --bg-darker: #010a09;
  --bg-primary: #021110;
  --bg-secondary: #041b1a;
  --bg-card: #082826;
  --bg-card-hover: #0c3835;
  
  --accent-purple: #053632;
  --accent-magenta: #084d48;
  --accent-cyan: #0da396;
  
  --text-primary: hsl(170, 15%, 96%);
  --text-secondary: hsl(170, 10%, 75%);
  --text-muted: hsl(170, 8%, 52%);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 24px rgba(13, 163, 150, 0.35);
  
  --gradient-brand: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  --gradient-glow: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-dark: linear-gradient(to top, var(--bg-primary) 0%, rgba(2, 17, 16, 0.4) 60%, rgba(2, 17, 16, 0) 100%);
  --gradient-hero: linear-gradient(to right, var(--bg-primary) 0%, rgba(2, 17, 16, 0.8) 40%, rgba(2, 17, 16, 0) 100%);
  
  --border-glass: 1px solid rgba(255, 255, 255, 0.06);
  --border-focus: 1px solid rgba(13, 163, 150, 0.6);
  
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global Resets & Defaults --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-darker);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

/* --- Custom Scrollbar styling --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* --- Typographical Utilities --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* --- Buttons System --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  padding: 12px 24px;
  transition: all var(--transition-normal);
  font-family: var(--font-display);
}

.btn-primary {
  background: var(--gradient-brand);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: var(--border-glass);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: var(--border-glass);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  transition: all var(--transition-fast);
}

.btn-icon-only svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  stroke-width: 2.5px !important;
  display: block !important;
}

.btn-icon-only:hover {
  background: var(--gradient-brand);
  color: #ffffff !important;
  transform: scale(1.1);
  border-color: transparent;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: var(--border-radius-sm);
}

/* --- App Header / Navigation --- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  background: rgba(5, 5, 10, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: var(--border-glass);
  transition: background var(--transition-normal);
}

.app-header.scrolled {
  background: rgba(5, 5, 10, 0.9);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.logo:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px rgba(12, 140, 90, 0.6));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 1.1rem;
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width var(--transition-normal);
  border-radius: var(--border-radius-full);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Search Box Container */
.search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  border-radius: var(--border-radius-full);
  padding: 2px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  transition: width var(--transition-normal);
}

.search-box.expanded {
  width: 280px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.search-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.search-box.expanded .search-btn {
  color: var(--text-primary);
}

.search-box input {
  width: 0;
  opacity: 0;
  padding-left: 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: width var(--transition-normal), opacity var(--transition-normal);
}

.search-box.expanded input {
  width: 190px;
  opacity: 1;
}

.search-clear-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* Profile Switcher Button */
.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  transition: all var(--transition-fast);
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-avatar-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.profile-name-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* --- Main Layout --- */
.main-content {
  padding-top: 80px; /* Offset for sticky header */
  min-height: 100vh;
}

.view-section {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-slow) ease-in-out;
}

.view-section.active {
  display: block;
  opacity: 1;
}

/* --- Hero Banner Section --- */
.hero-banner {
  position: relative;
  height: 80vh;
  min-height: 550px;
  max-height: 800px;
  display: flex;
  align-items: center;
  padding: 0 4%;
  overflow: hidden;
  background-size: cover;
  background-position: center 60%;
  transition: background-image var(--transition-slow) ease-in-out;
}

/* Add subtle vignette and high-end cinema gradients */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    var(--gradient-hero),
    var(--gradient-dark),
    radial-gradient(ellipse at center, transparent 20%, rgba(5, 5, 10, 0.9) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px hsla(180, 100%, 48%, 0.4);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.hero-rating {
  color: hsl(45, 100%, 55%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.hero-rating .star-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero-age-rating {
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
}

.hero-quality {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* --- Dynamic Carousel Sliders --- */
.carousels-container {
  margin-top: -60px;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-bottom: 80px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 4%;
}

.row-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: 4px;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 16px 4px 24px; /* Room for card scaling and shadow */
  width: 100%;
}

.slider-track::-webkit-scrollbar {
  display: none; /* Hide standard scrollbar */
}

/* Navigation Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-full);
  background: rgba(10, 10, 20, 0.75);
  border: var(--border-glass);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.slider-arrow:hover {
  background: var(--gradient-brand);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-glow);
  border-color: transparent;
}

.slider-wrapper:hover .slider-arrow {
  opacity: 1;
  visibility: visible;
}

.arrow-left {
  left: -20px;
}

.arrow-right {
  right: -20px;
}

/* Media Card Component */
.media-card {
  position: relative;
  flex: 0 0 calc(20% - 13px); /* 5 cards per screen on desktop */
  min-width: 220px;
  scroll-snap-align: start;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: var(--border-glass);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transform-origin: center;
  transition: all var(--transition-normal);
}

/* Rich hover expansion */
.media-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(12, 140, 90, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-thumbnail-container {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.media-card:hover .card-thumbnail {
  transform: scale(1.08);
}

.card-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 20, 0.9) 0%, rgba(10, 10, 20, 0.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.media-card:hover .card-thumbnail-overlay {
  opacity: 1;
}

/* Fast-Action HUD inside cards */
.card-quick-actions {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 3;
}

.media-card:hover .card-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.card-play-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.card-play-btn:hover {
  transform: scale(1.1);
  background: var(--accent-cyan);
}

.card-play-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.card-watchlist-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.card-watchlist-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-rating {
  color: hsl(45, 100%, 55%);
  font-weight: 700;
}

.card-duration {
  color: var(--text-muted);
}

.card-genre {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Playback progress bar on card bottom */
.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.card-progress-fill {
  height: 100%;
  background: var(--accent-cyan);
  width: 0;
}

/* --- Search & Grid Views --- */
.search-header, .category-header, .watchlist-header {
  padding: 32px 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.search-query-title, .category-title {
  font-size: 2.2rem;
  font-weight: 800;
}

.search-filters, .category-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--gradient-brand);
  color: var(--text-primary);
  border-color: transparent;
  box-shadow: 0 0 12px rgba(12, 140, 90, 0.3);
}

.filter-select {
  padding: 8px 18px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: var(--border-glass);
  color: var(--text-primary);
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.search-results-grid, .category-grid, .watchlist-grid {
  padding: 0 4% 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.no-results, .empty-watchlist {
  text-align: center;
  padding: 120px 4% 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
}

.no-results-icon, .empty-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
}

.no-results h3, .empty-watchlist h3 {
  font-size: 1.6rem;
  color: var(--text-primary);
}

.empty-watchlist .btn {
  margin-top: 12px;
}

/* --- Details Modal Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  padding: 40px 0;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 90%;
  max-width: 850px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: var(--border-glass);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(40px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-full);
  background: rgba(0, 0, 0, 0.6);
  border: var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.modal-hero {
  position: relative;
  height: 45vh;
  min-height: 300px;
  background-size: cover;
  background-position: center 60%;
  display: flex;
  align-items: flex-end;
  padding: 36px 40px;
}

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-secondary) 0%, rgba(5, 5, 10, 0.4) 60%, transparent 100%);
}

.modal-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-cyan);
}

.modal-title {
  font-size: 2.8rem;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-info-grid {
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-info-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.modal-match-percent {
  color: hsl(140, 70%, 45%);
  font-weight: 700;
}

.modal-age-rating {
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
}

.modal-badge-hd {
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--text-muted);
  padding: 2px 4px;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
}

.modal-synopsis {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-info-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  color: var(--text-primary);
  line-height: 1.4;
}

/* Series Episodes List */
.modal-episodes-section {
  padding: 32px 40px 48px;
}

.episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.episodes-header h3 {
  font-size: 1.4rem;
}

.season-select-wrapper {
  position: relative;
}

.season-select {
  padding: 8px 36px 8px 16px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  border: var(--border-glass);
  color: var(--text-primary);
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.season-select-wrapper::after {
  content: '▼';
  font-size: 0.6rem;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Episode Item Card */
.episode-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.episode-thumb-container {
  position: relative;
  width: 150px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.episode-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: rgba(0, 0, 0, 0.7);
  border: var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
}

.episode-card:hover .episode-play-icon {
  opacity: 1;
  transform: scale(1);
}

.episode-play-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.episode-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.episode-progress-fill {
  height: 100%;
  background: var(--accent-cyan);
  width: 0%;
}

.episode-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.episode-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.episode-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.episode-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Profile Switcher Modal --- */
.profile-switcher-card {
  width: 90%;
  max-width: 550px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  border: var(--border-glass);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.profile-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.profile-avatar-container {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: all var(--transition-fast);
}

.profile-item:hover .profile-avatar-container {
  border-color: var(--text-primary);
  transform: scale(1.05);
}

.profile-item.active .profile-avatar-container {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.profile-item:hover .profile-name {
  color: var(--text-primary);
}

.profile-item.active .profile-name {
  color: var(--text-primary);
  font-weight: 700;
}

/* --- Custom Full-Screen Video Player Overlay --- */
.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-primary);
}

.player-overlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* HUD Overlay Styles */
.player-controls-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.8) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.player-overlay:hover .player-controls-hud,
.player-overlay.controls-visible .player-controls-hud {
  opacity: 1;
  pointer-events: auto;
}

.hud-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: var(--border-glass);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.hud-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.hud-btn svg {
  width: 20px;
  height: 20px;
}

/* Top Hud Bar */
.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-title-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.player-series-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.player-episode-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Autoplay Next Toggle */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-full);
  transition: background-color var(--transition-fast);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-cyan);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Middle controls (Jump 10s back/forward, big play) */
.hud-middle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 60px;
}

.hud-center-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-full);
  background: rgba(0, 0, 0, 0.5);
  border: var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.hud-center-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.hud-center-btn svg {
  width: 24px;
  height: 24px;
}

.skip-time {
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}

.hud-center-play-btn {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-full);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
}

.hud-center-play-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.hud-center-play-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Bottom Hud Timeline */
.hud-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Custom Timeline Bar */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.timeline-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: height var(--transition-fast);
}

.timeline-container:hover .timeline-bar {
  height: 10px;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--gradient-brand);
  border-radius: var(--border-radius-full);
  width: 0;
}

.timeline-buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-full);
  width: 0;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 16px;
  height: 16px;
  border-radius: var(--border-radius-full);
  background: var(--text-primary);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: transform var(--transition-fast);
  left: 0;
}

.timeline-container:hover .timeline-handle {
  transform: translate(-50%, -50%) scale(1);
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Volume Slider */
.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 0;
  opacity: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
  border-radius: var(--border-radius-full);
  transition: width var(--transition-normal), opacity var(--transition-normal);
  cursor: pointer;
}

.volume-container:hover .volume-slider,
.volume-slider:focus {
  width: 80px;
  opacity: 1;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--border-radius-full);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: var(--border-radius-full);
  background: var(--text-primary);
  margin-top: -4px;
}

/* Buttons Row */
.hud-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-buttons-left, .hud-buttons-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Speed Dropdown Menu */
.speed-container {
  position: relative;
}

.speed-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  min-width: 120px;
  box-shadow: var(--shadow-lg);
  z-index: 15;
}

.speed-option {
  padding: 8px 16px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.speed-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.speed-option.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Subtitle Dropdown Menu */
.subtitle-container {
  position: relative;
}

.subtitle-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  box-shadow: var(--shadow-lg);
  z-index: 15;
}

.subtitle-option {
  padding: 8px 16px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}

.subtitle-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.subtitle-option.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

::cue {
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Autoplay next countdown overlay */
.autoplay-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease forwards;
}

.autoplay-content {
  text-align: center;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.autoplay-next-label {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.countdown-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.countdown-seconds {
  position: absolute;
  inset: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
}

.circular-chart {
  display: block;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.8;
}

.circle {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.1s linear;
}

.autoplay-next-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.autoplay-buttons {
  display: flex;
  gap: 12px;
}

/* --- Profile Management View --- */
.profile-page-header {
  padding: 40px 4% 20px;
}

.profile-subtitle {
  color: var(--text-secondary);
  margin-top: 6px;
  font-size: 1.05rem;
}

.profile-management-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  padding: 0 4% 80px;
  align-items: start;
}

.profile-edit-card, .profile-details-card {
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.profile-edit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.profile-edit-avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

.profile-edit-avatar-wrapper:hover {
  border-color: var(--accent-purple);
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.profile-edit-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.profile-edit-avatar-wrapper:hover .avatar-edit-overlay {
  opacity: 1;
}

.profile-edit-avatar-wrapper svg {
  width: 24px;
  height: 24px;
}

.avatar-selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: var(--border-glass);
  animation: fadeIn var(--transition-fast) ease forwards;
}

.avatar-option {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.avatar-option:hover {
  transform: scale(1.08);
}

.avatar-option.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px hsla(180, 100%, 48%, 0.4);
}

.avatar-option svg {
  width: 100%;
  height: 100%;
}

.profile-input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-input-group input {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.profile-input-group input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 8px rgba(12, 140, 90, 0.3);
}

.profile-details-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 380px;
}

.profile-details-card h3 {
  font-size: 1.4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(12, 140, 90, 0.15));
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.danger-zone {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-zone h4 {
  color: hsl(0, 80%, 60%);
  font-size: 1.1rem;
}

.danger-zone p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.danger-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.danger-btn {
  border-color: rgba(239, 68, 68, 0.2);
  color: hsl(0, 70%, 75%);
}

.danger-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: hsl(0, 80%, 60%);
  color: #fff;
}

/* --- In-Player Episodes Drawer --- */
.player-episodes-drawer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(30px);
  border-left: var(--border-glass);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.player-episodes-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-header h3 {
  font-size: 1.25rem;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom small episode card inside player */
.player-ep-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.player-ep-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.player-ep-card.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px hsla(180, 100%, 48%, 0.2);
}

.player-ep-thumb-container {
  width: 100px;
  min-width: 100px;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.player-ep-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-ep-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.player-ep-progress-fill {
  height: 100%;
  background: var(--accent-cyan);
  width: 0%;
}

.player-ep-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.player-ep-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.player-ep-card.active .player-ep-title {
  color: var(--accent-cyan);
}

.player-ep-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Mobile Responsiveness Styles --- */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .app-header {
    height: 70px;
    padding: 0 5%;
  }

  .nav-links {
    display: none;
  }

  .profile-name-label {
    display: none;
  }

  .hero-banner {
    height: 60vh;
    min-height: 400px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .carousels-container {
    margin-top: -20px;
    gap: 32px;
  }

  .media-card {
    flex: 0 0 calc(50% - 8px);
    min-width: 140px;
  }
  
  .card-quick-actions {
    display: none !important;
  }

  .modal-card {
    width: 95%;
  }

  .modal-hero {
    height: 30vh;
    min-height: 200px;
    padding: 20px;
  }

  .modal-title {
    font-size: 1.8rem;
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .modal-episodes-section {
    padding: 24px;
  }

  .episode-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .episode-thumb-container {
    width: 100%;
  }

  .player-controls-hud {
    padding: 20px;
  }

  .hud-middle {
    gap: 30px;
  }

  .volume-container {
    display: none;
  }

  .profile-management-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .danger-actions {
    flex-direction: column;
    gap: 12px;
  }

  .player-episodes-drawer {
    width: 100%;
    height: 60vh;
    top: auto;
    transform: translateY(100%);
  }

  .player-episodes-drawer.active {
    transform: translateY(0);
  }
}

/* --- Fullscreen Login Screen (Now Modal Overlay) --- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(11, 7, 4, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
  padding: 40px 20px;
  transition: opacity var(--transition-normal) ease, visibility var(--transition-normal);
}

.login-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.08) 0%, rgba(11, 7, 4, 0.92) 80%);
  z-index: 1;
}

.login-card-container {
  max-width: 450px;
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.login-logo-wrapper {
  animation: float 4s ease-in-out infinite;
}

.login-logo-img {
  height: 55px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 15px rgba(14, 168, 113, 0.4));
}

.login-card {
  background: rgba(255, 255, 255, 0.03);
  border: var(--border-glass);
  backdrop-filter: blur(24px);
  border-radius: var(--border-radius-lg);
  padding: 40px 32px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.login-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.login-input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-input-group label svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5px;
}

.login-input-group input {
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-normal);
}

.login-input-group input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-magenta);
  box-shadow: 0 0 16px rgba(14, 168, 113, 0.2);
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

.password-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.remember-me input {
  cursor: pointer;
}

.forgot-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.forgot-link:hover {
  color: var(--accent-magenta);
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin: 4px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.login-divider span {
  padding: 0 10px;
}


/* --- Register & Form Toggle Transitions --- */
.auth-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity var(--transition-normal) ease;
}

.auth-toggle-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 14px;
}

.auth-toggle-link {
  color: var(--accent-magenta);
  font-weight: 600;
  transition: color var(--transition-fast) ease;
}

.auth-toggle-link:hover {
  text-decoration: underline;
  color: #0ea871;
}

/* Floating Firebase Setup Gear */
.firebase-setup-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: var(--border-glass);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal) ease;
}

.firebase-setup-btn:hover {
  color: var(--text-primary);
  background: rgba(14, 168, 113, 0.1);
  border-color: var(--accent-magenta);
  box-shadow: 0 0 15px rgba(14, 168, 113, 0.4);
}

.firebase-setup-btn:hover svg {
  transform: rotate(45deg);
}

.firebase-setup-btn svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-normal) ease;
}

/* --- Firebase Setup Modal Styles --- */
.setup-modal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity var(--transition-normal) ease, visibility var(--transition-normal);
}

.setup-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.setup-card {
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.setup-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setup-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.setup-header h3 svg {
  color: var(--accent-magenta);
  width: 20px;
  height: 20px;
}

.setup-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast) ease;
}

.setup-close-btn:hover {
  color: var(--text-primary);
}

.setup-close-btn svg {
  width: 20px;
  height: 20px;
}

.setup-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.connection-status-block {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.status-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-mock {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #fbbf24;
}

.badge-mock .pulse-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.badge-real {
  background: rgba(14, 168, 113, 0.08);
  border: 1px solid rgba(14, 168, 113, 0.25);
  color: #10b981;
}

.badge-real .pulse-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  animation: setupPulse 1.8s infinite ease-in-out;
}

@keyframes setupPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.setup-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.setup-desc strong {
  color: var(--text-primary);
}

.setup-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setup-input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.setup-input-group label svg {
  width: 14px;
  height: 14px;
}

.setup-input-group textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 14px;
  color: #34d399;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  height: 140px;
  resize: vertical;
  line-height: 1.5;
  transition: all var(--transition-normal) ease;
}

.setup-input-group textarea:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent-magenta);
  box-shadow: 0 0 16px rgba(14, 168, 113, 0.15);
  outline: none;
}

.setup-instructions {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  padding: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.setup-instructions h4 {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.setup-instructions ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

.setup-instructions a {
  color: var(--accent-magenta);
  text-decoration: underline;
}

.setup-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.setup-actions button {
  flex: 1;
}

/* --- Unified Cloud Console Modal Tabs --- */
.modal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast) ease;
  border-bottom: 2px solid transparent;
}

.modal-tab svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5px;
}

.modal-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.modal-tab.active {
  color: #10b981;
  background: rgba(14, 168, 113, 0.05);
  border-bottom-color: #10b981;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: tabFadeIn 0.3s ease forwards;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* VOD Badging Customizations */
.badge-vod-mock {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.badge-vod-mock .pulse-dot {
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

.badge-vod-real {
  background: rgba(14, 168, 113, 0.08);
  border: 1px solid rgba(14, 168, 113, 0.25);
  color: #10b981;
}

.badge-vod-real .pulse-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* ==========================================================================
   SIRAJ MARKETPLACE & MULTIVENDOR E-COMMERCE STYLES
   ========================================================================== */

/* Marketplace Main Section Container */
#marketplace-view {
  padding: 40px 4% 80px;
}

/* Header Cart Toggle Button */
.cart-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glass);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-normal) ease;
}

.cart-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.cart-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-darker);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  max-width: 100%;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(35px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-drawer-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-drawer-header .header-highlight {
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.cart-drawer-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}

.cart-drawer-close:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Empty Cart State */
.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-cart-icon {
  width: 48px;
  height: 48px;
  stroke-width: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-cart-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-cart-state p {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Cart Item Layout */
.cart-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.cart-item-vendor {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.quantity-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.qty-val {
  font-size: 0.85rem;
  font-weight: 700;
  width: 24px;
  text-align: center;
}

.cart-drawer-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtotal-amount {
  font-size: 1.25rem;
  font-weight: 900;
  color: #10b981;
}

.cart-tax-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Micro animations */
.pulse-bounce {
  animation: pulseBounce 0.4s ease-in-out;
}

@keyframes pulseBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Marketplace Views & Curated Headers */
.marketplace-hero {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  padding: 80px 60px;
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.marketplace-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 168, 113, 0.35) 0%, rgba(10, 11, 14, 0.95) 100%);
  z-index: 1;
}

.marketplace-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.marketplace-pretitle {
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.marketplace-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
  background: linear-gradient(to right, #fff 40%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.marketplace-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
}

.marketplace-hero-stats {
  display: flex;
  gap: 40px;
}

.m-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.m-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Marketplace Tab Navigation */
.marketplace-tabs-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 32px;
}

.marketplace-tabs {
  display: flex;
  gap: 30px;
}

.m-tab-btn {
  background: none;
  border: none;
  padding: 16px 4px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast) ease;
  border-bottom: 2px solid transparent;
}

.m-tab-btn svg {
  width: 16px;
  height: 16px;
}

.m-tab-btn:hover {
  color: var(--text-primary);
}

.m-tab-btn.active {
  color: #10b981;
  border-bottom-color: #10b981;
}

/* Shop Filters Layout */
.shop-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}

.tag-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.tag-btn.active {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.vendor-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vendor-filter-wrapper svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.vendor-dropdown {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.vendor-dropdown option {
  background: var(--bg-darker);
  color: var(--text-primary);
}

/* Products Grid Layout */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* Shopify-style glassmorphic product cards */
.product-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal) ease;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.product-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.badge-merchandise {
  background: #a855f7;
  color: #fff;
}

.badge-halal {
  background: #06b6d4;
  color: #fff;
}

.badge-sunnah {
  background: #10b981;
  color: #fff;
}

.badge-placement {
  background: #f59e0b;
  color: #fff;
}

/* Seen in Movie integration badge */
.movie-link-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 30%, rgba(0,0,0,0.4) 100%);
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 2;
  transform: translateY(100%);
  transition: transform var(--transition-normal) ease;
}

.product-card:hover .movie-link-badge {
  transform: translateY(0);
}

.movie-link-badge:hover {
  color: var(--accent-cyan);
}

.movie-link-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
}

.product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-vendor {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.product-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.product-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
}

/* Empty states */
.empty-shop-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.empty-shop-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-shop-state h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-shop-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Multivendor Seller Console Layout */
.seller-console-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
}

.seller-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-glass);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.seller-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.seller-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.flex-1 {
  flex: 1;
}

.seller-form label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.seller-form input,
.seller-form select,
.seller-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast) ease;
}

.seller-form input:focus,
.seller-form select:focus,
.seller-form textarea:focus {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.seller-form select option {
  background: var(--bg-darker);
  color: var(--text-primary);
}

.input-helper {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Seller Profile details display */
.seller-profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.v-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
}

.v-avatar svg {
  width: 24px;
  height: 24px;
}

.v-meta h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #10b981;
  margin-top: 2px;
}

.v-badge svg {
  width: 12px;
  height: 12px;
}

.v-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.v-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.v-stats-bar {
  display: flex;
  gap: 20px;
}

.v-s-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.v-s-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-cyan);
}

.v-s-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
}

.register-store-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.seller-card-header {
  text-align: center;
}

.seller-icon-badge {
  width: 48px;
  height: 48px;
  color: #10b981;
  margin-bottom: 16px;
}

.seller-card-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.seller-card-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.seller-info-banner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.seller-info-banner h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.benefit-box {
  display: flex;
  gap: 16px;
}

.benefit-box .b-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  min-width: 40px;
}

.benefit-box .b-txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.benefit-box .b-txt strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.benefit-box .b-txt span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Minimal Paper Checkout Receipt simulation */
.checkout-success-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.receipt-card {
  background: #fff;
  color: #111;
  width: 100%;
  max-width: 400px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.receipt-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.success-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-full);
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  margin-bottom: 16px;
}

.success-check-icon {
  width: 32px;
  height: 32px;
}

.receipt-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.receipt-header p {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

.receipt-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-divider {
  border-top: 1px dashed #ccc;
  margin: 6px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.font-sm {
  font-size: 0.78rem;
}

.opacity-70 {
  color: #555;
}

.font-mono {
  font-family: monospace;
  font-weight: 700;
}

.receipt-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px 0;
}

.receipt-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: #10b981;
}

.receipt-footer-text {
  font-size: 0.72rem;
  color: #777;
  text-align: center;
  line-height: 1.4;
  margin-top: 10px;
}

.receipt-actions {
  margin-top: 24px;
}

.receipt-actions .btn-primary {
  background: #111;
  color: #fff;
  border: none;
}

.receipt-actions .btn-primary:hover {
  background: #10b981;
}

/* Spinner Custom */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: setupSpin 0.8s infinite linear;
}

@keyframes setupSpin {
  to { transform: rotate(360deg); }
}

/* Responsiveness overrides for Marketplace */
@media (max-width: 900px) {
  .seller-console-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .marketplace-hero {
    padding: 40px 24px;
  }
  .marketplace-title {
    font-size: 2.2rem;
  }
  .marketplace-hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .shop-filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   PRODUCT DETAIL POPUP/MODAL STYLES (Shopify Premium Glassmorphism)
   ========================================================================== */
.prod-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.prod-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.prod-modal-content {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.prod-modal-backdrop.active .prod-modal-content {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbar for Modal Content */
.prod-modal-content::-webkit-scrollbar {
  width: 6px;
}
.prod-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.prod-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.prod-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: rotate(90deg);
}

/* Gallery Column */
.prod-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prod-main-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.3);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.prod-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease, transform 0.5s ease;
}

.prod-main-img-wrap:hover .prod-main-img {
  transform: scale(1.05);
}

.prod-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}

.prod-thumbnails::-webkit-scrollbar {
  display: none;
}

.prod-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.5;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.prod-thumb.active {
  opacity: 1;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.prod-thumb:hover:not(.active) {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Info Column */
.prod-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
}

.prod-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.prod-badge-wrap .product-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prod-modal-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.prod-modal-vendor {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prod-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.prod-stars {
  color: #fbbf24;
  display: flex;
  gap: 2px;
  font-size: 0.95rem;
}

.prod-modal-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prod-modal-price::after {
  content: "Harga Bersih";
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.prod-modal-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
  margin: 0;
}

/* Specifications Grid */
.prod-specs {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.03);
}

.prod-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.prod-spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.prod-spec-label {
  color: rgba(255, 255, 255, 0.4);
}

.prod-spec-value {
  color: #fff;
  font-weight: 600;
}

/* Seen in Movie Section inside Modal */
.prod-modal-movie-badge {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.prod-modal-movie-badge:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

.prod-movie-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prod-movie-info i {
  color: var(--color-primary);
  font-size: 1.3rem;
}

.prod-movie-text {
  display: flex;
  flex-direction: column;
}

.prod-movie-text span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  font-weight: 600;
}

.prod-movie-text strong {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
}

.prod-movie-action {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Modal Bottom Actions Row */
.prod-modal-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 10px;
}

.prod-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prod-qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.prod-qty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.prod-qty-input {
  width: 48px;
  height: 44px;
  text-align: center;
  background: none;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  -moz-appearance: textfield;
}

.prod-qty-input::-webkit-outer-spin-button,
.prod-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-large-buy {
  flex: 1;
  height: 46px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #059669 100%);
  border: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-large-buy:hover {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-large-buy:active {
  transform: translateY(0);
}

/* Modal Responsive Adaptations */
@media (max-width: 820px) {
  .prod-modal-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 24px;
    max-height: 85vh;
  }
  
  .prod-modal-title {
    font-size: 1.7rem;
  }
}

/* ==========================================================================
   NEOMART-STYLE SIRAJ BAZAAR LAYOUT STYLES
   ========================================================================== */
.marketplace-hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.marketplace-hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.marketplace-hero-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marketplace-hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0;
}

.btn-pill-white {
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pill-white:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.btn-pill-white:active {
  transform: translateY(0);
}

/* Categories Grid */
.marketplace-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.category-card {
  position: relative;
  height: 125px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 20, 20, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.category-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.85);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.3s ease;
}

.category-card-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  text-align: center;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease;
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
  transform: translateY(-3px);
}

.category-card:hover .category-card-img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(0.48) saturate(1.15);
}

.category-card:hover .category-card-title {
  transform: scale(1.05);
  color: var(--color-primary);
}

/* Features Info Bar */
.marketplace-features-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 50px 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 35px;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 15px 35px rgba(0, 0, 0, 0.15);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.45rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover .feature-icon-wrap {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  transform: scale(1.06);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.feature-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  margin: 0;
}

/* Split Collections Grid (Masonry Block curated collections) */
.split-collections-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 30px;
  margin: 60px 0;
}

.collection-tall-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  height: 480px;
  display: flex;
  align-items: flex-end;
  padding: 45px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-tall-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-tall-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.collection-tall-card-content h3 {
  font-size: 1.95rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.collection-tall-card-content p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin: 0;
}

.collection-tall-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.5);
}

.collection-tall-card:hover .collection-tall-card-img {
  transform: scale(1.04);
  filter: brightness(0.42);
}

.collection-small-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.collection-small-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  height: 228px;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-small-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collection-small-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

.collection-small-card-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.2px;
}

.collection-small-card-content p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.collection-small-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.collection-small-card:hover .collection-small-card-img {
  transform: scale(1.05);
  filter: brightness(0.38);
}

.collection-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1.5px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.collection-link:hover {
  border-color: var(--color-primary);
  color: #fff;
  gap: 6px;
}

/* Sections Shelf Header (Comfort Header) */
.shop-section-header {
  margin-top: 60px;
  margin-bottom: 30px;
  border-left: 4px solid var(--color-primary);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.3px;
}

.shop-section-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Wishlist heart overlay button inside card */
.wishlist-btn-heart {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.wishlist-btn-heart:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
  transform: scale(1.1);
}

.wishlist-btn-heart.active {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Responsiveness adaptation overrides for split categories and collections */
@media (max-width: 900px) {
  .marketplace-hero-split {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .marketplace-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .marketplace-features-bar {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }
  
  .split-collections-grid {
    grid-template-columns: 1fr;
  }
  
  .collection-tall-card {
    height: 350px;
  }
}

@media (max-width: 600px) {
  .collection-small-grid {
    grid-template-columns: 1fr;
  }
  
  .collection-small-card {
    height: 180px;
  }
}

/* --- Login Modal Close Button --- */
.login-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast) ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.login-modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(90deg);
}

.login-modal-close-btn:active {
  transform: scale(0.9) rotate(90deg);
}

/* --- Premium Landing Portal (Portal Utama) --- */
.landing-portal {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0b0603;
  color: #fff;
  overflow-y: auto;
  box-sizing: border-box;
  font-family: var(--font-body);
  z-index: 100;
}

/* Volumetric Light Beams (Sun Rays) */
.portal-bg-flare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(13, 163, 150, 0.25) 0%, rgba(4, 27, 26, 0.25) 50%, rgba(1, 10, 9, 0) 80%);
  z-index: 1;
  pointer-events: none;
  animation: lightFlare 8s ease-in-out infinite alternate;
}

.portal-bg-flare::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    65deg,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 60px,
    rgba(13, 163, 150, 0.03) 75px,
    rgba(13, 163, 150, 0.06) 85px,
    rgba(13, 163, 150, 0.03) 95px,
    rgba(255, 255, 255, 0) 110px
  );
  opacity: 0.85;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes lightFlare {
  0% { opacity: 0.85; transform: scaleY(0.95); }
  100% { opacity: 1; transform: scaleY(1.05); }
}

/* Starry Sky Overlay */
.portal-stars {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 40px 60px, #fff, rgba(0,0,0,0)), 
    radial-gradient(1.2px 1.2px at 180px 220px, rgba(255,255,255,0.85), rgba(0,0,0,0)), 
    radial-gradient(1.5px 1.5px at 380px 140px, #fff, rgba(0,0,0,0)), 
    radial-gradient(1px 1px at 580px 340px, rgba(255,255,255,0.6), rgba(0,0,0,0)), 
    radial-gradient(2px 2px at 780px 240px, #fff, rgba(0,0,0,0)), 
    radial-gradient(1px 1px at 980px 420px, #fff, rgba(0,0,0,0)), 
    radial-gradient(1.5px 1.5px at 1180px 180px, rgba(255,255,255,0.9), rgba(0,0,0,0)), 
    radial-gradient(1.2px 1.2px at 1380px 380px, #fff, rgba(0,0,0,0));
  background-size: 600px 600px;
  opacity: 0.28;
  z-index: 1;
  pointer-events: none;
}

/* Islamic Geometric Corner Motifs */
.portal-decoration {
  position: absolute;
  width: 280px;
  height: 280px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120' fill='none' stroke='%230da396' stroke-width='0.5' stroke-opacity='0.15'%3E%3Cpath d='M60 0 L77.5 42.5 L120 60 L77.5 77.5 L60 120 L42.5 77.5 L0 60 L42.5 42.5 Z'/%3E%3Cpath d='M60 15 L72.7 47.3 L105 60 L72.7 72.7 L60 105 L47.3 72.7 L15 60 L47.3 47.3 Z'/%3E%3Cpath d='M60 30 L67.8 52.2 L90 60 L67.8 67.8 L60 90 L52.2 67.8 L30 60 L52.2 52.2 Z'/%3E%3Ccircle cx='60' cy='60' r='8'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Cpath d='M0 0 L120 120 M120 0 L0 120 M60 0 V120 M0 60 H120' stroke-opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
}

.decoration-top-left {
  top: -40px;
  left: -40px;
  background-position: top left;
}

.decoration-top-right {
  top: -40px;
  right: -40px;
  background-position: top right;
  transform: rotate(90deg);
}

.decoration-bottom-left {
  bottom: -40px;
  left: -40px;
  background-position: bottom left;
  transform: rotate(270deg);
}

.decoration-bottom-right {
  bottom: -40px;
  right: -40px;
  background-position: bottom right;
  transform: rotate(180deg);
}

/* Navbar */
.portal-header {
  height: 90px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6%;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.portal-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(13, 163, 150, 0.35));
}

.portal-logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portal-header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Gold Gradient Button Style */
.btn-portal-gold {
  background: linear-gradient(135deg, #084d48 0%, #0da396 50%, #084d48 100%);
  background-size: 200% auto;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 26px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(13, 163, 150, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.btn-portal-gold:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 163, 150, 0.45);
  filter: brightness(1.08);
}

.btn-portal-gold:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(13, 163, 150, 0.2);
}

/* Glassmorphic Action Button Style */
.btn-portal-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-portal-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-portal-glass:active {
  transform: translateY(0);
}

/* Center Hero Section */
.portal-hero-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px 80px 20px;
  z-index: 10;
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  box-sizing: border-box;
}

.portal-hero-logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  animation: floatHero 5s ease-in-out infinite;
}

.portal-hero-logo {
  height: 110px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(13, 163, 150, 0.35));
}

.portal-hero-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 7px;
  color: #fff;
  margin-top: 14px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.portal-hero-tagline {
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portal-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 44px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-portal-gold.btn-large {
  font-size: 1.1rem;
  padding: 16px 48px;
  border-radius: 8px;
  letter-spacing: 1.5px;
  font-weight: 800;
  box-shadow: 0 8px 30px rgba(13, 163, 150, 0.35);
}

.portal-hero-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.portal-hero-footer-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.portal-register-link {
  color: #0da396;
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 163, 150, 0.4);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  padding-bottom: 1px;
}

.portal-register-link:hover {
  color: #fff;
  border-bottom-color: #fff;
}

@keyframes floatHero {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .portal-header {
    height: 80px;
    padding: 0 5%;
  }
  .portal-logo-text {
    font-size: 1.4rem;
  }
  .portal-logo-img {
    height: 32px;
  }
  .portal-hero-title {
    font-size: 2.6rem;
  }
  .portal-hero-tagline {
    font-size: 1.4rem;
  }
  .portal-hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 35px;
  }
  .btn-portal-gold.btn-large {
    font-size: 1rem;
    padding: 14px 38px;
  }
  .portal-decoration {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .portal-header-actions {
    gap: 8px;
  }
  .btn-portal-glass {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .btn-portal-gold {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
  .portal-hero-title {
    font-size: 2.2rem;
    letter-spacing: 4px;
  }
  .portal-hero-tagline {
    font-size: 1.2rem;
  }
  .portal-hero-subtitle {
    font-size: 0.85rem;
    line-height: 1.5;
  }
}



