* {
  box-sizing: border-box;
}

body {
  align-items: flex-start;
  background: radial-gradient(circle at center, #111 0, #000 100%);
  color: #fff;
  display: flex;
  font-family: Poppins, Arial, Helvetica, sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  padding: 48px 16px 36px;
}

.page {
  align-items: center;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.card-stage {
  perspective: 1200px;
}

.card-wrap {
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 180ms ease, filter 180ms ease;
}

.platinum-card {
  background: url("assets/card-bg.png") center / cover no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  height: 500px;
  max-width: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  width: 300px;
}

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

.card-face {
  backface-visibility: hidden;
  border-radius: 16px;
  color: #111;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  left: 0;
  padding: 24px;
  position: absolute;
  top: 0;
  width: 100%;
}

.card-back {
  text-align: center;
  transform: rotateY(180deg);
}

.company-header {
  margin-bottom: 10px;
  text-align: center;
}

.brand-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  padding: 0 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.brand-divider {
  background: linear-gradient(90deg, #cfa94d, #fff3b0);
  border-radius: 5px;
  height: 2px;
  margin: 6px auto 0;
  width: 60px;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}

.logo-circle {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  height: 130px;
  justify-content: center;
  width: 130px;
}

.logo-circle img {
  height: auto;
  width: 95px;
}

.user-info {
  margin-top: 15px;
  text-align: center;
}

.card-name {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 4px;
}

.card-role {
  color: #444;
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.card-phone {
  color: #222;
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.qr-section {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  width: 100%;
}

.small-details {
  color: #333;
  font-size: 0.75rem;
  margin-bottom: 12px;
  width: 100%;
}

.detail-row {
  align-items: center;
  display: flex;
  gap: 8px;
  line-height: 1.35;
  margin: 0 0 6px;
  min-width: 0;
}

.icon {
  color: #2f2f2f;
  display: inline-flex;
  flex: 0 0 15px;
  justify-content: center;
  width: 15px;
}

.qr {
  align-self: center;
  background: #fff;
  flex: 0 0 90px;
  height: 90px;
  overflow: hidden;
  padding: 0;
  width: 90px;
}

.qr img,
.qr canvas {
  height: 90px;
  image-rendering: pixelated;
  width: 90px;
}

.qr img,
.qr canvas,
.map-qr img,
.map-qr canvas {
  display: block;
}

.back-title {
  color: #111;
  font-size: 1.25rem;
  margin: 26px 0 0;
  text-align: center;
}

.address {
  color: #575656;
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

.address-content {
  padding-top: 8px;
}

.map-qr {
  align-self: center;
  background: #fff;
  height: 100px;
  overflow: hidden;
  width: 100px;
}

.platinum-btn {
  background: linear-gradient(135deg, #31a2ee, #fff, #127efa);
  border: 1px solid #ccc;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #000;
  cursor: pointer;
  display: block;
  font: 800 14px/1.2 Poppins, Arial, Helvetica, sans-serif;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
  width: 100%;
}

.platinum-btn:hover {
  background: linear-gradient(135deg, #ececec, #cfcfcf, #eaeaea);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.platinum-btn:active {
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

.flip-btn {
  margin-top: 24px;
  max-width: 300px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
  max-width: 280px;
  width: 75%;
}

@media (max-width: 480px) {
  body {
    padding-top: 48px;
  }

  .platinum-card {
    height: 480px;
    max-width: 300px;
    width: min(90vw, 300px);
  }

  .card-face {
    padding: 24px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .logo-circle {
    height: 50px;
    width: 50px;
  }

  .logo-circle img {
    width: 35px;
  }

  .card-name {
    font-size: 0.9rem;
  }

  .card-phone,
  .card-role {
    font-size: 0.75rem;
  }

  .address {
    font-size: 0.7rem;
  }

  .platinum-btn {
    font-size: 12px;
    padding: 8px 15px;
  }
}
