/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg-page: #ffffff;
  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --featured-blue: #268dff;
  --featured-blue-hover: #1b7ee8;
  --card-bg: #ececee;
  --card-bg-hover: #e2e2e6;
  --card-border: #dedee2;
  --divider-color: #ededf0;
  --placeholder-bg: #f4f4f6;
  --placeholder-tag-bg: #e5e5ea;
  --border-radius-pill: 9999px;
  --border-radius-gallery: 28px;

  /* Side-by-side card dimensions (zero overlapping) */
  --card-width: 220px;
  --card-height: 330px;
  --card-gap: 12px;
  --card-offset: calc(var(--card-width) + var(--card-gap));
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 16px 48px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   Page Layout Container
   ========================================================================== */
.page-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   Top Video Carousel (3 Cards, Pure Infinite Loop)
   ========================================================================== */
.gallery-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding-top: 6px;
  margin-bottom: 22px;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: var(--card-height);
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.carousel-stage:active {
  cursor: grabbing;
}

/* Card Geometry (Flat horizontal plane, equal z-index) */
.gallery-card {
  position: absolute;
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--border-radius-gallery);
  overflow: hidden;
  background-color: var(--placeholder-bg);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1;
}

/* Smooth transition when animating slots */
.gallery-card.transitioning {
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s ease;
}

/* Slot Positions (Strictly side-by-side with clear gap, zero stacking) */
.gallery-card.is-center {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.gallery-card.is-left {
  transform: translate3d(calc(-1 * var(--card-offset)), 0, 0);
  opacity: 0.35;
  pointer-events: auto;
}

.gallery-card.is-right {
  transform: translate3d(var(--card-offset), 0, 0);
  opacity: 0.35;
  pointer-events: auto;
}

/* Offscreen wrapping targets during seamless teleport */
.gallery-card.is-wrapping-left {
  transform: translate3d(calc(-2 * var(--card-offset)), 0, 0);
  opacity: 0;
  pointer-events: none;
}

.gallery-card.is-wrapping-right {
  transform: translate3d(calc(2 * var(--card-offset)), 0, 0);
  opacity: 0;
  pointer-events: none;
}

/* Video Containers */
.video-slot {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--placeholder-bg);
}

.placeholder-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--placeholder-tag-bg);
  padding: 6px 12px;
  border-radius: var(--border-radius-pill);
}

/* ==========================================================================
   Profile Header
   ========================================================================== */
.profile-header {
  text-align: center;
  margin-bottom: 18px;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.profile-handle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================================================
   Featured Primary Action Button
   ========================================================================== */
.featured-action {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.btn-featured {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--featured-blue);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--border-radius-pill);
  padding: 8px 24px 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  gap: 12px;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-featured:hover {
  background-color: var(--featured-blue-hover);
}

.btn-featured:active {
  transform: scale(0.98);
}

.btn-icon-slot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.btn-icon-slot svg,
.btn-icon-slot img {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.btn-text {
  white-space: nowrap;
}

/* ==========================================================================
   Divider
   ========================================================================== */
.section-divider {
  width: 100%;
  max-width: 320px;
  border: none;
  border-top: 1px solid var(--divider-color);
  margin-bottom: 18px;
}

/* ==========================================================================
   Socials Section
   ========================================================================== */
.socials-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.socials-subtitle {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}

.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Social link cards (pill style) */
.social-link-card {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-pill);
  padding: 6px 14px 6px 8px;
  text-decoration: none;
  color: var(--text-main);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.social-link-card:hover {
  background-color: var(--card-bg-hover);
  border-color: #d2d2d6;
}

.social-link-card:active {
  transform: scale(0.99);
}

/* Icon slot containers */
.social-icon-slot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  margin-right: 14px;
}

.social-icon-slot svg,
.social-icon-slot img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Platform-specific base backgrounds for icon containers */
.snapchat-slot {
  background-color: #fffc00;
}

.tiktok-slot {
  background-color: #000000;
}

.instagram-slot {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.twitter-slot {
  background-color: #000000;
}

.social-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 380px) {
  :root {
    --card-width: 190px;
    --card-height: 285px;
    --card-gap: 10px;
  }
  .btn-featured {
    font-size: 12.5px;
    padding: 8px 18px 8px 10px;
  }
  .social-link-card {
    padding: 5px 12px 5px 6px;
  }
  .social-icon-slot {
    width: 40px;
    height: 40px;
  }
}
