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

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: "Playfair Display", "Georgia", "Segoe UI", serif;
  background: linear-gradient(135deg, #fff5e6 0%, #ffecd0 50%, #ffe0b8 100%);
  position: relative;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 165, 0, 0.12) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
}

.counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 165, 0, 0.25);
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 15;
  opacity: 0;
}

.counter {
  transition: opacity 0.5s ease-out;
}

@media (max-width: 768px) {
  .counter {
    top: 12px;
    padding: 5px;
  }

  .counter-ring {
    width: 100px;
    height: 100px;
  }

  .counter-text {
    font-size: 1.5rem;
  }

  .counter-divider,
  .counter-max {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .counter {
    padding: 4px;
  }

  .counter-ring {
    width: 85px;
    height: 85px;
  }

  .counter-text {
    font-size: 1.3rem;
  }

  .counter-divider,
  .counter-max {
    font-size: 0.9rem;
  }
}

.counter.visible {
  opacity: 1;
}

.counter.hidden {
  opacity: 0;
}

.counter-ring {
  display: block;
}

.counter-ring-bg {
  fill: none;
  stroke: rgba(255, 165, 0, 0.15);
  stroke-width: 6;
}

.counter-ring-progress {
  fill: none;
  stroke: #ff9500;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 4px rgba(255, 140, 0, 0.3));
  transition: stroke-dashoffset 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.counter-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 500;
  color: #ff8c00;
  font-family: "Playfair Display", "Georgia", serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  pointer-events: none;
}

#counterValue {
  font-weight: 500;
  color: #ff8c00;
}

.counter-divider,
.counter-max {
  font-size: 1.2rem;
  opacity: 0.6;
  color: #ffa500;
}

#plusOneContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.plus-one {
  position: absolute;
  color: #ff9500;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 28px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
  pointer-events: none;
  animation: plusOneFloat 1s ease-out forwards;
}

@keyframes plusOneFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.3);
  }
}

#flowerCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="20" font-size="20">🌸</text></svg>')
      12 12,
    crosshair;
  touch-action: none;
  position: relative;
  z-index: 1;
}
#flowerCanvas.disabled {
  cursor: default;
}

#birthdayMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #4a4a4a;
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 400;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 1px;
  padding: 45px 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  box-shadow: 0 10px 40px rgba(255, 140, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(255, 165, 0, 0.2);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s ease-out;
}

#birthdayMessage .message-line-1 {
  font-size: 0.6em;
  font-weight: 300;
  margin-bottom: 0.3em;
  color: #ff9500;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: none;
}

#birthdayMessage .message-line-2 {
  font-size: 1.15em;
  font-weight: 500;
  margin-bottom: 0.4em;
  color: #ff8c00;
  text-shadow: none;
}

#birthdayMessage .message-line-3 {
  font-size: 0.9em;
  margin: 0.6em 0;
  filter: none;
}

#birthdayMessage .message-subtitle {
  font-size: 0.4em;
  font-weight: 300;
  margin-top: 1.2em;
  color: #ffa500;
  opacity: 0.8;
  font-style: italic;
  letter-spacing: 1px;
  text-shadow: none;
}

#birthdayMessage.visible {
  opacity: 1;
  animation: messageEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    messagePulse 2.5s ease-in-out 1.2s 2;
}

/* Rose wird jetzt mit Canvas gezeichnet - keine CSS-Animation mehr benötigt */

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  #birthdayMessage {
    padding: 25px 20px;
    border-radius: 18px;
    max-width: 85vw;
    font-size: clamp(22px, 4vw, 38px);
  }

  #birthdayMessage .message-line-1 {
    letter-spacing: 2px;
    margin-bottom: 0.2em;
  }

  #birthdayMessage .message-line-3 {
    font-size: 1em;
  }

  #birthdayMessage .message-subtitle {
    letter-spacing: 1px;
    margin-top: 1em;
  }

  .plus-one {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  #birthdayMessage {
    padding: 20px 18px;
    font-size: clamp(18px, 3.5vw, 32px);
  }

  #birthdayMessage .message-line-1 {
    letter-spacing: 1px;
  }

  #birthdayMessage .message-subtitle {
    font-size: 0.45em;
  }

  .plus-one {
    font-size: 18px;
  }
}

/* Touch Optimization */
@media (hover: none) and (pointer: coarse) {
  #flowerCanvas {
    cursor: default;
  }

  body {
    -webkit-tap-highlight-color: transparent;
  }
}

#birthdayMessage.hidden {
  opacity: 0;
}

@keyframes messageEntrance {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    filter: blur(30px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0px);
  }
}

#startText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ff8c00;
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 400;
  text-align: center;
  letter-spacing: 1px;
  padding: 25px 50px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 165, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15),
    0 8px 30px rgba(255, 107, 53, 0.1);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  font-family: "Playfair Display", "Georgia", serif;
}

#startText.visible {
  opacity: 1;
  animation: startPulse 2s ease-in-out infinite;
}

#startText.hidden {
  opacity: 0;
}

@keyframes startPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15),
      0 8px 30px rgba(255, 107, 53, 0.1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.25),
      0 10px 40px rgba(255, 107, 53, 0.2);
  }
}

@keyframes messagePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* Ehrenfeld Skyline */
#ehrenfeldSkyline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease-out;
}

#ehrenfeldSkyline.visible {
  opacity: 1;
  animation: skylineEntrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#ehrenfeldSkyline.hidden {
  opacity: 0;
}

@keyframes skylineEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#ehrenfeldSkyline .building {
  fill: none;
  stroke: #ffa500;
  stroke-width: 2.5;
  opacity: 0.2;
  filter: drop-shadow(0 0 15px rgba(255, 165, 0, 0.3));
}

/* Landmarks - erkennbare Köln-Wahrzeichen */
#ehrenfeldSkyline .landmark {
  opacity: 0.3;
  stroke-width: 2.5;
}

#ehrenfeldSkyline .landmark.dom {
  opacity: 0.38;
  stroke-width: 2.8;
  filter: drop-shadow(0 0 22px rgba(255, 165, 0, 0.45));
}

#ehrenfeldSkyline .landmark.heliosturm {
  opacity: 0.4;
  stroke-width: 3;
  filter: drop-shadow(0 0 25px rgba(255, 165, 0, 0.5));
}

#ehrenfeldSkyline .landmark.fernsehturm {
  opacity: 0.22;
  stroke-width: 2;
}

#ehrenfeldSkyline .window {
  fill: rgba(255, 215, 0, 0);
  transition: fill 0.3s ease;
}

#ehrenfeldSkyline .window.lit {
  fill: rgba(255, 215, 0, 0.6);
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

@keyframes skylineGlow {
  0%,
  100% {
    opacity: 0.2;
    filter: drop-shadow(0 0 15px rgba(255, 165, 0, 0.3));
  }
  50% {
    opacity: 0.35;
    filter: drop-shadow(0 0 25px rgba(255, 165, 0, 0.5));
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #birthdayMessage {
    padding: 30px 40px;
    font-size: clamp(24px, 6vw, 48px);
  }

  #startText {
    padding: 20px 35px;
  }

  .counter {
    padding: 8px;
  }

  .counter-ring {
    width: 100px;
    height: 100px;
  }

  .counter-ring-bg,
  .counter-ring-progress {
    cx: 50;
    cy: 50;
    r: 42;
  }

  .counter-ring-progress {
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
  }

  .counter-text {
    font-size: 1.5rem;
  }

  .counter-divider,
  .counter-max {
    font-size: 1rem;
  }

  #ehrenfeldSkyline {
    height: 150px;
  }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
