/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Vietnamese Women's Day Custom Styles
   ========================================================================== */

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

body {
  font-family: 'Inter', sans-serif;
  background: #faf8f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Background */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 50%, #ede8e0 100%);
  z-index: 0;
}

.ambient-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(216, 191, 166, 0.1) 0%, transparent 50%);
  animation: ambientFloat 20s ease-in-out infinite;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-30px, 30px) rotate(240deg); }
}

.container {
  width: 100%;
  max-width: 550px;
  position: relative;
  z-index: 1;
}

/* Card Flip Container */
.card-flip-container {
  position: relative;
  width: 100%;
  perspective: 1000px;
  cursor: pointer;
}

.card-flip-container.flipped .card-front {
  transform: rotateY(-180deg);
}

.card-flip-container.flipped .card-back {
  transform: rotateY(0deg);
}

.card-front,
.card-back {
  width: 100%;
  min-height: 500px;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

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

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

.card-content {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  padding: 60px 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(216, 191, 166, 0.2);
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Decorative Corners */
.decorative-corner {
  position: absolute;
  font-size: 1.5rem;
  color: #d8bfa6;
  opacity: 0.5;
}

.decorative-corner.tl { top: 15px; left: 15px; }
.decorative-corner.tr { top: 15px; right: 15px; }
.decorative-corner.bl { bottom: 15px; left: 15px; }
.decorative-corner.br { bottom: 15px; right: 15px; }

/* Card Front Styles */
.front-header {
  text-align: center;
  margin-bottom: 50px;
}

.front-date {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  font-weight: 400;
  color: #2c2420;
  line-height: 1;
  letter-spacing: 8px;
  margin-bottom: 15px;
}

.front-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #6b5d52;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.front-message {
  text-align: center;
  margin: 60px 0;
}

.front-message p {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #9b8b7e;
  margin-bottom: 15px;
}

.front-message h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 500;
  color: #2c2420;
  margin-bottom: 20px;
}

.emoji-decoration {
  font-size: 3rem;
  margin-top: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.tap-hint {
  text-align: center;
  margin-top: 50px;
}

.tap-hint p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #9b8b7e;
  margin-bottom: 10px;
  animation: pulse 2s ease-in-out infinite;
}

.tap-hint.back p {
  margin-top: 40px;
  font-size: 0.85rem;
}

.tap-icon {
  font-size: 1.5rem;
  display: inline-block;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Card Back Styles */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.date-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.date-num {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 400;
  color: #2c2420;
  line-height: 1;
  letter-spacing: -2px;
}

.date-dot {
  font-size: 1.5rem;
  color: #d8bfa6;
  margin-top: -10px;
}

.accent-line {
  width: 60px;
  height: 1px;
  background: #d8bfa6;
  margin: 0 auto;
}

/* Message Card */
.message-card {
  margin: 30px 0;
}

.message {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.9;
  color: #4a4038;
  margin-bottom: 18px;
  text-align: center;
}

.message.greeting {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #2c2420;
  margin-bottom: 25px;
}

.message.signature {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #6b5d52;
  margin-top: 25px;
  margin-bottom: 0;
}

/* Footer */
.footer-minimal {
  margin-top: 40px;
  text-align: center;
}

.footer-minimal p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #9b8b7e;
  letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .card-content {
    padding: 40px 30px;
    min-height: 450px;
  }

  .front-date {
    font-size: 3.5rem;
  }

  .front-title {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .front-message h2 {
    font-size: 2rem;
  }

  .date-num {
    font-size: 3rem;
  }

  .message {
    font-size: 0.95rem;
  }

  .message.greeting {
    font-size: 1.3rem;
  }

  .decorative-corner {
    font-size: 1.2rem;
  }
}

/* Selection */
::selection {
  background: #d8bfa6;
  color: #fff;
}

::-moz-selection {
  background: #d8bfa6;
  color: #fff;
}
