/* Spelling Bee / Akshar Madhu Styles */
:root {
  --bg: #0a0a14;
  --panel: #1a1a2e;
  --border: #2a2a4a;
  --text: #f0f0f5;
  --muted: #8888aa;
  --accent: #f7b731;
  --center: #f7b731;
}

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

body {
  background: linear-gradient(180deg, #0a0a14 0%, #1a1a2e 100%);
  color: var(--text);
  font-family: 'Chivo', system-ui, sans-serif;
  min-height: 100vh;
}

.game-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
}

.game-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat {
  text-align: center;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

/* Progress Bar */
.progress-section {
  margin-bottom: 20px;
}

.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9f43);
  border-radius: 4px;
  transition: width 0.3s;
  width: 0;
}

#rank-display {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 6px;
  text-align: center;
  font-weight: 600;
}

/* Word Input */
.input-section {
  margin-bottom: 24px;
  text-align: center;
}

#word-input {
  min-height: 48px;
  padding: 12px 20px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

#word-input .letter {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

#word-input .letter.center {
  color: var(--accent);
}

#word-input .placeholder {
  color: var(--muted);
  font-size: 1rem;
}

#word-input.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

#message {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 10px 20px;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 50;
}

#message.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Honeycomb Grid */
#hex-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.hex-row {
  display: flex;
  gap: 8px;
}

.hex-btn {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 8px;
  background: var(--panel);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hex-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.hex-btn:active {
  transform: scale(0.95);
}

.hex-btn.center {
  background: var(--accent);
  color: #0a0a14;
  border-color: var(--accent);
}

.hex-btn.center:hover {
  background: #ffb839;
}

/* Control Buttons */
.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.control-btn {
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
}

.control-btn.primary {
  background: var(--accent);
  color: #0a0a14;
  border-color: var(--accent);
}

.control-btn.primary:hover {
  background: #ffb839;
}

/* Found Words */
.found-section {
  flex: 1;
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

.found-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.found-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
}

.words-count {
  font-size: 0.8rem;
  color: var(--muted);
}

#found-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

#found-words li {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: capitalize;
}

#found-words li.pangram {
  background: var(--accent);
  color: #0a0a14;
  font-weight: 700;
}

/* Win Screen */
#win-screen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 100;
}

#win-screen.show {
  opacity: 1;
  visibility: visible;
}

.win-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 320px;
}

.win-emoji {
  font-size: 4rem;
  margin-bottom: 16px;
}

.win-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.win-stats {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.8;
}

.win-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a14;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 400px) {
  .hex-btn {
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }

  #word-input .letter {
    font-size: 1.5rem;
  }
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  list-style: none;
  gap: 8px;
}

.breadcrumb li::after {
  content: '›';
  margin-left: 8px;
  color: var(--muted);
}

.breadcrumb li:last-child::after { display: none; }

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--accent); }

.more-link {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 500px) {
  .breadcrumb { display: none; }
}

/* Game Content */
.game-content {
  max-width: 500px;
  margin: 32px auto;
  padding: 0 16px;
}

.game-content section {
  margin-bottom: 32px;
}

.game-content h2 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.game-content p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.game-content ol,
.game-content ul {
  color: var(--muted);
  line-height: 1.8;
  padding-left: 24px;
  font-size: 0.9rem;
}

.game-content li { margin-bottom: 8px; }
.game-content strong { color: var(--text); }

/* Footer */
.bp-footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding: 24px 16px;
}

.bp-footer__inner {
  max-width: 500px;
  margin: 0 auto;
}

.bp-footer__social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.bp-footer__social-link {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.bp-footer__social-link.instagram { background: rgba(225,48,108,0.2); color: #e1306c; }
.bp-footer__social-link.twitter { background: rgba(29,161,242,0.2); color: #1da1f2; }
.bp-footer__social-link.feedback { background: rgba(183,255,60,0.2); color: var(--accent); }
.bp-footer__social-link:hover { transform: translateY(-2px); }

.bp-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.bp-footer__bottom nav { display: flex; gap: 16px; }
.bp-footer__bottom a { color: var(--muted); text-decoration: none; }
.bp-footer__bottom a:hover { color: var(--accent); }
