/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body,
.card, .card-container, .card-front, .card-result, canvas {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  font-family: 'Georgia', serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px;
  color: #F5DE9E;

  background: url("assets/fundo.png") no-repeat center center fixed;
  background-size: cover;

  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 0;
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(10, 10, 13, 0.9);
  border: 1px solid #B8860B;
  box-shadow: 0 0 40px rgba(184, 134, 11, 0.35);
  backdrop-filter: blur(8px);
}

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

.header h1 {
  font-size: 2.6rem;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;

  background: linear-gradient(90deg, #B8860B, #D4AF37, #F5DE9E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
}

.header::before,
.header::after {
  content: "💎";
  display: block;
  font-size: 1.8rem;
  color: #00CFFF;
  text-shadow: 0 0 15px #00CFFF;
  margin: 8px 0;
}

.header p {
  margin-top: 6px;
  font-size: 1rem;
  letter-spacing: 2px;
  color: #D4AF37;
}

.user-info {
  margin: 20px 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #B8860B;
  color: #F5DE9E;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(184, 134, 11, 0.2);
}

.attention-text {
  text-align: center;
  margin: 20px 0 25px 0;
  color: #E6C97A;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.card {
  position: relative;
  aspect-ratio: 3 / 4;
}

.card-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, #F5DE9E, transparent 60%),
    radial-gradient(circle at 80% 90%, #B8860B, transparent 60%),
    linear-gradient(145deg, #D1AF37, #B8860B);

  border: 2px solid #E6C97A;
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.card-front {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  color: #3A2F10;
  font-weight: bold;
  text-transform: uppercase;
}

.card-front-inner-main {
  font-size: 1.4rem;
  letter-spacing: 2px;
}

.card-result {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  z-index: 6;
  color: #3A2F10;
}

.result-emoji {
  font-size: 3.3rem;
}

.result-name {
  font-size: 1.1rem;
  margin-top: 8px;
  font-weight: bold;
}

.result-message {
  font-size: 0.9rem;
  margin-top: 5px;
}

canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
}

.referral-message {
  margin-top: 20px;
  padding: 18px;
  text-align: center;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #B8860B;
  box-shadow: 0 0 15px rgba(184, 134, 11, 0.4);
}

.result-section {
  margin-top: 30px;
  padding: 25px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #D4AF37;
  box-shadow: 0 0 25px rgba(212,175,55,0.4);
  display: none;
  text-align: center;
}

.result-section.show {
  display: block;
  animation: fadeUp 0.8s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #B8860B, #D4AF37, #F5DE9E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.button-group {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid #D4AF37;
  background: linear-gradient(145deg, #D4AF37, #B8860B);
  color: #3A2F10;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #D4AF37;
}

.instructions {
  margin-top: 20px;
  text-align: center;
  color: #F5DE9E;
  font-size: 0.85rem;
}

/* FORM CADASTRO */
.form-card {
  margin-top: 10px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #D4AF37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.form-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: #F5DE9E;
}

.form-card p {
  font-size: 0.9rem;
  color: #E6C97A;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: #F5DE9E;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #B8860B;
  background: rgba(0, 0, 0, 0.7);
  color: #F5DE9E;
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.form-note {
  font-size: 0.8rem;
  color: #C0A76A;
  margin-top: -4px;
  margin-bottom: 12px;
}

.btn-full {
  width: 100%;
}

.form-feedback {
  margin-top: 10px;
  font-size: 0.85rem;
  text-align: center;
}

.form-feedback.error {
  color: #ff6b6b;
}

.form-feedback.success {
  color: #8be36b;
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
    letter-spacing: 3px;
  }

  .cards-grid {
    gap: 14px;
  }
}
