/* Baby.css - TD Green Theme
   Keeps the same structure/functionality as the original Baby.css:
   - baby picture centered
   - names panel on the right
   - drag-and-drop drop zone
   - score display
   - responsive mobile layout
*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #54B848, #a8e063);
  color: #1f2d1f;
  display: flex;
  flex-direction: column;
}

/* Header */

header {
  padding: 20px 32px;
  background: #ffffff;
  color: #1f2d1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 6px solid #f9d44a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

header h1 {
  margin: 0;
  font-size: 36px;
  color: #54B848;
}

header button {
  background: #54B848;
  color: #ffffff;
  border: 3px solid #2f8f2f;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 0 #2f8f2f;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

header button:hover {
  background: #46a83d;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #2f8f2f;
}

header button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2f8f2f;
}

/* Main Layout */

main {
  flex: 1;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 32px;
}

.game-area {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Baby Card */

.card {
  width: min(520px, 100%);
  background: #ffffff;
  color: #1f2d1f;
  border-radius: 24px;
  padding: 24px;
  border: 6px solid #f9d44a;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.baby-image {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  background: #f2fff0;
  border: 3px solid #54B848;
  display: block;
}

/* Drop Zone */

.drop-zone {
  margin-top: 20px;
  min-height: 64px;
  border: 3px dashed #54B848;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 18px;
  color: #405040;
  background: #f2fff0;
  font-weight: bold;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.drop-zone.active {
  border-color: #f9d44a;
  background: #fff8d8;
  transform: scale(1.02);
}

.drop-zone.filled {
  border-style: solid;
  color: #1f2d1f;
  font-weight: bold;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px #f2fff0;
}

/* Controls */

.controls {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.controls button {
  border: 3px solid #2f8f2f;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 5px 0 #2f8f2f;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.controls button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #2f8f2f;
}

.controls button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2f8f2f;
}

.primary {
  background: #54B848;
  color: #ffffff;
}

.primary:hover {
  background: #46a83d;
}

.secondary {
  background: #ffffff;
  color: #1f2d1f;
  border-color: #54B848;
}

.secondary:hover {
  background: #f2fff0;
}

/* Names Panel */

.names-panel {
  background: #ffffff;
  color: #1f2d1f;
  border-radius: 24px;
  padding: 20px;
  border: 6px solid #f9d44a;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  align-self: start;
}

.names-panel h2 {
  margin-top: 0;
  font-size: 24px;
  color: #54B848;
  text-align: center;
}

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

.name {
  padding: 12px 14px;
  background: #54B848;
  color: #ffffff;
  border: 3px solid #2f8f2f;
  border-radius: 14px;
  cursor: grab;
  user-select: none;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 5px 0 #2f8f2f;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.name:hover {
  background: #46a83d;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #2f8f2f;
}
.name.locked {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

.drop-zone.locked {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

.controls button:disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 0 #2f8f2f;
}
.name:active {
  cursor: grabbing;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2f8f2f;
}

.name.used {
  opacity: 0.35;
  pointer-events: none;
}
.name.current-used {
  opacity: 0.55;
  cursor: pointer;
  pointer-events: auto;
}
/* Score and Progress */

.score-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: #f2fff0;
  color: #1f2d1f;
  border: 3px solid #54B848;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  display: none;
}

.progress {
  margin-top: 14px;
  color: #405040;
  font-size: 15px;
  font-weight: bold;
}

/* Mobile Layout */

@media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .names-panel {
    order: -1;
  }

  .name-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  header {
    padding: 18px 20px;
  }

  header h1 {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  main {
    padding: 14px;
  }

  .card,
  .names-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .baby-image {
    height: 360px;
    object-fit: contain;
    object-position: center;
  } 

  .name-list {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header h1 {
    font-size: 28px;
  }
}