/* Seed Match Custom Flat Styles */

:root {
  --bg-color: #0d1e15;
  --card-bg: rgba(18, 38, 27, 0.96);
  --border-color: rgba(110, 172, 100, 0.25);
  --primary: #346c30;
  --primary-border: #5cb843;
  --text-color: #f4faf6;
  --text-muted: #a6c0b3;
  --gold: #ffb703;
  --success: #5cb843;
  --danger: #bc6c25;
}

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

html, body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.game-wrapper {
  position: relative;
  width: 100vw;
  width: 100dvw;
  height: 177.78vw;
  height: 177.78dvw;
  max-width: 450px;
  max-height: 800px;
  background: var(--bg-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  border: 2px solid var(--border-color);
  box-sizing: border-box;
  padding: 0 !important;
}

.hud-layer {
  position: relative !important;
  width: 100% !important;
  height: 45px !important;
  background: #0d1a13 !important;
  border-bottom: 2px solid var(--primary) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 12px !important;
  margin: 0 !important;
  z-index: 99 !important;
  box-sizing: border-box !important;
}

.canvas-container {
  position: relative;
  width: 100% !important;
  flex: 1 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden;
  background-color: var(--bg-color);
}

/* Map Screen Layout */
.map-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: var(--primary-border);
}

.map-path {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 25px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
}

.map-path::before {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 4px;
  background: var(--primary);
  opacity: 0.3;
  z-index: 1;
}

.map-node-container, .map-node-containerLocked {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  margin: 14px 0;
  flex-shrink: 0;
}

/* Sağa sola konumlandırma */
#node-container-1, #node-container-3, #node-container-5, #node-container-7, #node-container-9,
#node-container-11, #node-container-13, #node-container-15, #node-container-17, #node-container-19,
#node-container-21, #node-container-23, #node-container-25, #node-container-27, #node-container-29 {
  transform: translateX(-40px);
}

#node-container-2, #node-container-4, #node-container-6, #node-container-8, #node-container-10,
#node-container-12, #node-container-14, #node-container-16, #node-container-18, #node-container-20,
#node-container-22, #node-container-24, #node-container-26, #node-container-28, #node-container-30 {
  transform: translateX(40px);
}

.map-node {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid var(--primary-border);
  color: var(--text-color);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s, background-color 0.2s;
}

.map-node:hover:not(.locked) {
  transform: scale(1.1);
  background-color: #5c3816;
}

.map-node.locked {
  background-color: #2b1f18;
  border-color: #402f25;
  color: #7d6555;
  cursor: not-allowed;
  opacity: 0.6;
}

.stars-container {
  position: absolute;
  bottom: -15px;
  display: flex;
  gap: 2px;
  font-size: 11px;
  color: var(--gold);
}

/* Flat Cyberpunk Pill Buttons */
.menu-btn {
  background: var(--primary) !important;
  border: 2px solid var(--primary-border) !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: 30px !important;
  padding: 11px 16px !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
}

.menu-btn:hover {
  background: var(--primary-border) !important;
  color: #07100b !important;
  transform: translateY(-1px);
}

.button-row-double .menu-btn {
  flex: 1;
  width: auto;
}

/* Active Gameplay Viewport */
#game-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  z-index: 5;
  justify-content: space-around;
  width: 100%;
}

.game-info-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background-color: rgba(13, 26, 19, 0.8) !important;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 15px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

#target-indicators-container {
  display: flex;
  gap: 8px;
}

.target-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

/* 6x6 Grid Board Container - Tiles are larger and easier to play */
#grid-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
  background-color: rgba(22, 48, 33, 0.85);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  padding: 6px;
  gap: 6px;
}

/* Grid Tile Styling - Optimized for larger 6x6 size */
.grid-tile {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: rgba(110, 172, 100, 0.15);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s;
}

.grid-tile svg.seed-svg {
  width: 75% !important;
  height: 75% !important;
  filter: drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.45));
}

.grid-tile:hover {
  transform: scale(1.04);
}

.grid-tile.selected {
  outline: 3px solid #f7ede2;
  z-index: 10;
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(247, 237, 226, 0.5);
}

/* Transitions */
.grid-tile.swapping {
  transition: transform 0.2s ease-in-out;
}

.grid-tile.falling {
  animation: fallAnimation 0.3s ease-in;
}

.grid-tile.matched {
  animation: matchPop 0.25s forwards ease-out;
}

@keyframes fallAnimation {
  0% { transform: translateY(-70px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes matchPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); }
  100% { transform: scale(0); opacity: 0; }
}

