body {
  margin: 0;
  padding: 0;
  background-color: #0b0f19;
  font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #f1f5f9;
}

header {
  margin: 0 auto;
  text-align: center;
  padding: 10px 0;
}

.responsive {
  max-width: 90%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.game-title {
  text-align: center;
  margin: 10px 0 4px 0;
  font-family: 'Fredoka', cursive, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #c084fc;
  letter-spacing: 0.5px;
}

.game-subtitle {
  text-align: center;
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Game Area */
#potion-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 20px auto;
  padding: 0 10px;
  box-sizing: border-box;
  position: relative;
}

/* Status Bar */
.game-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 540px;
  margin-bottom: 10px;
  padding: 8px 16px;
  background: #1e1b4b;
  border: 1px solid #7c3aed;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
  box-sizing: border-box;
}

.status-badge {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #c084fc;
}

.moves-badge {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #cbd5e1;
}

#gameCanvas {
  background: #0f172a;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid #6366f1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: block;
  margin: 0 auto;
}

/* Control Buttons */
.controls-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 540px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1e1b4b;
  border: 1.5px solid #8b5cf6;
  border-radius: 12px;
  padding: 8px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e9d5ff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
  background: #2e1065;
  border-color: #c084fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.control-btn:active {
  transform: translateY(0);
}

/* Win Modal */
.modal-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  z-index: 50;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1e1b4b;
  border: 2px solid #a855f7;
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 340px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.modal-content h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  color: #c084fc;
  margin: 0 0 6px 0;
}

.modal-content p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin: 0 0 18px 0;
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.5);
}

/* Cross-Promotion Games Hub */
.gamesdle-hub-banner {
  max-width: 600px;
  margin: 20px auto 25px auto;
  padding: 16px 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid #4338ca;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  color: #ffffff;
}

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

.hub-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0;
}

.hub-badge {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #a855f7;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 12px;
}

.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.hub-card:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  transform: translateY(-2px);
}

.hub-card.active {
  background: rgba(168, 85, 247, 0.28);
  border-color: #c084fc;
}

.hub-card-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
  line-height: 1;
}

.hub-card-name {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}

.hub-card-tag {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

.hub-card.active .hub-card-tag {
  color: #c084fc;
}

/* Ad Banners */
.ad-banner-wrapper {
  max-width: 728px;
  width: 95%;
  min-height: 90px;
  margin: 15px auto;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.ad-banner-top {
  margin-top: 10px;
  margin-bottom: 15px;
}

.ad-banner-bottom {
  margin-top: 25px;
  margin-bottom: 25px;
}

.side-banner {
  display: none;
  position: fixed;
  top: 100px;
  width: 160px;
  height: 600px;
  z-index: 40;
  text-align: center;
}

.side-banner-left {
  left: 12px;
}

.side-banner-right {
  right: 12px;
}

@media (min-width: 1140px) {
  .side-banner {
    display: block;
  }
}

/* SEO Content Section */
.seo-section {
  max-width: 600px;
  margin: 30px auto 45px auto;
  padding: 24px 22px;
  background: #111827;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid #374151;
  box-sizing: border-box;
  color: #cbd5e1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.seo-section .section-header {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.seo-section .section-header:first-of-type {
  margin-top: 0.2rem;
}

.seo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #2e1065;
  color: #c084fc;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.seo-section h2 {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 4px 0 10px 0;
  line-height: 1.3;
}

.seo-section p {
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 1rem 0;
  color: #94a3b8;
}

/* Steps list */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 20px 0;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.step-card:hover {
  background: #283548;
  border-color: #6366f1;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-content {
  flex: 1;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.step-content strong {
  display: block;
  color: #f1f5f9;
  margin-bottom: 2px;
  font-size: 0.98rem;
}

/* Features Grid */
.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0 22px 0;
}

.seo-feature-card {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.15);
  border-color: #8b5cf6;
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: inline-block;
}

.seo-feature-card h4 {
  font-family: 'Fredoka', sans-serif;
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  color: #f1f5f9;
  font-weight: 600;
}

.seo-feature-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #94a3b8;
}

/* Pro Tips Cards */
.tips-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 22px 0;
}

.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #2e1065;
  border: 1px solid #581c87;
  border-left: 4px solid #a855f7;
  border-radius: 10px;
  padding: 12px 14px;
}

.tip-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.tip-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e9d5ff;
}

.tip-text strong {
  color: #ffffff;
}

/* FAQ Cards */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-card {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 14px 16px;
  transition: background 0.2s ease;
}

.faq-card h3 {
  font-family: 'Fredoka', sans-serif;
  margin: 0 0 6px 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .game-title {
    font-size: 26px;
  }
  .seo-section {
    margin: 20px 10px 35px 10px;
    padding: 18px 14px;
    border-radius: 16px;
  }
  .seo-features-grid {
    grid-template-columns: 1fr;
  }
  .hub-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .hub-card {
    padding: 10px 4px;
  }
}
