/* Global reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #22202A;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* stack normally, top-down */
  align-items: center;
  overflow-x: hidden;            /* prevent minor transforms from causing scroll */
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 12vh 16px 48px;
  gap: 56px;
}

/* BUSINESS CARD CONTAINER */
.picture-container {
  width: 100%;
  max-width: 95vw;
  margin: 0 auto;
  text-align: center;
}

/* 3D scene */
.card-scene {
  width: min(90vw, 520px);   /* nearly full width but never overflow */
  max-width: calc(100vw - 32px);
  aspect-ratio: 1.54 / 1;    /* keep business card ratio */
  perspective: 1000px;
  margin: 0 auto;
  margin-top: 0px;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  cursor: pointer;
}

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

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255,255,255,0.25);
}

.card-front,
.card-back {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-front img,
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fills the scene; no top/bottom bars */
  display: block;
}

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

/* BUTTON GROUP */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(320px, 90vw);
}

/* SAVE BUTTON */
.save-btn {
  background: transparent;
  color: #fff;
  padding: 12px 22px;
  border: 2px solid #fff;
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-block;
  width: 100%;
  margin: 0;
  box-shadow: 0 12px 50px rgba(255,255,255,0.1);
  transition: all 0.25s ease;
}

.save-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

/* Disable drag/select on images */
img {
  -webkit-user-drag: none;
  user-select: none;
}

/* MOBILE TUNING */
@media (max-width: 600px) {
  .card-scene {
    width: min(94vw, 520px);
    max-width: calc(100vw - 32px);
    margin-top: 20px;
  }
  .container {
    padding-top: 10vh;
    gap: 44px;
  }
  .save-btn {
    font-size: 13px;
    padding: 10px 18px;
  }
}