/* Dokimake Clean Premium Design Tokens */
:root {
  --bg-page: #F8F7F5;
  --bg-card: #FFFFFF;
  --text-main: #202124;
  --text-muted: #909090;

  /* Dokimake Palette */
  --dokimake-blue: #2E6EF5;
  --dokimake-blue-hover: #1A56D4;
  --dokimake-yellow: #F8D481;
  --dokimake-yellow-hover: #F1D07C;
  --dokimake-red: #D3513E;
  --border-color: #E4E4E4;

  --font-heading: 'IBM Plex Sans', sans-serif;
  --font-body: 'Roboto', 'Inter', sans-serif;

  --radius-card: 10px;
  --radius-btn: 4px;
  --transition: all 0.2s ease-in-out;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Screen Reader Only Utility for SEO */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a {
  color: var(--dokimake-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  z-index: 200;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1085px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
}

.nav-logo-link:hover {
  text-decoration: none;
}

.group-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--border-color);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.nav-logo-link:hover .group-logo {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 4px 12px rgba(46, 110, 245, 0.2);
}

.group-name {
  white-space: nowrap;
}

.btn-login {
  background-color: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-login:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

/* --- Main Layout --- */
.main-wrapper {
  padding-top: 64px;
  /* Offset navbar */
  min-height: 100vh;
}

.content-container {
  width: 100%;
  max-width: 1085px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  grid-template-columns: 1fr 273px;
  gap: 32px;
  align-items: start;
}

/* Common Card Style */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px 18px 20px 18px;
}

/* --- Left Column: Main Info --- */
.left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.main-title {
  font-family: var(--font-body);
  font-size: 23px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* Media Player & Gallery */
.media-viewer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.media-active-viewport {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background-color: #000000;
  transition: aspect-ratio 0.3s ease, max-width 0.3s ease;
}



.media-active-viewport:not(.is-video) .custom-play-overlay,
.media-active-viewport:not(.is-video) .custom-control-bar {
  display: none !important;
}

.media-player-frame,
.media-player-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.media-player-frame {
  object-fit: contain;
}

.media-player-img {
  object-fit: cover;
}

/* --- Premium Custom Video Player --- */
.custom-player-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Play Overlay */
.custom-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.play-overlay-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.play-overlay-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.custom-play-overlay:hover .play-overlay-circle {
  transform: scale(1.08);
  background-color: rgba(0, 0, 0, 0.85);
  color: #e4a511;
}

/* Control Bar */
.custom-control-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 15;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(0);
}

.custom-control-bar.controls-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* Button & Icon style */
.player-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.player-btn:hover {
  color: #e4a511;
  background-color: rgba(255, 255, 255, 0.1);
}

.player-time {
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-body);
  white-space: nowrap;
}

/* Timeline */
.player-timeline-wrapper {
  position: relative;
  flex-grow: 1;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-timeline {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
  position: relative;
  z-index: 2;
}

.player-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e4a511;
  cursor: pointer;
  transition: transform 0.1s ease;
  border: none;
}

.player-timeline::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.player-timeline-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #e4a511;
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
  width: 0%;
}

/* Volume control */
.player-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: none;
}

.player-volume-slider::-webkit-slider-thumb:hover {
  background: #e4a511;
}


.gallery-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
  /* WebKit */
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 4px 2px;
}

.thumbnail-btn {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

.thumbnail-btn:hover {
  transform: scale(1.06);
}

.thumbnail-btn:active {
  transform: scale(0.95);
}

/* Active Thumbnail Outline border styling matching Dokimake */
.thumbnail-btn.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid var(--text-main);
  border-radius: 10px;
  pointer-events: none;
}

.thumb-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  pointer-events: none;
}

.play-icon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 10px;
}

/* Metadata row */
.group-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-main);
}

.meta-owner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.owner-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.owner-name {
  color: var(--text-main);
}

.owner-name:hover {
  text-decoration: none;
}

.badges {
  margin-left: 2px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

/* Rich Description Content styling */
.about-description-content {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-main);
}

