/* Game Page Styles */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #f6851b;
  --dark-color: #293447;
  --light-color: #e3f2fd;
  --text-color: #333;
  --white-color: #fff;
  --accent-color: #ff003d;
  --success-color: #28a745;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Pacifico', cursive;
  color: var(--dark-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul {
  list-style: none;
}

/* Header Component */
.game-header {
  background-color: var(--white-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
}

.logo h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.nav ul {
  display: flex;
}

.nav ul li {
  margin-left: 20px;
}

.nav ul li a {
  color: var(--dark-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav ul li a:hover {
  color: var(--secondary-color);
}

#wallet-status {
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--secondary-color);
  color: var(--white-color);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

#wallet-status:hover {
  background-color: var(--dark-color);
}

/* Game Container */
.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-canvas {
  background: url('http://s2js.com/img/etc/flappyback.png');
  background-size: 100%;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

.game-controls {
  text-align: center;
  margin-top: 20px;
}

.game-controls p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.control-button {
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 30px;
  padding: 10px 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.control-button:hover {
  background-color: var(--dark-color);
}

/* Footer Component */
.game-footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 15px 30px;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links a {
  color: var(--light-color);
  margin: 0 10px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

/* MetaMask Overlay Styles */
#metamask-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: white;
  font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
}

#metamask-container {
  background-color: #222;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  max-width: 500px;
  width: 80%;
  box-shadow: 0 0 20px rgba(255, 163, 0, 0.5);
}

#metamask-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}

#metamask-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: #f6851b;
}

#metamask-status {
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.5;
}

#metamask-connect-button {
  background-color: #f6851b;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

#metamask-connect-button:hover {
  background-color: #e2761b;
  transform: scale(1.05);
}

#metamask-connect-button:active {
  transform: scale(0.98);
}

/* Restart Transaction Overlay Styles */
#restart-transaction-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: white;
  font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
}

#restart-transaction-container {
  background-color: #222;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  max-width: 500px;
  width: 80%;
  box-shadow: 0 0 20px rgba(255, 163, 0, 0.5);
}

#restart-transaction-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}

#restart-transaction-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: #f6851b;
}

#restart-transaction-status {
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.5;
}

#restart-transaction-cancel {
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  margin-top: 15px;
}

#restart-transaction-cancel:hover {
  background-color: #5a6268;
  transform: scale(1.05);
}

#restart-transaction-cancel:active {
  transform: scale(0.98);
}

/* Loading spinner */
.transaction-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(246, 133, 27, 0.3);
  border-radius: 50%;
  border-top-color: #f6851b;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-header {
    flex-direction: column;
    padding: 15px;
  }

  .logo {
    margin-bottom: 15px;
  }

  .nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav ul li {
    margin: 5px 10px;
  }

  .game-canvas {
    width: 100%;
    height: auto;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  #metamask-container,
  #restart-transaction-container {
    width: 90%;
    padding: 20px;
  }
  
  #metamask-logo,
  #restart-transaction-logo {
    width: 80px;
    height: 80px;
  }
  
  #metamask-title,
  #restart-transaction-title {
    font-size: 20px;
  }
  
  #metamask-status,
  #restart-transaction-status {
    font-size: 14px;
  }
  
  #metamask-connect-button,
  #restart-transaction-cancel {
    font-size: 16px;
    padding: 10px 25px;
  }
}