/* ============================================
   Swipey.ai - Stylesheet
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Remove blue focus outlines on click, keep for keyboard nav */
*:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
*:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}
button, a, [role="button"], video, .video-player, input, textarea, select, div[onclick], [tabindex] {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

a, button, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-primary: #000000;
  --bg-secondary: #0d0d0d;
  --bg-sidebar: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --bg-input: #1a1a1a;
  --bg-tabbar: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #666666;
  --pink: #e84393;
  --pink-hover: #d63384;
  --pink-light: #fd79a8;
  --border: #1e1e1e;
  --border-light: #2a2a2a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 100px;
  --sidebar-width: 200px;
  --sidebar-width-mobile: 340px;
  --tabbar-height: 56px;
  --header-height: 50px;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   Header (always visible, both mobile & desktop)
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-primary);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

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

.hamburger-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 6px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.hamburger-btn svg {
  width: 22px;
  height: 22px;
}

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

.logo-text svg {
  display: block;
  width: 80px;
  height: auto;
}
@media (min-width: 769px) {
  .logo-text svg {
    width: 110px;
  }
}

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

.btn-login {
  padding: 4px 14px;
  border: 1px solid var(--pink);
  background: transparent;
  color: var(--pink);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  line-height: 1;
}

.btn-login:hover {
  background: rgba(232, 67, 147, 0.1);
}

.btn-join {
  padding: 4px 14px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  line-height: 1;
}

.btn-join:hover {
  background: var(--pink-hover);
}

/* ============================================
   Sidebar Overlay (mobile only)
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 250;
}

.sidebar-overlay.active {
  display: block;
}

/* ============================================
   Sidebar - visible on desktop, hidden on mobile
   ============================================ */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 12px 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* Desktop: sidebar always visible by default */
/* When collapsed via hamburger on desktop, hide it */
.sidebar.collapsed {
  transform: translateX(-100%);
}

.main-content.sidebar-collapsed {
  margin-left: 0;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--bg-card);
}

.sidebar-nav a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.sidebar-upgrade {
  padding: 8px 12px;
}

.sidebar-upgrade .btn-upgrade {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--pink), #c471ed);
  color: white;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sidebar-upgrade .btn-upgrade:hover {
  opacity: 0.9;
}

.sidebar-bottom {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-bottom a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.sidebar-bottom a:hover {
  background: var(--bg-card);
}

.sidebar-bottom a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 16px 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-footer a {
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================
   Mobile Bottom Tab Bar
   ============================================ */
.tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-height);
  background: var(--bg-tabbar);
  border-top: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  font-size: 10px;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  transition: color 0.2s;
}

.tabbar a.active {
  color: var(--pink);
}

.tabbar a svg {
  width: 22px;
  height: 22px;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  min-height: 100vh;
  padding-top: var(--header-height);
  margin-left: 0;
}

.content-area {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* ============================================
   Video Player / Stream Section
   ============================================ */
.stream-section {
  margin-bottom: 16px;
}

.stream-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  cursor: pointer;
}

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

/* Big center play overlay */
.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(232, 67, 147, 0.85);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.3s;
  z-index: 10;
}

.video-play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay svg {
  width: 28px;
  height: 28px;
  fill: white;
  margin-left: 4px;
}

.video-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Custom controls bar */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 24px 12px 10px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 15;
}

.video-player:hover .video-controls,
.video-player.playing .video-controls,
.video-player.controls-visible .video-controls {
  opacity: 1;
}

.video-player.playing:not(:hover) .video-controls {
  opacity: 0;
}

/* Progress bar */
.video-progress {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: height 0.15s;
}

.video-progress:hover {
  height: 6px;
}

.video-progress-filled {
  height: 100%;
  background: var(--pink);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.video-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: var(--pink);
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s;
  pointer-events: none;
}

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

/* Controls row */
.video-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-controls-left,
.video-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc-btn {
  background: none;
  border: none;
  color: white;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.vc-btn:hover {
  opacity: 1;
}

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

.vc-time {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* Duration badge on video cards */
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

/* ============================================
   Companion Info Bar
   ============================================ */
.companion-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.companion-bar:hover {
  background: var(--bg-card-hover);
}

.companion-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
  flex-shrink: 0;
}

.companion-info {
  flex: 1;
}

.companion-name {
  font-size: 15px;
  font-weight: 700;
}

.companion-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.companion-likes .heart {
  color: var(--pink);
}

.companion-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover {
  background: var(--bg-card-hover);
}

.btn-action.primary {
  background: var(--pink);
  border-color: var(--pink);
  color: white;
}

.btn-action.primary:hover {
  background: var(--pink-hover);
}

/* ============================================
   Create Your Own Section
   ============================================ */
.create-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.create-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  transition: transform 0.3s;
}

.create-card:hover {
  transform: scale(1.02);
}

.create-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.create-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* ============================================
   Watch Next / Video Grid
   ============================================ */
.watch-section {
  margin-bottom: 32px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.video-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.video-card:hover {
  transform: translateY(-2px);
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  overflow: hidden;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.75);
  border-radius: 4px;
  font-size: 11px;
  color: white;
  font-weight: 500;
}

.video-card-title {
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ============================================
   Promo Banner
   ============================================ */
.promo-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 20px;
  background: radial-gradient(circle, #db2777 0%, #be185d 50%, #831843 100%);
  border: 2px solid #f472b6;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  cursor: pointer;
}

.promo-banner .promo-discount {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.promo-banner .promo-text {
  font-size: 16px;
  font-weight: 700;
  color: #f9a8d4;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.promo-banner .btn-promo {
  padding: 10px 28px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.promo-banner .btn-promo:hover {
  background: var(--pink-hover);
}

/* ============================================
   Show More Button
   ============================================ */
.btn-show-more {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  margin-bottom: 24px;
  transition: background 0.2s;
}

.btn-show-more:hover {
  background: var(--bg-card);
}

/* ============================================
   Category Tags
   ============================================ */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

.category-tag {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
}

.category-tag:hover {
  background: var(--bg-card);
  border-color: var(--pink);
  color: var(--pink);
}

/* ============================================
   Placeholder Images
   ============================================ */
.placeholder-thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a1a3e, #3d1f4e);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Footer
   ============================================ */
.page-footer {
  padding: 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.page-footer p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.page-footer a {
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width-mobile);
    transform: translateX(-100%);
    z-index: 300;
    padding-top: 12px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .tabbar {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: var(--tabbar-height);
  }

  .content-area {
    padding: 12px 12px;
  }

  .stream-title {
    font-size: 16px;
  }

  .video-play-btn {
    width: 52px;
    height: 52px;
  }

  .video-play-btn svg {
    width: 22px;
    height: 22px;
  }

  .companion-actions {
    flex-wrap: nowrap;
  }

  .btn-action {
    padding: 8px 16px;
    font-size: 12px;
  }

  .hide-mobile {
    display: none !important;
  }

  .section-title {
    font-size: 18px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video-card-title {
    font-size: 14px;
    padding: 8px 2px;
  }
}

@media (max-width: 480px) {
  .companion-bar {
    flex-wrap: wrap;
  }

  .companion-actions {
    width: 100%;
  }

  .btn-action {
    flex: 1;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
  }

  .btn-action.primary {
    flex: 2;
  }
}
