/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ===== 7-ELEVEN LOGO ===== */
.seven-eleven-logo {
  display: inline-flex;
  align-items: center;
  background: #FF6B35;
  border-radius: 12px;
  padding: 8px 16px;
  margin-bottom: 20px;
}

.seven-eleven-logo.small {
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 0;
}

.logo-7 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: white;
  line-height: 1;
}

.seven-eleven-logo.small .logo-7 {
  font-size: 1.5rem;
}

.logo-eleven {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: white;
  margin-left: 2px;
  line-height: 1;
}

.seven-eleven-logo.small .logo-eleven {
  font-size: 0.9rem;
}

/* ===== SPLASH SCREEN ===== */
.splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #FF6B35 0%, #E63946 50%, #00A86B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s ease-out;
}

.splash-card {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: popIn 0.4s ease-out;
}

.splash-card h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: #FF6B35;
  margin-bottom: 12px;
}

.splash-card p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 32px;
}

.btn-start {
  background: #00A86B;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 18px 48px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(0,168,107,0.4);
}

.btn-start:hover, .btn-start:active {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(0,168,107,0.5);
}

/* ===== GAME SCREEN ===== */
.game {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 220px; /* space for calc strip */
}

/* ===== HEADER ===== */
.header {
  background: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.instruction {
  font-size: 1rem;
  color: #444;
}

/* ===== ITEMS GRID ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px 16px;
  flex: 1;
}

@media (min-width: 480px) {
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px;
  }
}

/* ===== ITEM CARD ===== */
.item-card {
  background: white;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  border: 4px solid transparent;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  user-select: none;
  -webkit-user-select: none;
}

.item-card:active {
  transform: scale(0.96);
}

.item-card.selected {
  border-color: #FFD700;
  box-shadow: 0 0 0 2px #FFD700, 0 4px 16px rgba(255,215,0,0.4);
  transform: scale(1.04);
}

.item-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.item-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
}

.item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.2;
}

.item-price {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  color: #FF6B35;
  background: #FFF3EE;
  border-radius: 20px;
  padding: 2px 12px;
  display: inline-block;
}

/* ===== LOADING ===== */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 1.2rem;
  color: #888;
}

/* ===== CALCULATION STRIP ===== */
.calc-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 4px solid #FF6B35;
  padding: 16px 20px 24px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  z-index: 20;
  animation: slideUp 0.3s ease-out;
}

.calc-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.calc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.calc-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  border: 3px solid #FFD700;
}

.calc-price {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: #FF6B35;
}

.calc-operator {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: #E63946;
  line-height: 1;
}

.calc-total {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: #00A86B;
  background: #E8F8F2;
  border-radius: 16px;
  padding: 4px 20px;
  animation: popIn 0.3s ease-out;
}

.btn-reset {
  display: block;
  margin: 0 auto;
  background: #00A86B;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 40px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(0,168,107,0.35);
}

.btn-reset:hover, .btn-reset:active {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0,168,107,0.45);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