.description-videos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.desc-video-label {
  margin: 8px 0 4px;
  font-weight: 600;
  font-size: 15px;
  color: #202124;
}

.desc-video-label:first-child {
  margin-top: 0;
}

.desc-video {
  width: 100%;
  border-radius: 10px;
  display: block;
  background: #000;
}

.about-description-content p {
  margin-bottom: 8px;
}

.about-description-content h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: bold;
  margin-top: 16px;
  margin-bottom: 8px;
}

.about-description-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 8px;
}

.about-description-content ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.about-description-content ul li .feature-icon-blue {
  flex-shrink: 0;
  margin-right: 8px;
  margin-top: 3px;
  color: var(--dokimake-blue);
}

.about-description-content ul li .feature-emoji {
  flex-shrink: 0;
  margin-right: 8px;
  width: 16px;
  text-align: center;
  display: inline-block;
}

.highlight-box {
  margin-bottom: 4px !important;
}

.red-bold {
  color: var(--dokimake-red);
  font-weight: bold;
}

.footer-cta {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 4px !important;
}

.footer-cta-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px !important;
}

.privacy-terms-row {
  margin-top: 16px;
  padding-left: 18px;
}

.privacy-link {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Right Column: Sidebar --- */
.sticky-sidebar {
  position: sticky;
  top: 96px;
  /* navbar (64px) + gap */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  padding: 0;
  overflow: hidden;
}

.sidebar-cover {
  width: 100%;
  height: 144px;
  background-size: cover;
  background-position: center;
  background-color: var(--border-color);
}

.sidebar-body {
  padding: 16px;
}

.sidebar-group-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sidebar-group-url {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-muted);
  margin-bottom: 12px;
  word-break: break-all;
}

.sidebar-group-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 16px;
}

/* Stats panel */
.sidebar-stats {
  display: flex;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  margin-bottom: 16px;
}

.sidebar-stats>* {
  flex: 1 1 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px 0;
}

.stat-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-main);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* CTA join button */
.btn-join-group {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background-color: var(--dokimake-yellow);
  color: var(--text-main);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.32), 0px 2px 6px rgba(60, 64, 67, 0.15), 0px 1px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-join-group:hover {
  background-color: var(--dokimake-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0px 4px 12px rgba(248, 212, 129, 0.4);
}

.btn-join-group:active {
  transform: translateY(0);
  box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.32);
}

.inline-join-btn {
  display: none;
}


/* --- Stripe Modal Overlay (Drawer / Centered Card) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  /* Mobile bottom drawer */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background-color: #ffffff;
  color: #111827;
  border-top: 3px solid var(--dokimake-yellow);
  border-radius: 12px 12px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.2s cubic-bezier(0.32, 0.94, 0.6, 1);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.checkout-product-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-preview-box {
  width: 44px;
  height: 44px;
  background: #F8F7F5;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-emoji {
  font-size: 1.4rem;
}

.checkout-product-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.checkout-product-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.close-button {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.close-button:hover {
  color: #111827;
}

/* Stripe form components */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: #6b7280;
  font-size: 0.85rem;
  gap: 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3.5px solid #f3f4f6;
  border-radius: 50%;
  border-top-color: var(--dokimake-blue);
  animation: spin 0.8s linear infinite;
}

.form-group {
  margin-bottom: 16px;
}

.price-line {
  display: flex;
  align-items: baseline;
  margin-bottom: 18px;
  margin-top: 4px;
}

.price-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b7280;
}

.price-dots {
  flex-grow: 1;
  border-bottom: 1.5px dotted #e5e7eb;
  margin: 0 8px;
  height: 4px;
}

.price-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

/* Email field — matches Stripe Elements appearance */
.checkout-field-group {
  margin-bottom: 16px;
}

.checkout-field-label {
  display: block;
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.checkout-email-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.2px solid #E4E4E4;
  border-radius: 4px;
  padding: 16px 14px;
  font-size: 1rem;
  font-family: Roboto, system-ui, -apple-system, sans-serif;
  color: #202124;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-email-input:focus {
  border-color: #E4A511;
  box-shadow: 0 0 10px rgba(228, 165, 17, 0.25);
}

