git » sparkle-arcade » master » tree

[master] / blossom-blocks / styles.css

:root {
  --bg-start: #ffe9f2;
  --bg-end: #e8f0ff;
  --accent-pink: #f79ad3;
  --accent-purple: #cda9ff;
  --accent-mint: #a6f0d6;
  --accent-blue: #a9c6ff;
  --board-bg: rgba(255, 255, 255, 0.7);
  --cell-size: min(48px, 7vw);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, var(--bg-start), var(--bg-end));
  min-height: 100vh;
  color: #4a2e4f;
  overflow-x: hidden;
}

.background-charms {
  position: fixed;
  inset: 0;
  font-size: 8rem;
  opacity: 0.07;
  pointer-events: none;
  text-align: center;
  letter-spacing: 2rem;
  padding-top: 3rem;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
  position: relative;
  z-index: 1;
}

.top-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1, h2 {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  margin: 0;
  color: #ff5fa2;
}

.tagline {
  margin: 0.2rem 0 0;
  color: #7b588f;
}

.score-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--board-bg);
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(255, 138, 197, 0.25);
}

.score-panel div {
  font-weight: 600;
}

.btn {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-pink), var(--accent-purple));
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(247, 154, 211, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(205, 169, 255, 0.4);
}

.btn-lg {
  font-size: 1.2rem;
  padding: 0.9rem 2.5rem;
}

.play-area {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.board {
  width: min(520px, 90vw);
  aspect-ratio: 1;
  background: var(--board-bg);
  border-radius: 24px;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(10, var(--cell-size));
  grid-template-rows: repeat(10, var(--cell-size));
  gap: 0.4rem;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.6), 0 20px 40px rgba(210, 170, 235, 0.4);
}

.cell {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ff64a5;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  user-select: none;
}

.cell--filled {
  background: linear-gradient(145deg, rgba(255, 200, 230, 0.95), rgba(205, 215, 255, 0.95));
  box-shadow: 0 6px 12px rgba(255, 122, 199, 0.4);
}

.cell--filled::after {
  content: attr(data-emoji);
}

.cell--highlight {
  box-shadow: 0 0 12px rgba(255, 118, 197, 0.8);
}

.cell--clearing {
  animation: sparkle 0.6s ease;
}

@keyframes sparkle {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.4; }
  100% { transform: scale(0.8); opacity: 0; }
}

.pieces {
  background: var(--board-bg);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 0 15px 30px rgba(169, 198, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.piece {
  display: inline-grid;
  grid-auto-rows: 28px;
  grid-auto-columns: 28px;
  gap: 0.2rem;
  padding: 0.4rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
  touch-action: none;
}

.piece-cell {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.piece:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(255, 110, 189, 0.3);
}

.piece.selected {
  border-color: #ff9fd6;
  box-shadow: 0 0 15px rgba(255, 159, 214, 0.6);
  transform: scale(1.03);
}

.instructions {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(169, 156, 255, 0.3);
}

.instructions p {
  margin: 0.2rem 0 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(246, 220, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  background: white;
  padding: 2rem 3rem;
  border-radius: 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(199, 119, 255, 0.3);
}

.floating-score {
  position: absolute;
  pointer-events: none;
  color: #ff5faf;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.drag-ghost {
  position: fixed;
  display: inline-grid;
  gap: 0.25rem;
  padding: 0.4rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 15px 30px rgba(255, 126, 203, 0.4);
  pointer-events: none;
  z-index: 50;
  transform: translate(-50%, -50%);
}

.drag-ghost .piece-cell {
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
}

.drag-ghost--snapped {
  transform: none;
}

@media (max-width: 900px) {
  .play-area {
    grid-template-columns: 1fr;
  }

  .pieces {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}