/* =====================================
   🎨 DESIGN SYSTEM
===================================== */

:root {
  --bg: #fef5e7;
  --surface: #ffffff;

  --primary: #ff6b9d;
  
  --food: #ffa502;
  --food-soft: #fff8f0;
  
  --drink: #00bcd4;
  --drink-soft: #e0f7fa;
  
  --play: #7c3aed;
  --play-soft: #f3e8ff;

  --danger: #f05454;

  --text-dark: #2c3e50;
  --text-light: #7f8c8d;

  --radius-xl: 28px;
  --radius-lg: 20px;

  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* =====================================
   🌍 BASE
===================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  background: linear-gradient(135deg, #fef5e7 0%, #fff9e6 50%, #e8f5e9 100%);
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated background bubbles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 192, 203, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(135, 206, 250, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(144, 238, 144, 0.15) 0%, transparent 50%);
  animation: bubbleShift 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes bubbleShift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 40px) scale(0.9);
  }
  75% {
    transform: translate(40px, 20px) scale(1.05);
  }
}

.app-container {
  width: 100%;
  max-width: 1000px;
  padding: 40px 24px 0;
  position: relative;
  z-index: 1;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

.screen.active {
  display: flex;
}

.hidden {
  display: none !important;
}

/* =====================================
   ⭐ START
===================================== */

.start-illustration {
  font-size: 100px;
  text-align: center;
  margin-top: 100px;
  animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.6));
  }
}

.app-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin: 20px 0 40px;
  background: linear-gradient(135deg, var(--primary), #ff8fb7, #ffa502);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  display: block;
  margin: auto;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8fb7 100%);
  color: white;
  border: none;
  padding: 18px 50px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:active {
  transform: translateY(-2px) scale(0.98);
}

/* =====================================
   🟠 CHOICE
===================================== */

.choice-grid {
  display: grid;
  gap: 40px;
  flex: 1;
}

@media (min-width: 768px) {
  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.choice-card {
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  text-align: center;
}

.choice-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.choice-card:active {
  transform: scale(0.98);
}

.choice-card .illustration {
  font-size: 80px;
  margin-bottom: 20px;
  animation: iconBounce 0.6s ease infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.choice-card span {
  font-size: 30px;
  font-weight: 800;
  display: block;
}

.choice-card {
  background: linear-gradient(135deg, var(--play-soft), #fff);
  color: var(--play);
  border: 3px solid var(--play);
}

.choice-card.food {
  background: linear-gradient(135deg, #fff4e6 0%, #fff9c4 100%);
  color: #f57c00;
  border: 3px solid #ff9800;
}

.choice-card.drink {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
  color: #0097a7;
  border: 3px solid #00bcd4;
}

/* =====================================
   🍔 ITEMS
===================================== */

.items-grid {
  display: grid;
  gap: 40px;
  flex: 1;
}

@media (min-width: 768px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.item-card {
  background: linear-gradient(135deg, #fff9c4 0%, #fff8f0 100%);
  border-radius: var(--radius-xl);
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border: 3px solid #ffa502;
  animation: itemSlideIn 0.6s ease forwards;
}

@keyframes itemSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.item-card:nth-child(2n) {
  background: linear-gradient(135deg, #e0f7fa 0%, #f0f9ff 100%);
  border: 3px solid #00bcd4;
}

.item-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 35px rgba(255, 107, 157, 0.25);
}

.item-card:active {
  transform: scale(0.95);
}

.item-card.added {
  animation: addedPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes addedPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.15);
    background-color: rgba(255, 107, 157, 0.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.item-card .icon {
  font-size: 80px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.item-card:hover .icon {
  transform: scale(1.2) rotateY(10deg);
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0%, 100% {
    filter: drop-shadow(0 0 0px rgba(255, 107, 157, 0));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.5));
  }
}

.item-card .name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
}

/* =====================================
   🛒 ORDER BAR
===================================== */

.order-bar {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
  padding: 20px 25px;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  z-index: 100;
  border-top: 3px solid var(--primary);
  display: flex;
  animation: slideUp 0.4s ease forwards;
  min-height: 80px;
  margin-top: auto;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.order-items-list {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  min-height: 50px;
}

.order-items {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  min-height: 50px;
}

.order-item {
  background: linear-gradient(135deg, #f8d7ff 0%, #f1e6ff 100%);
  padding: 12px 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 75px;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  animation: itemPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes itemPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.order-item:hover {
  background: linear-gradient(135deg, #ff7c99 0%, #ff6b9d 100%);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
}

.cart-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.cart-img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-name {
  font-size: 13px;
  margin-top: 4px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ===============================
   ✖ REMOVE BUTTON
================================ */

.remove-btn {
  margin-top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(240, 84, 84, 0.4);
}

.remove-btn:active {
  animation: removeSpin 0.6s ease forwards;
}

@keyframes removeSpin {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

/* =====================================
   📱 RESPONSIVE
===================================== */

@media (max-width: 600px) {
  .choice-card {
    padding: 45px 25px;
  }

  .choice-card span {
    font-size: 24px;
  }

  .item-card {
    padding: 35px 20px;
  }

  .item-card .icon {
    font-size: 60px;
  }
}

.image-wrapper {
  width: 90px;
  height: 90px;
  margin: auto;
  margin-bottom: 15px;
  border-radius: 20px;
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.illustration img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.app-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--primary);
}

.app-header h2 {
  color: var(--primary);
  font-size: 28px;
  margin: 0;
}

.back-btn {
  background: linear-gradient(135deg, var(--primary), #ff8fb7);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  margin-bottom: 15px;
}

.back-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
}

.back-btn:active {
  transform: scale(0.95);
}

/* ===============================
   📤 SUBMIT BUTTON & MODAL
=============================== */

.submit-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 15px 28px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  width: 100%;
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
}

.submit-btn:active {
  transform: scale(0.95);
}

/* FLOATING CART ICON */
.cart-icon-floating {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b9d 0%, #ffa502 100%);
  color: white;
  padding: 18px 24px;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 800;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  cursor: grab;
  z-index: 1005;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s;
}
.cart-icon-floating.dragging {
  opacity: 0.8;
  cursor: grabbing;
  transform: scale(1.1);
}

.cart-icon-floating .count {
  background: #fff;
  color: #ff6b9d;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 18px;
  font-weight: 900;
}

.cart-icon-floating.has-items {
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ff6b9d;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #ff4981;
  transform: rotate(90deg);
}

.modal-header {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 30px 25px;
  text-align: center;
}

.modal-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}

.order-item-modal {
  background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 5px solid #4caf50;
  animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.order-item-image {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  background: white;
  padding: 3px;
}

.order-item-name {
  font-weight: 700;
  font-size: 16px;
  color: #333;
  flex: 1;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid #f0f0f0;
}

.btn-start-new {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #ff8fb7);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-start-new:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
}

.btn-start-new:active {
  transform: scale(0.95);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.btn-submit:active {
  transform: scale(0.95);
}

