body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  text-align: center;
  padding: 30px 20px;
  background: #333;
  color: white;
  margin-bottom: 40px;
}

.site-header h1 {
  margin: 0;
  font-size: 2.5em;
}

.site-header p {
  margin: 10px 0 0;
  font-size: 1.2em;
  opacity: 0.9;
}

.site-footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  background: #333;
  color: white;
}

.site-footer a {
  color: white;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}



.game-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

canvas {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.score-container {
  margin-left: 20px;
  padding: 20px;
  background: rgba(33, 33, 33, 0.95);
  color: white;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  min-width: 300px;
}

.current-game {
  border-bottom: 2px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
}

.score-item {
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 8px;
  flex: 1;
  margin: 0 5px;
  text-align: center;
}

.score-item .label {
  font-weight: bold;
  color: #666;
}

.score-item .value {
  font-size: 1.2em;
  color: #2196F3;
  margin-left: 5px;
}

.stats-container {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
}

.food-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.food-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.food-icon {
  font-size: 1.2em;
}

.food-label {
  color: #666;
  font-size: 0.9em;
}

.food-count {
  margin-left: auto;
  font-weight: bold;
  color: #2196F3;
}

.history-container {
  margin-top: 20px;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-list li {
  background: #f8f9fa;
  margin: 8px 0;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9em;
  line-height: 1.4;
}

#scoreHistory {
  list-style-type: none;
  padding: 0;
}

#scoreHistory li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.game-instructions {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-instructions h3 {
  color: #333;
  font-size: 1.5em;
  margin-bottom: 20px;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 10px;
}

.game-instructions ul {
  list-style: none;
  padding: 0;
}

.game-instructions li {
  padding: 12px 0;
  margin: 8px 0;
  padding-left: 30px;
  position: relative;
}

.game-instructions li:before {
  content: '🎮';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.game-instructions kbd {
  background: #eee;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  border: 1px solid #ccc;
}

.blog-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border: 2px solid #333;
}

/* Modern Dialog Styles */
dialog {
  padding: 25px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: white;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dialog-content {
  text-align: center;
}

.dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.dialog-buttons button {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.dialog-confirm {
  background: #dc3545;
  color: white;
}

.dialog-confirm:hover {
  background: #c82333;
}

.dialog-cancel {
  background: #6c757d;
  color: white;
}

.dialog-cancel:hover {
  background: #5a6268;
}

.blog-section h2 {
  color: #333;
  margin-bottom: 20px;
}

.blog-section p {
  line-height: 1.6;
  margin-bottom: 15px;
}

.screenshots-section {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 20px;
  background: #fff;
  border: 2px solid #333;
}

.screenshot-item {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
}

.screenshot-item img {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.share-button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
}

.share-button.facebook {
  background-color: #3b5998;
}

.share-button.whatsapp {
  background-color: #25d366;
}

.share-button.copy {
  background-color: #555;
}

.share-button.copy:active {
  background-color: #333;
}

.share-button.download {
  background-color: #2196F3;
}

.share-button.download:hover {
  background-color: #1976D2;
}

.clear-button {
  padding: 8px 15px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px 0;
}

.clear-button:hover {
  background-color: #c82333;
}

.control-button {
  padding: 8px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px 0;
}

.control-button:hover {
  background-color: #45a049;
}

.clear-buttons-container {
  display: flex;
  gap: 10px;
  margin: 20px auto;
  justify-content: center;
  max-width: 800px;
}

.mobile-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  position: relative;
  z-index: 100;
}

@media (max-width: 768px) {
  .mobile-controls {
    display: flex;
  }

  .direction-btn {
    width: 80px;
    height: 80px;
    font-size: 32px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .direction-btn:active {
    background: #45a049;
    transform: scale(0.95);
  }

  .horizontal-controls {
    display: flex;
    gap: 20px;
  }
}