.checkout-email-input::placeholder {
  color: #9ca3af;
}

/* Payment status message */
.payment-message {
  font-size: 0.85rem;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.payment-message.error {
  color: #D3513E;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.payment-message.info {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

/* Purchase button styling matching Dokimake CTA */
.btn-purchase {
  width: 100%;
  background-color: var(--dokimake-yellow);
  color: var(--text-main);
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
  box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.32), 0px 2px 6px rgba(60, 64, 67, 0.15);
}

.btn-purchase:hover:not(:disabled) {
  background-color: var(--dokimake-yellow-hover);
}

.btn-purchase:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Full Screen Success Overlay --- */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: var(--text-main);
}

.success-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 320px;
  margin-bottom: 32px;
  line-height: 1.45;
}

.btn-success-done {
  background-color: var(--text-main);
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
}

.btn-success-done:hover {
  opacity: 0.9;
}

/* Success Checkmark Animation */
.success-checkmark {
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
}

.success-checkmark .check-icon {
  width: 54px;
  height: 54px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 3px solid var(--dokimake-blue);
}

.success-checkmark .check-icon::before,
.success-checkmark .check-icon::after {
  content: '';
  height: 80px;
  position: absolute;
  background: #ffffff;
  transform: rotate(-45deg);
}

.success-checkmark .check-icon::before {
  top: 3px;
  left: -2px;
  width: 25px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
  top: 0;
  left: 20px;
  width: 50px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
}

.success-checkmark .check-icon .icon-line {
  height: 4px;
  background-color: var(--dokimake-blue);
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
  top: 32px;
  left: 9px;
  width: 16px;
  transform: rotate(45deg);
  animation: icon-line-tip 0.6s;
}

.success-checkmark .check-icon .icon-line.line-long {
  top: 26px;
  right: 5px;
  width: 32px;
  transform: rotate(-45deg);
  animation: icon-line-long 0.6s;
}

.success-checkmark .check-icon .icon-circle {
  top: -3px;
  left: -3px;
  position: absolute;
  z-index: 10;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(46, 110, 245, 0.2);
  box-sizing: content-box;
}

.success-checkmark .check-icon .icon-fix {
  top: 6px;
  left: 18px;
  width: 5px;
  height: 65px;
  position: absolute;
  z-index: 1;
  background-color: #ffffff;
  transform: rotate(-45deg);
}

@keyframes icon-line-tip {
  0% {
    width: 0;
    left: 1px;
    top: 15px;
  }

  54% {
    width: 0;
    left: 1px;
    top: 15px;
  }

  70% {
    width: 34px;
    left: -6px;
    top: 25px;
  }

  84% {
    width: 12px;
    left: 12px;
    top: 34px;
  }

  100% {
    width: 16px;
    left: 9px;
    top: 32px;
  }
}

@keyframes icon-line-long {
  0% {
    width: 0;
    right: 30px;
    top: 35px;
  }

  65% {
    width: 0;
    right: 30px;
    top: 35px;
  }

  84% {
    width: 38px;
    right: 0px;
    top: 23px;
  }

  100% {
    width: 32px;
    right: 5px;
    top: 26px;
  }
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Confetti particles */
.confetti {
  position: fixed;
  width: 6px;
  height: 6px;
  z-index: 400;
  opacity: 0.85;
  pointer-events: none;
}

/* --- Developer Settings panel --- */
.config-trigger {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 150;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  opacity: 0.2;
  font-size: 1.2rem;
  transition: var(--transition);
}

.config-trigger:hover {
  opacity: 0.8;
}

.config-panel {
  display: none;
  position: fixed;
  bottom: 50px;
  right: 16px;
  z-index: 150;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
}

.config-panel.open {
  display: block;
  animation: slideUpPanel 0.2s ease;
}

.config-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

@keyframes slideUpPanel {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Powered by Dokimake */
.powered-by-dokimake-container {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  width: 100%;
}

.powered-by-dokimake {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted) !important;
  font-size: 13px;
  font-weight: 500;
}

.powered-by-dokimake:hover {
  text-decoration: none !important;
  color: var(--text-main) !important;
}

.powered-by-dokimake svg {
  height: 12px;
  width: auto;
}

/* Navbar Back Button */
.nav-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-main);
  margin-right: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.nav-back-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Footer Links */
