/**
 * GP CARd Classic — Oversized Trading Card Design
 * Premium glass morphism with owner-customizable sections
 *
 * Features:
 * - Large hero image with optional background removal
 * - Customizable section panels (Performance, Mods, History, Media)
 * - QR code integration
 * - Rarity-based accent colors
 * - GP branding
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CLASSIC LAYOUT SHELL
═══════════════════════════════════════════════════════════════════════════ */
.gp-card-shell.gp-classic {
  aspect-ratio: 9/16;
  max-width: 420px;
  min-height: 680px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(var(--teal-rgb), 0.08), transparent 50%),
    linear-gradient(180deg, #0a0f14 0%, #0d1218 50%, #0a0e12 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER BRANDING
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  position: relative;
  z-index: 10;
}

.gp-classic .gpc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gp-classic .gpc-brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gp-cyan, #00c8e6), var(--gp-teal, #18e1ff));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #0a0f14;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(var(--teal-rgb), 0.3);
}

.gp-classic .gpc-brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.gp-classic .gpc-owner-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffd700, #f0a000);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.gp-classic .gpc-rarity-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid currentColor;
  transition: all 0.3s ease;
}

/* Rarity badge colors */
.gp-classic[data-tier="STREET"] .gpc-rarity-badge {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.1);
}

.gp-classic[data-tier="NEON"] .gpc-rarity-badge {
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.gp-classic[data-tier="SKYE"] .gpc-rarity-badge {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.gp-classic[data-tier="NOVA"] .gpc-rarity-badge,
.gp-classic[data-tier="LEGENDARY"] .gpc-rarity-badge {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.gp-classic[data-tier="COSMIC"] .gpc-rarity-badge {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(72, 219, 251, 0.2));
  border-image: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3) 1;
  color: #fff;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.gp-classic[data-tier="OWNER"] .gpc-rarity-badge {
  color: var(--gp-cyan, #00c8e6);
  border-color: rgba(var(--teal-rgb), 0.6);
  background: rgba(var(--teal-rgb), 0.15);
  box-shadow: 0 0 25px rgba(var(--teal-rgb), 0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CAR TITLE SECTION
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-title-section {
  padding: 0 20px 16px;
}

.gp-classic .gpc-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin: 0 0 4px;
}

.gp-classic .gpc-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--gp-cyan, #00c8e6);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO IMAGE SECTION
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-hero {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% 80%, rgba(var(--teal-rgb), 0.15), transparent 60%),
    linear-gradient(180deg, #0a0f14 0%, #0f1419 100%);
}

.gp-classic .gpc-hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
  transition: transform 0.4s ease;
}

.gp-classic .gpc-hero-image.gpc-no-bg {
  /* For background-removed images - floating 3D effect */
  transform: scale(1.1) translateY(10px);
  filter:
    drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7))
    drop-shadow(0 10px 20px rgba(var(--teal-rgb), 0.15));
}

.gp-classic:hover .gpc-hero-image {
  transform: scale(1.02);
}

.gp-classic:hover .gpc-hero-image.gpc-no-bg {
  transform: scale(1.12) translateY(8px);
}

/* Hero ambient glow based on tier */
.gp-classic .gpc-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(10, 15, 20, 1) 0%, transparent 100%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION PANELS CONTAINER
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-sections {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--teal-rgb), 0.3) transparent;
}

.gp-classic .gpc-sections::-webkit-scrollbar {
  width: 4px;
}

