/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Add your custom CSS here */

/* ─── Game Card ─────────────────────────────────────────────────────────── */
/* 3D card flip animation & physical card styling */

.card-scene {
  perspective: 1000px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 5 / 7;
  margin: 0 auto;
}

.card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1rem;
  overflow: hidden;
}

.card-face--front {
  transform: rotateY(180deg);
}

.card-face--back {
  transform: rotateY(0deg);
}

/* Card back pattern — decorative diamond lattice */
.card-back-pattern {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 12px,
      rgba(255,255,255,0.06) 12px,
      rgba(255,255,255,0.06) 13px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgba(255,255,255,0.06) 12px,
      rgba(255,255,255,0.06) 13px
    );
}

/* Card inner border (like a real playing card) */
.card-inner-border {
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 0.75rem;
  pointer-events: none;
}

/* Shimmer highlight on card back */
.card-back-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

/* Tap/touch target for drawing */
.card-tap-target {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.card-tap-target:active {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* Pulse animation for the "tap to draw" prompt */
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
}

.card-pulse {
  animation: card-pulse 2s ease-in-out infinite;
}

/* Category suit icon positioning (corners like a playing card) */
.card-suit-tl {
  position: absolute;
  top: 8px;
  left: 8px;
}

.card-suit-br {
  position: absolute;
  bottom: 8px;
  right: 8px;
  transform: rotate(180deg);
}

/* Entrance animation for card content after flip */
@keyframes card-content-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.card-content-enter {
  animation: card-content-in 0.2s ease-out 0.15s both;
}

/* Mobile-first: ensure card doesn't overflow on small screens */
@media (max-width: 380px) {
  .card-scene {
    max-width: 280px;
  }
}

@media (min-width: 640px) {
  .card-scene {
    max-width: 360px;
  }
}