.mobile-footer {
  display: none;
}

/* --- Responsive Media Queries --- */
@media (max-width: 900px) {
  body {
    padding-bottom: 0;
    background-color: var(--bg-card);
    /* Match white background on mobile for edge-to-edge cards */
    width: 100%;
  }

  .navbar {
    height: 52px;
  }

  .main-wrapper {
    padding-top: 52px;
  }

  .content-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
  }

  .left-column {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  /* Hide right column completely on mobile */
  .right-column {
    display: none !important;
  }

  /* Make cards edge-to-edge on mobile with matching navbar padding */
  .card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 13px 32px 13px;
    width: 100%;
    max-width: 100%;
  }

  .main-title {
    font-size: 20px;
    line-height: 30px;
    margin-bottom: 12px;
  }

  .nav-brand {
    gap: 8px;
  }

  /* Navbar responsiveness on mobile to prevent horizontal overflow */
  .nav-container {
    padding: 0 12px 0 12px;
  }

  .btn-support-chat {
    margin-right: 24px;
  }

  .group-logo {
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }

  .nav-logo-link {
    gap: 8px;
    font-size: 16px;
  }

  .group-name {
    max-width: unset;
  }

  .btn-login {
    width: 98px;
    height: 40px;
    font-size: 16px;
    font-weight: 700;
    padding: 0;
    text-align: center;
    background-color: transparent;
    border: none;
    color: var(--text-muted);
  }

  .nav-back-btn {
    display: flex;
    width: 40px;
    height: 40px;
    margin-right: 0;
    color: var(--text-muted);
  }

  .media-active-viewport {
    width: 100%;
    max-width: 100%;
  }



  .gallery-scroll {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .thumbnail-btn {
    width: 60px;
    height: 60px;
  }

  .gallery-thumbnails {
    padding: 0;
    gap: 8px;
  }

  .group-meta-info {
    display: flex;
    flex-wrap: wrap;
    margin: 16px 0;
    gap: 12px 0;
    font-size: 14px;
    font-weight: 400;
  }

  .meta-item {
    flex: 0 0 50%;
    font-size: 14px;
    font-weight: 400;
    gap: 8px;
  }

  .meta-icon,
  .owner-avatar {
    width: 20px;
    height: 20px;
  }

  .inline-join-btn {
    display: flex;
    height: 40px;
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0;
  }

  .about-description-content {
    margin-top: 16px;
  }

  .section-divider {
    display: none;
  }

  /* Hide desktop privacy terms on mobile */
  .privacy-terms-row {
    display: none !important;
  }

  /* Mobile Footer */
  .mobile-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 16px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    width: 100%;
    margin-top: 24px;
  }

  .mobile-footer .powered-by-dokimake-container {
    margin-top: 0;
    width: auto;
  }

  .mobile-footer-links {
    display: flex;
    align-items: center;
  }

  .mobile-footer .privacy-link {
    font-size: 14px;
    color: var(--text-muted);
  }
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    /* Center on desktop */
  }

  .modal-content {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--dokimake-yellow);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
}

/* --- Interactive Media Lightbox Preview Modal --- */
.lb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lb-backdrop.active {
  visibility: visible;
}

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  will-change: transform;
}

.lightbox-modal.open {
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1005;
}


#lightbox-image {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-content img,
.lightbox-video-frame {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  outline: none;
  background-color: #000000;
}

.lightbox-video-frame.is-portrait {
  aspect-ratio: 9 / 16;
  max-width: 420px;
}

.lightbox-modal.has-video .lightbox-content {
  max-width: 100%;
  max-height: 100%;
  width: 100vw;
  height: 100vh;
}

