/**
 * Sushi Smash - Modern Izakaya Theme Styling
 * Desktop Widescreen Layout + Mobile Responsive
 */

:root {
  --bg-main: #0c1015;
  --bg-panel: rgba(18, 24, 32, 0.95);
  --bg-card: #1e2632;
  --bg-slot: rgba(30, 39, 50, 0.7);
  --bg-slot-alt: rgba(23, 30, 39, 0.7);

  --wood-dark: #1e1614;
  --wood-rim: #3d2314;
  --gold: #f1c40f;
  --gold-glow: rgba(241, 196, 15, 0.4);
  --wasabi: #2ed573;
  --crimson: #c0392b;
  --crimson-light: #eb4d4b;
  --text-main: #ffffff;
  --text-muted: #a4b0be;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-main: 0 12px 40px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at 50% 20%, rgba(235, 77, 75, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(46, 213, 115, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #151a21 0%, #090c0f 100%);
  color: var(--text-main);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: manipulation;
}

/* --- App Container (Full Window Desktop Experience) --- */
#app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-panel);
}

/* --- Top Navigation Header --- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(14, 18, 24, 0.95);
  border-bottom: 2px solid var(--wood-rim);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ff7675, #fab1a0, #fdcb6e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 28px;
}

.header-controls {
  display: flex;
  gap: 10px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: translateY(1px);
}

.btn-muted {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.25);
}

.hidden {
  display: none !important;
}

/* --- Non-Obstructive Top Combo Toast Banner --- */
.combo-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.96), rgba(214, 48, 49, 0.96));
  border: 2px solid var(--gold);
  border-radius: 30px;
  padding: 6px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 16px rgba(241, 196, 15, 0.5);
  pointer-events: none;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.combo-toast.hidden {
  display: none !important;
}

