/* ===== About Me Overlay ===== */
.aboutme-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aboutme-overlay.hidden {
  display: none;
}

.aboutme-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

/* ===== Card Container & Perspective ===== */
.aboutme-card-container {
  position: relative;
  z-index: 1;
  perspective: 600px;
}

.aboutme-card {
  width: 420px;
  height: 578px;
  cursor: pointer;
}

.aboutme-card__translater {
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* ===== Rotator — The whole 3D card including silver border ===== */
.aboutme-card__rotator {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  position: relative;
  /* Silver frame */
  background: url('../../assets/image/silver.jpg') center/cover;
  border-radius: 20px;
  padding: 8px;
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(80, 80, 80, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 30px rgba(0, 0, 0, 0.5);
}

.aboutme-card--flipped .aboutme-card__rotator {
  transform: rotateY(180deg) !important;
}

/* ===== Card Faces ===== */
.aboutme-card__face {
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  backface-visibility: hidden;
  overflow: hidden;
  z-index: 2;
}

/* ===== Front Face — Pokemon Card ===== */
.aboutme-card__front {
  background: url('../../app/photo_booth_v2/Image layout/glaslq.jfif') center/cover no-repeat;
}

.aboutme-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 10px;
  height: 100%;
  box-sizing: border-box;
  /* Lift content above shine/glare layers */
  isolation: isolate;
}

/* ===== Header ===== */
.aboutme-card__header {
  display: flex;
  align-items: baseline;
  margin-bottom: 6px;
  padding: 0 2px;
}

.aboutme-card__name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  flex: 1;
  letter-spacing: -0.3px;
  text-shadow:
    -1px -1px 0 #0a3060,
    1px -1px 0 #0a3060,
    -1px 1px 0 #0a3060,
    1px 1px 0 #0a3060,
    0 0 6px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0;
}

.aboutme-card__hp {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #000;
  letter-spacing: 0.5px;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff;
  -webkit-text-stroke: 0;
}

.aboutme-card__hp strong {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
}

.aboutme-card__type {
  font-size: 22px;
  margin-left: 4px;
  line-height: 1;
}

.aboutme-card__type-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-left: 4px;
  vertical-align: middle;
}

