/* ============================================================
   YIL DÖNÜMÜ YARIŞ OYUNU - STİLLER
   Romantik tema, glassmorphism, modern animasyonlar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Outfit:wght@300;400;600;700&display=swap');

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0010;
  font-family: 'Outfit', sans-serif;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Canvas ---- */
canvas#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: auto;
}

/* ---- Overlays ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1);
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- Start Screen ---- */
#startScreen {
  background: linear-gradient(145deg, rgba(60,10,80,0.97) 0%, rgba(180,60,100,0.95) 50%, rgba(255,120,120,0.93) 100%);
}
.start-content {
  text-align: center;
  color: #fff;
  padding: 2rem;
  animation: fadeInUp 1.2s ease;
}
.title-romantic {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 40px rgba(255,182,193,0.6), 0 2px 10px rgba(0,0,0,0.3);
  line-height: 1.2;
}
.subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
}
.hearts-deco {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

/* ---- Buttons ---- */
.btn-romantic {
  background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
  border: none;
  color: #fff;
  padding: 16px 44px;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 25px rgba(196,69,105,0.45);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.btn-romantic::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 100%);
  border-radius: 50px;
}
.btn-romantic:hover, .btn-romantic:active {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 35px rgba(196,69,105,0.6);
}

/* ---- Milestone Modal ---- */
#milestoneModal {
  background: rgba(10,0,20,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.milestone-content {
  background: linear-gradient(155deg, rgba(255,255,255,0.12) 0%, rgba(255,182,193,0.08) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,182,193,0.25);
  border-radius: 28px;
  padding: 1.8rem;
  width: min(92vw, 420px);
  max-height: 88vh;
  text-align: center;
  color: #fff;
  animation: scaleIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(255,105,135,0.1);
}
.milestone-frame {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  position: relative;
  aspect-ratio: 4/3;
  background: rgba(0,0,0,0.3);
}
.milestone-frame.style-classic {
  border: 4px solid rgba(200,200,220,0.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.milestone-frame.style-romantic {
  border: 4px solid rgba(255,182,193,0.6);
  box-shadow: 0 0 30px rgba(255,105,180,0.2), 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
}
.milestone-frame img, .milestone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.milestone-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffb6c1, #ff69b4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.milestone-desc {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.milestone-counter {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-bottom: 1.2rem;
  letter-spacing: 2px;
}

/* ---- HUD ---- */
#hud {
  display: none !important;
}
#hud.hidden { opacity: 0; pointer-events: none; }
.hud-item {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hud-item .hud-value {
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #ffb6c1, #ff69b4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hud-item .hud-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
}

/* ---- Celebration ---- */
#celebrationScreen {
  background: radial-gradient(ellipse at center, rgba(60,10,80,0.95) 0%, rgba(10,0,20,0.98) 100%);
}
canvas#confettiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.celebration-content {
  text-align: center;
  color: #fff;
  padding: 2rem;
  z-index: 2;
  position: relative;
  animation: fadeInUp 1s ease 0.5s both;
}
.celebration-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(255,182,193,0.5);
  animation: pulse 2.5s ease-in-out infinite;
}
.celebration-text {
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 300;
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 2rem;
  white-space: pre-line;
  opacity: 0.9;
}

/* ---- Touch Controls Hint ---- */
.touch-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  z-index: 50;
  text-align: center;
  animation: fadeOut 4s ease 3s forwards;
  pointer-events: none;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@keyframes fadeOut {
  to { opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