.toast-main {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.toast-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.pop-in {
  animation: toast-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-out {
  opacity: 0;
  transform: translate(-50%, -75%) scale(0.85);
}

@keyframes toast-pop {
  0% { transform: translate(-50%, -20%) scale(0.6); opacity: 0; }
  70% { transform: translate(-50%, -55%) scale(1.08); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
}

/* --- Main Game Workspace (Widescreen Multi-Column) --- */
.game-workspace {
  flex: 1;
  display: flex;
  width: 100%;
  height: calc(100vh - 65px);
  overflow: hidden;
}

/* --- Left Sidebar HUD --- */
.sidebar-hud {
  width: 360px;
  padding: 20px 22px;
  background: rgba(18, 23, 30, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-card {
  background: rgba(26, 34, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.sidebar-section-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fab1a0;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.level-meta h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fab1a0;
  margin-bottom: 4px;
}

.level-meta p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}

.moves-card {
  padding: 0;
  background: transparent;
  border: none;
}

.moves-badge {
  background: linear-gradient(145deg, #2c1e1a, #4a1c18);
  border: 2px solid var(--crimson-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.moves-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fab1a0;
  letter-spacing: 0.6px;
}

.moves-count {
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin-top: 2px;
}

.moves-badge.low-moves {
  animation: pulse-danger 0.8s infinite alternate;
  border-color: #ff3838;
}

/* Score Progress Bar in Sidebar */
.score-progress-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-text-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.score-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}

.progress-bar-track {
  width: 100%;
  height: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  position: relative;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff7675, #fab1a0, #f1c40f);
  border-radius: 20px;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.6);
}

.star-nodes {
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
}

.star-node {
  position: absolute;
  font-size: 22px;
  color: #485460;
  transform: translateX(-50%);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-node.earned {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(241, 196, 15, 0.9);
  transform: translateX(-50%) scale(1.3);
}

/* Bento Order Objectives (1-Per-Line Spacious List) */
.orders-tray {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(14, 18, 24, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all 0.25s ease;
}

.order-row:hover {
  background: rgba(22, 28, 38, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

.order-row.order-done {
  background: rgba(46, 213, 115, 0.15);
  border-color: var(--wasabi);
}

.order-piece-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.order-piece-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.order-icon-large {
  font-size: 32px;
}

.order-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.order-subtitle {
  font-size: 11px;
  color: #fab1a0;
  font-weight: 600;
}

.order-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  background: rgba(235, 77, 75, 0.2);
  border: 1px solid var(--crimson-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
}

.order-badge.badge-done {
  background: rgba(46, 213, 115, 0.25);
  border-color: var(--wasabi);
  color: var(--wasabi);
  font-weight: 900;
  font-size: 13px;
}

.remaining-num {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.remaining-label {
  font-size: 10px;
  font-weight: 800;
  color: #fab1a0;
  letter-spacing: 0.5px;
}

.check-icon {
  font-size: 16px;
  color: var(--wasabi);
  margin-right: 2px;
}

/* --- Center Game Canvas Arena --- */
.canvas-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(30, 39, 50, 0.4) 0%, rgba(12, 16, 21, 0.9) 100%);
}

#canvas-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#game-canvas {
  display: block;
  touch-action: none;
  cursor: pointer;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
}

/* --- Right Sidebar Special Powers --- */
.sidebar-powers {
  width: 340px;
  padding: 20px 22px;
  background: rgba(18, 23, 30, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.quick-power-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-power-item {
  background: rgba(14, 18, 24, 0.75);
  border-left: 3px solid;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.wasabi-border { border-left-color: var(--wasabi); }
.aburi-border { border-left-color: #ff9f1a; }
.dragon-border { border-left-color: var(--gold); }

.quick-power-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.quick-power-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.quick-merger-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.merger-pill {
  background: rgba(14, 18, 24, 0.75);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-main);
  border-left: 2px solid var(--crimson-light);
}

.merger-pill strong {
  color: var(--gold);
}

/* --- MODALS (Widescreen Optimized) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 24px;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-main);
  animation: modal-enter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.modal-widescreen {
  max-width: 980px !important;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1.0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 900;
  color: #fab1a0;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-close:hover {
  color: #ffffff;
}

/* Level Select Grid */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.level-card {
  background: rgba(24, 30, 38, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.level-card:hover:not(.locked) {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px var(--gold-glow);
}

.level-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.level-number, .level-num {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
}

.level-name {
  font-size: 13px;
  font-weight: 700;
  color: #fab1a0;
}

.level-stars {
  display: flex;
  gap: 4px;
  font-size: 18px;
  color: #485460;
}

.star-icon {
  color: #3d4a5d;
  transition: all 0.2s ease;
}

.star-icon.earned,
.level-stars .earned,
.level-stars .star-earned {
  color: var(--gold) !important;
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.95), 0 0 4px #e67e22 !important;
  filter: drop-shadow(0 2px 4px rgba(241, 196, 15, 0.5));
}

.level-score {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  background: rgba(241, 196, 15, 0.12);
  border: 1px solid rgba(241, 196, 15, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
}

/* Victory / Game Over Modals */
.victory-modal {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.victory-title {
  font-size: 32px;
  font-weight: 900;
  color: #fbc531;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.victory-stars {
  display: flex;
  gap: 12px;
  font-size: 42px;
  margin: 10px 0;
}

.victory-star {
  color: #2d3436;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.victory-star.earned {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(241, 196, 15, 0.9);
  animation: star-bounce 0.5s ease;
}

@keyframes star-bounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.35); }
  100% { transform: scale(1); opacity: 1; }
}

.highscore-badge {
  background: linear-gradient(135deg, #e67e22, #f39c12);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.5);
  animation: pulse-badge 1s infinite alternate;
}

@keyframes pulse-badge {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.stats-card {
  background: rgba(18, 23, 29, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 28px;
  display: flex;
  gap: 30px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
}

/* --- Continue / Out of Moves Modal --- */
.continue-modal {
  max-width: 540px !important;
  padding: 32px 30px !important;
  gap: 20px;
}

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

.continue-badge {
  background: rgba(235, 77, 75, 0.2);
  border: 1px solid var(--crimson-light);
  color: #fab1a0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
}

.continue-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.continue-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

/* Extra Moves Buttons */
.extra-moves-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.move-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.move-option-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.ad-option-btn {
  background: linear-gradient(135deg, rgba(20, 45, 30, 0.9), rgba(15, 30, 22, 0.95));
  border-color: #2ed573;
  box-shadow: 0 6px 20px rgba(46, 213, 115, 0.25);
}

.ad-option-btn:hover {
  box-shadow: 0 10px 28px rgba(46, 213, 115, 0.45);
  border-color: #7bed9f;
}

.buy-option-btn {
  background: linear-gradient(135deg, rgba(50, 35, 10, 0.9), rgba(30, 20, 8, 0.95));
  border-color: #f1c40f;
  box-shadow: 0 6px 20px rgba(241, 196, 15, 0.25);
}

.buy-option-btn:hover {
  box-shadow: 0 10px 28px rgba(241, 196, 15, 0.45);
  border-color: #ffeaa7;
}

.move-option-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.option-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.option-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.option-name {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
}

.option-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.option-reward-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  min-width: 80px;
}

.ad-reward {
  background: rgba(46, 213, 115, 0.2);
  border: 1px solid #2ed573;
  color: #2ed573;
}

.buy-reward {
  background: rgba(241, 196, 15, 0.2);
  border: 1px solid #f1c40f;
  color: #f1c40f;
}

.reward-plus {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.reward-unit {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.reward-tag {
  font-size: 11px;
  font-weight: 900;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #2ed573;
  color: #0d1e13;
}

.price-tag {
  background: #f1c40f;
  color: #2b1d03;
}

.continue-stats {
  width: 100%;
  justify-content: space-around;
  padding: 12px 20px;
}

.continue-actions {
  width: 100%;
  gap: 12px;
}

/* --- Simulated Ad Player Modal --- */
.ad-player-card {
  max-width: 480px !important;
  background: #0d1117 !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  padding: 24px !important;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ad-sponsor-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.ad-timer {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.ad-screen {
  background: linear-gradient(145deg, #1b2838, #2a475e);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-tv-icon {
  font-size: 48px;
  animation: pulse-tv 1s infinite alternate;
}

@keyframes pulse-tv {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.ad-content-box h3 {
  font-size: 18px;
  font-weight: 900;
  color: #fab1a0;
  margin-bottom: 6px;
}

.ad-content-box p {
  font-size: 13px;
  color: #ffffff;
  opacity: 0.85;
  margin-bottom: 16px;
}

.ad-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
}

.ad-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2ed573, #7bed9f);
  border-radius: 10px;
  transition: width 0.05s linear;
}

.ad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #2ed573;
}

.ad-simulated-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Simulated Store Purchase Modal --- */
.iap-confirm-card {
  max-width: 440px !important;
  text-align: center;
}

.iap-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.iap-icon {
  font-size: 52px;
}

.iap-body h3 {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
}

.iap-price-tag {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  background: rgba(241, 196, 15, 0.12);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 6px 20px;
  margin: 6px 0;
}

.iap-note {
  font-size: 12px;
  color: var(--text-muted);
}

.iap-pay-btn {
  background: linear-gradient(135deg, #f1c40f, #e67e22) !important;
  color: #1a1202 !important;
  font-weight: 900 !important;
  font-size: 17px !important;
}

.modal-actions {
  display: flex;
  gap: 14px;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff7675, #d63031);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(214, 48, 49, 0.4);
  transition: all 0.18s ease;
  flex: 1;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff6b6b, #c0392b);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214, 48, 49, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  flex: 1;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* --- Sushi Cookbook Guide Cards --- */
.guide-section {
  margin-bottom: 24px;
}

.guide-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fab1a0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.guide-card {
  background: rgba(24, 30, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.guide-piece-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.guide-jp {
  font-size: 11px;
  color: #fab1a0;
  font-weight: 600;
}

.guide-header strong {
  font-size: 15px;
  color: #ffffff;
}

.guide-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.special-card {
  border-width: 2px;
}

.wasabi-card {
  border-color: var(--wasabi);
  background: rgba(46, 213, 115, 0.12);
}

.aburi-card {
  border-color: #ff9f1a;
  background: rgba(255, 159, 26, 0.12);
}

.dragon-card {
  border-color: var(--gold);
  background: rgba(241, 196, 15, 0.12);
}

.combo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.combo-item {
  background: rgba(18, 23, 29, 0.7);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  border-left: 3px solid var(--crimson-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.combo-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  color: var(--gold);
  font-size: 15px;
  min-width: 76px;
}

.combo-mini-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.order-piece-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* --- Developer Tools Styles --- */
.dev-toggle-btn {
  background: rgba(0, 206, 201, 0.15) !important;
  border-color: #00cec9 !important;
  color: #81ecec !important;
  font-weight: 800 !important;
}

.dev-toggle-btn:hover {
  background: rgba(0, 206, 201, 0.3) !important;
  box-shadow: 0 0 14px rgba(0, 206, 201, 0.5) !important;
}

.dev-modal-card {
  max-width: 680px !important;
  background: #0f141c !important;
  border: 2px solid #00cec9 !important;
  box-shadow: 0 10px 40px rgba(0, 206, 201, 0.25) !important;
}

.dev-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.dev-section {
  background: rgba(22, 29, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: #81ecec;
  letter-spacing: 0.6px;
}

.dev-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dev-select {
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  min-width: 180px;
}

.dev-select option {
  background: #161d28;
  color: #ffffff;
}

.dev-input {
  background: rgba(10, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  width: 90px;
  text-align: center;
}

.dev-btn {
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  flex: initial !important;
}

/* --- Mobile / Small Screen Fallback --- */
@media (max-width: 960px) {
  .sidebar-powers {
    display: none;
  }
  .sidebar-hud {
    width: 260px;
  }
}

@media (max-width: 720px) {
  .game-workspace {
    flex-direction: column;
  }
  .sidebar-hud {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
  }
  .sidebar-card {
    padding: 8px 12px;
  }
  .moves-count {
    font-size: 22px;
  }
  .canvas-wrapper {
    padding: 8px;
  }
}