.lightbox-modal.has-video .lightbox-video-frame {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
  object-fit: contain;
}

.lightbox-modal.has-video .lightbox-video-frame.is-portrait {
  max-width: 100vw;
  aspect-ratio: unset;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s, transform 0.2s, color 0.2s;
  z-index: 1010;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
  color: var(--dokimake-yellow);
}

/* Lightbox Navigation Buttons */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s, transform 0.2s, color 0.2s;
  z-index: 1010;
}

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

.lightbox-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--dokimake-yellow);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav-btn.prev-btn {
  left: 32px;
}

.lightbox-nav-btn.next-btn {
  right: 32px;
}

/* Auto-hide controls state */
.lightbox-modal.controls-hidden .lightbox-nav-btn,
.lightbox-modal.controls-hidden .lightbox-close {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-modal.dismissing .lightbox-nav-btn,
.lightbox-modal.dismissing .lightbox-close {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .lightbox-nav-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.45);
  }
  .lightbox-nav-btn svg {
    width: 18px;
    height: 18px;
  }
  .lightbox-nav-btn.prev-btn {
    left: 8px;
  }
  .lightbox-nav-btn.next-btn {
    right: 8px;
  }

  .lightbox-modal {
    height: 100dvh;
  }

  .lightbox-modal.has-video .lightbox-content {
    height: 100dvh;
  }

  .lightbox-modal.has-video .lightbox-video-frame {
    height: 100dvh;
    max-height: 100dvh;
    object-fit: cover;
  }

  #custom-player-container.fake-fullscreen {
    height: 100dvh !important;
  }

  .fake-fullscreen .media-player-frame {
    object-fit: cover;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes lbSlideFromRight {
  from { transform: translateX(80px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes lbSlideFromLeft {
  from { transform: translateX(-80px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* CSS fake fullscreen for mobile */
body.has-fake-fullscreen {
  overflow: hidden;
}

/* Backdrop */
.fs-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9998;
  pointer-events: none;
}

/* Fullscreen: only sets layout — all transforms handled by JS */
#custom-player-container.fake-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  background: #000;
  will-change: transform;
  touch-action: none;
}


.btn-support-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 116px;
  height: 48px;
  padding: 11px 24px;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(228, 228, 228);
  border-radius: 4px;
  color: rgb(144, 144, 144);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  font-style: normal;
  line-height: 1.5;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 100ms;
  -webkit-tap-highlight-color: transparent;
}

.btn-support-chat:hover {
  background-color: rgb(245, 245, 245);
}

.btn-support-chat:active {
  background-color: rgb(235, 235, 235);
}

@media (max-width: 768px) {
  .btn-support-chat {
    border: none;
    background-color: transparent;
    width: 100%;
    height: 40px;
    padding: 0;
  }

  .btn-support-chat:hover,
  .btn-support-chat:active {
    background-color: transparent;
  }
}

/* Chat Widget Container */
/* Chat Widget Container */
.support-chat-widget {
  position: fixed;
  top: 74px; /* below navbar */
  right: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  z-index: 999;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-chat-widget.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Chat Header */
.chat-header {
  padding: 14px 16px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399; /* Green active status dot */
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.chat-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.close-chat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  transition: var(--transition);
}

.close-chat-btn:hover {
  color: var(--text-main);
}

/* Chat Messages Body */
.chat-body {
  padding: 16px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
}

.chat-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 85%;
  word-break: break-word;
}

.chat-message.bot {
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-message.user {
  background: var(--dokimake-yellow);
  color: var(--text-main);
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-message.status {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  font-size: 11px;
  align-self: center;
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
  max-width: 95%;
}

/* Chat Input Form */
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: #FFFFFF;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex-grow: 1;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.chat-input-area input:focus {
  border-color: var(--dokimake-yellow);
}

.send-chat-btn {
  background: var(--dokimake-yellow);
  color: var(--text-main);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.send-chat-btn:hover {
  background-color: var(--dokimake-yellow-hover);
  transform: translateY(-1px);
}

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