.gp-classic .gpc-sections::-webkit-scrollbar-thumb {
  background: rgba(var(--teal-rgb), 0.3);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION PANEL (Glass Morphism)
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-panel {
  background: rgba(15, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.gp-classic .gpc-panel:hover {
  border-color: rgba(var(--teal-rgb), 0.2);
  background: rgba(15, 20, 28, 0.9);
}

.gp-classic .gpc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gp-classic .gpc-panel-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gp-cyan, #00c8e6);
  margin: 0;
}

.gp-classic .gpc-panel-actions {
  display: flex;
  gap: 8px;
}

.gp-classic .gpc-panel-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gp-classic .gpc-panel-action:hover {
  background: rgba(var(--teal-rgb), 0.15);
  border-color: rgba(var(--teal-rgb), 0.3);
  color: var(--gp-cyan, #00c8e6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERFORMANCE STATS GRID
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gp-classic .gpc-stat {
  display: flex;
  flex-direction: column;
}

.gp-classic .gpc-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gp-cyan, #00c8e6);
  margin-bottom: 2px;
}

.gp-classic .gpc-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.gp-classic .gpc-stat-unit {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODS & UPGRADES GRID
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-mods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gp-classic .gpc-mod-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.gp-classic .gpc-mod-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gp-cyan, #00c8e6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY TIMELINE
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gp-classic .gpc-timeline-item {
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.gp-classic .gpc-timeline-year {
  font-weight: 700;
  color: var(--gp-cyan, #00c8e6);
  min-width: 40px;
}

.gp-classic .gpc-timeline-desc {
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QR CODE SECTION
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-qr-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin-top: auto;
}

.gp-classic .gpc-qr-code {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
}

.gp-classic .gpc-qr-code img,
.gp-classic .gpc-qr-code canvas,
.gp-classic .gpc-qr-code svg {
  width: 100%;
  height: 100%;
}

.gp-classic .gpc-qr-info {
  flex: 1;
}

.gp-classic .gpc-serial {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.gp-classic .gpc-scan-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE FOR SECTIONS
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-empty {
  text-align: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.gp-classic .gpc-empty-icon {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL VISIBILITY (Owner can show/hide)
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-panel[data-visible="false"] {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIER-SPECIFIC GLOW EFFECTS
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic[data-tier="COSMIC"] {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(255, 107, 107, 0.15),
    0 0 120px rgba(72, 219, 251, 0.1),
    0 0 0 1px rgba(255, 107, 107, 0.2);
}

.gp-classic[data-tier="NOVA"],
.gp-classic[data-tier="LEGENDARY"] {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(245, 158, 11, 0.15),
    0 0 0 1px rgba(245, 158, 11, 0.2);
}

.gp-classic[data-tier="SKYE"] {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(59, 130, 246, 0.12),
    0 0 0 1px rgba(59, 130, 246, 0.15);
}

.gp-classic[data-tier="NEON"] {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(168, 85, 247, 0.1),
    0 0 0 1px rgba(168, 85, 247, 0.15);
}

.gp-classic[data-tier="OWNER"] {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(var(--teal-rgb), 0.15),
    0 0 0 1px rgba(var(--teal-rgb), 0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .gp-classic .gpc-title {
    font-size: 22px;
  }

  .gp-classic .gpc-hero {
    height: 180px;
  }

  .gp-classic .gpc-stats-grid {
    gap: 8px;
  }

  .gp-classic .gpc-stat-value {
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLIP ANIMATION SUPPORT
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gp-flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.gp-classic .gp-flip.is-back {
  transform: rotateY(180deg);
}

.gp-classic .gp-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.gp-classic .gp-face.back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #0a0f14 0%, #0d1218 100%);
  padding: 20px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOLOGRAPHIC EFFECT (for higher tiers)
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-holo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      125deg,
      transparent 0%,
      rgba(255, 107, 107, 0.1) 20%,
      rgba(254, 202, 87, 0.1) 30%,
      rgba(72, 219, 251, 0.1) 40%,
      rgba(255, 159, 243, 0.1) 50%,
      transparent 60%
    );
  background-size: 200% 200%;
  animation: holoShift 6s ease-in-out infinite;
  mix-blend-mode: overlay;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.gp-classic[data-tier="COSMIC"] .gpc-holo-overlay,
.gp-classic[data-tier="NOVA"] .gpc-holo-overlay,
.gp-classic[data-tier="LEGENDARY"] .gpc-holo-overlay {
  opacity: 0.6;
}

.gp-classic[data-tier="SKYE"] .gpc-holo-overlay {
  opacity: 0.4;
}

@keyframes holoShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEDIA GALLERY PREVIEW
═══════════════════════════════════════════════════════════════════════════ */
.gp-classic .gpc-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gp-classic .gpc-media-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.gp-classic .gpc-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
