/*
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

:root {
  --crust: #edb44e;
  --sauce: #d32f2f;
  --cheese: #ffd54f;
  --bg: #fff9c4;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 20px;
}

h1 {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--sauce);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 20px;
  letter-spacing: -2px;
  font-weight: 800;
  text-shadow:
    0px 2px 0px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 255, 255, 0.5);
  text-align: center;
}

#pizza-container {
  position: relative;
  width: 350px;
  height: 350px;
  background-color: var(--crust);
  border-radius: 50%;
  border: 15px solid #d4a342;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 10px 0 #b38635,
    inset 0 0 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  transform: perspective(1000px) rotateX(25deg);
  transform-style: preserve-3d;
}

#sauce-layer,
#cheese-layer {
  position: absolute;
  border-radius: 50%;
  display: none;
  pointer-events: none;
}

#sauce-layer {
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background-color: var(--sauce);
}

#cheese-layer {
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background-color: var(--cheese);
  border: 2px dashed #fbc02d;
}

.topping {
  position: absolute;
  font-size: 50px;
  user-select: none;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  transform-style: preserve-3d;
}

.topping span {
  display: inline-block;
  animation: slideDrop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes slideDrop {
  0% {
    transform: translateY(-600px) translateZ(600px) rotateX(-45deg) scale(2);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) translateZ(0) rotateX(0deg) scale(1);
    opacity: 1;
  }
}

.controls {
  background: white;
  padding: 30px;
  margin-top: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  text-align: center;
}

/* Hide controls if WebMCP is supported */
body.webmcp-supported .controls {
  display: none;
}

.btn-group {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

button {
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:active {
  transform: scale(0.95);
}
.btn-size {
  background: #64b5f6;
}
.btn-style {
  background: #ab47bc;
}
.btn-add {
  background: #81c784;
}
.btn-remove {
  background: #e57373;
}
.btn-reset {
  background: #90a4ae;
}

.size-label {
  font-weight: 700;
  color: #34495e;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.slogan {
  font-style: italic;
  color: #7f8c8d;
  margin-top: -15px;
  font-size: 1.2rem;
  font-weight: 400;
}

.slogan a {
  text-decoration: none;
  color: #7f8c8d;
}

@media (max-width: 600px) {
  body {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .controls {
    border-radius: 20px 20px 0 0;
    padding: 0;
    width: 100%;
  }
}