/* Overlays */
.overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 10, 8, 0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.overlay-card {
  width: 90%;
  max-width: 360px;
  background: #1e1510 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  padding: 24px 16px !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
  animation: modalEnter 0.3s ease-out;
}

.start-card {
  border: 1.5px solid var(--primary-border) !important;
}

.game-over-card {
  border: 1.5px solid #d62828 !important;
}

.level-clear-card {
  border: 1.5px solid #55a630 !important;
  max-width: 320px;
}

@keyframes modalEnter {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Obstacles & Special Tiles (Drink Actions) */

/* Jelly (Jöle/Buz Kaplama) */
.grid-tile.jelly {
  background-color: rgba(144, 224, 239, 0.35) !important;
  border: 2px solid rgba(0, 180, 216, 0.7) !important;
  box-shadow: inset 0 0 10px rgba(0, 180, 216, 0.8), 0 0 4px rgba(144, 224, 239, 0.5);
}

/* Stone Blocker (Kaya Engeli) */
.grid-tile.stone {
  background: radial-gradient(circle, #495057, #212529) !important;
  border: 2px solid #6c757d !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.95);
  cursor: not-allowed !important;
}

/* Striped Drink (Match 4: Sıcak Kahve Fincanı ☕) */
.grid-tile.striped::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 2.5px dashed var(--primary-border);
  border-radius: 8px;
  animation: rotateBorder 8s linear infinite;
  pointer-events: none;
}

/* Bomb Drink (Match 5 T/L: Splash Juice/Shake 🥤) */
.grid-tile.bomb::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 2.5px solid #bc6c25;
  border-radius: 8px;
  box-shadow: 0 0 12px #bc6c25, inset 0 0 6px #bc6c25;
  animation: pulseBorder 1.5s infinite;
  pointer-events: none;
}

/* Rainbow Drink (Match 5 Line: Kokteyl/Smoothie 🍹) */
.grid-tile.rainbow {
  background: radial-gradient(circle, rgba(230, 108, 37, 0.4), rgba(96, 108, 56, 0.4), rgba(40, 54, 24, 0.4)) !important;
  border: 3px solid #ffbe0b !important;
  box-shadow: 0 0 15px #ffbe0b, inset 0 0 10px #ff006e;
  animation: rainbowGlow 2.5s infinite alternate;
}

@keyframes rotateBorder {
  100% { transform: rotate(360deg); }
}

@keyframes pulseBorder {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

@keyframes rainbowGlow {
  0% { box-shadow: 0 0 8px #ffbe0b; }
  100% { box-shadow: 0 0 20px #ff006e; }
}

/* Game status HUD elements */
.game-status-overlay {
  position: absolute;
  top: 5px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 10;
}

#status-level {
  color: var(--primary-border) !important;
}

#status-moves {
  color: var(--gold) !important;
}

.cumulative-score-overlay {
  position: absolute;
  top: 44px;
  left: 15px;
  right: 15px;
  text-align: center;
  pointer-events: none;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  z-index: 10;
  color: #f7ede2;
}

.gameplay-ad-layer {
  position: relative !important;
  background-color: #0d0a08 !important;
  width: 100% !important;
  height: 64px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 100 !important;
}

.hud-reset-btn, .hud-volume-btn {
  background: none !important;
  border: none !important;
  color: #b7a99a !important;
  cursor: pointer !important;
  padding: 0 8px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center;
}

.hud-reset-btn:hover, .hud-volume-btn:hover {
  transform: scale(1.1) !important;
  color: #ffffff !important;
}

.hud-reset-btn svg, .hud-volume-btn svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  display: block !important;
}

/* Utility Hidden state */
.hidden {
  display: none !important;
}

/* Double Button Row Layout */
.button-row-double {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}

.menu-brand-header {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 15px;
  padding: 0 10px;
}

.brand-logo {
  height: 24px;
  filter: none !important;
  border: none;
}

.layout-divider {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

.logo-title, .menu-desc, .food-preview-bar, .button-row-double, .main-start-btn {
  flex-shrink: 0;
}

.main-start-btn {
  margin-top: 12px !important;
}

/* Ideal move hint glow style */
.grid-tile.ideal-move-glow {
  animation: idealMovePulse 1.2s infinite ease-in-out;
  box-shadow: 0 0 12px var(--gold), inset 0 0 6px var(--gold) !important;
  border: 2px solid var(--gold) !important;
  z-index: 10;
}

@keyframes idealMovePulse {
  0% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; box-shadow: 0 0 18px var(--gold), inset 0 0 8px var(--gold); }
  100% { transform: scale(1); opacity: 0.85; }
}