/* ===== Image Frame ===== */
.aboutme-card__image-frame {
  border-radius: 4px;
  overflow: hidden;
  background: #1a1a2e;
  aspect-ratio: 5 / 3.2;
  position: relative;
  margin: 0 2px;
  box-shadow: 0 0 0 4px rgba(192, 192, 192, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.aboutme-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Badge — parallelogram overlapping bottom of image frame ===== */
.aboutme-card__badge {
  display: flex;
  justify-content: center;
  margin: -10px 2px 6px;
  position: relative;
  z-index: 3;
}

.aboutme-badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 900;
  color: #222;
  -webkit-text-stroke: 0;
  text-shadow: none;
  background: url('../../assets/image/silver.jpg') center/cover;
  border: 1px solid rgba(150, 150, 150, 0.5);
  padding: 4px 0;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  transform: skewX(-12deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== Abilities ===== */
.aboutme-card__abilities {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
  flex: 1;
}

.aboutme-ability {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: none;
  background: none;
  border-radius: 0;
  margin-bottom: 3px;
}

.aboutme-ability:last-child {
  border-bottom: none;
}

.aboutme-ability__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.aboutme-ability__icon {
  display: none;
}

.aboutme-ability__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.aboutme-ability__icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.aboutme-ability__name {
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #000;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff;
  -webkit-text-stroke: 0;
  line-height: 1.2;
}

.aboutme-ability__damage {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: #ffd700;
  text-shadow:
    -1px -1px 0 #0a3060,
    1px -1px 0 #0a3060,
    -1px 1px 0 #0a3060,
    1px 1px 0 #0a3060,
    0 0 8px rgba(255, 215, 0, 0.4);
  -webkit-text-stroke: 0;
}

/* ===== Ability Description ===== */
.aboutme-ability__desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: #000;
  text-shadow:
    -0.5px -0.5px 0 #fff,
    0.5px -0.5px 0 #fff,
    -0.5px 0.5px 0 #fff,
    0.5px 0.5px 0 #fff;
  line-height: 1;
}

/* ===== Footer / Social Links ===== */
.aboutme-card__footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 6px;
  margin-top: auto;
}

.aboutme-social {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 900;
  color: #333;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 4px 16px;
  background: url('../../assets/image/silver.jpg') center/cover;
  border: 1px solid rgba(180, 180, 180, 0.6);
  transform: skewX(-12deg);
  transition: all 0.15s ease;
  display: inline-block;
}

.aboutme-social:hover {
  color: #1a1a1a;
  filter: brightness(1.1);
}

/* ===== Back Face ===== */
.aboutme-card__back {
  transform: rotateY(180deg);
  background: url('../../app/photo_booth_v2/Image layout/glaslq.jfif') center/cover no-repeat;
}

.aboutme-card__back-design {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.aboutme-card__back-pattern {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  background:
    repeating-conic-gradient(
      rgba(100, 150, 255, 0.04) 0% 25%, transparent 25% 50%
    ) 0 0 / 20px 20px,
    radial-gradient(ellipse at center, rgba(100, 150, 255, 0.08), transparent 70%);
}

.aboutme-card__back-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: rgba(148, 163, 184, 0.5);
  text-transform: uppercase;
  letter-spacing: 8px;
  z-index: 1;
  text-shadow: 0 0 30px rgba(100, 150, 255, 0.3);
}

/* ============================================================
   HOLOGRAPHIC SHINE — VMax style
   ============================================================ */
.aboutme-card__shine {
  --space: 6%;
  --angle: 133deg;
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 20px;
  pointer-events: none;
  will-change: background-position, filter;
  transition: background-position 0.8s ease-out, filter 0.8s ease-out;

  background-image:
    /* Alternating colored bands */
    repeating-linear-gradient( -33deg,
      hsl(2, 70%, 47%) calc(var(--space)*1),
      hsl(228, 60%, 64%) calc(var(--space)*2),
      hsl(176, 55%, 39%) calc(var(--space)*3),
      hsl(123, 68%, 35%) calc(var(--space)*4),
      hsl(283, 75%, 57%) calc(var(--space)*5),
      hsl(2, 70%, 47%) calc(var(--space)*6)
    ),
    /* Foil scanline texture */
    repeating-linear-gradient(
      var(--angle),
      hsla(227, 53%, 12%, 0.5) 0%,
      hsl(180, 10%, 50%) 2.5%,
      hsl(83, 50%, 35%) 5%,
      hsl(180, 10%, 50%) 7.5%,
      hsla(227, 53%, 12%, 0.5) 10%,
      hsla(227, 53%, 12%, 0.5) 15%
    ),
    /* Radial color glow at cursor */
    radial-gradient(
      farthest-corner circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      hsla(189, 76%, 77%, 0.6) 0%,
      hsla(147, 59%, 77%, 0.6) 25%,
      hsla(271, 55%, 69%, 0.6) 50%,
      hsla(355, 56%, 72%, 0.6) 75%
    );

  background-blend-mode: difference, luminosity, soft-light;
  background-size: 1100% 1100%, 600% 600%, 200% 200%;
  background-position:
    var(--pointer-x, 50%) var(--pointer-y, 50%),
    var(--pointer-x, 50%) var(--pointer-y, 50%),
    var(--pointer-x, 50%) var(--pointer-y, 50%);
  filter:
    brightness(calc((var(--pointer-from-center, 0) * 0.3) + 0.7))
    contrast(1.2) saturate(1);
  mix-blend-mode: color-dodge;
  opacity: 0.5;
}

/* Sun-pillar vertical stripes + foil texture */
.aboutme-card__shine::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;

  background-image:
    repeating-linear-gradient( 0deg,
      hsla(2, 80%, 60%, 0.6) calc(var(--space)*1),
      hsla(228, 70%, 70%, 0.6) calc(var(--space)*2),
      hsla(176, 65%, 55%, 0.6) calc(var(--space)*3),
      hsla(123, 78%, 50%, 0.6) calc(var(--space)*4),
      hsla(283, 85%, 65%, 0.6) calc(var(--space)*5),
      hsla(53, 80%, 55%, 0.6) calc(var(--space)*6),
      hsla(2, 80%, 60%, 0.6) calc(var(--space)*7)
    ),
    repeating-linear-gradient(
      var(--angle),
      #0e152e 0%,
      hsl(180, 10%, 60%) 3.8%,
      hsl(180, 29%, 66%) 4.5%,
      hsl(180, 10%, 60%) 5.2%,
      #0e152e 10%,
      #0e152e 12%
    );

  background-blend-mode: hue, hard-light;
  background-size: 200% 700%, 300% 100%;
  background-position:
    0% var(--pointer-y, 50%),
    var(--pointer-x, 50%) var(--pointer-y, 50%);
  transition: background-position 0.8s ease-out;
  mix-blend-mode: lighten;
  opacity: calc((0.3 * var(--card-opacity, 0)) + var(--card-opacity, 0) * var(--pointer-from-center, 0) * 0.5);
  filter: saturate(1.5);
}

/* ===== Glare — VMax style hard-light ===== */
.aboutme-card__glare {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 20px;
  pointer-events: none;
  mix-blend-mode: hard-light;
  will-change: opacity;
  transition: opacity 0.8s ease-out;
  filter: brightness(1) contrast(1);

  background-image:
    radial-gradient(
      farthest-corner circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      hsla(0, 0%, 100%, 0.75) 0%,
      hsl(0, 0%, 0%) 120%
    );

  opacity: calc((0.2 * var(--card-opacity, 0)) + var(--card-opacity, 0) * var(--pointer-from-center, 0) * 0.8);
}

/* ===== Entrance Animation ===== */
@keyframes aboutmeEnter {
  from { transform: scale(0.7) rotateY(-15deg); opacity: 0; }
  to { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.aboutme-overlay:not(.hidden) .aboutme-card-container {
  animation: aboutmeEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .aboutme-card { width: 296px; height: 406px; }
  .aboutme-card__name { font-size: 15px; }
  .aboutme-card__hp strong { font-size: 18px; }
  .aboutme-ability__damage { font-size: 18px; }
  .aboutme-card__content { padding: 12px 10px 8px; }
}

@media (max-width: 400px) {
  .aboutme-card { width: 266px; height: 366px; }
  .aboutme-card__content { padding: 10px 8px 6px; gap: 3px; }
  .aboutme-stat { font-size: 8px; padding: 1px 5px; }
  .aboutme-ability__icon { width: 22px; height: 22px; font-size: 13px; }
}
