/* Game Page Styles for VaporRacer */

:root {
  --primary-color: #e98c00;
  --secondary-color: #7b2cbf;
  --accent-color: #00f5d4;
  --text-color: #ffffff;
  --background-color: #0a0a1a;
  --card-background: rgba(30, 30, 60, 0.7);
  --gradient-start: #7b2cbf;
  --gradient-end: #e98c00;
}

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

body {
  font-family: 'digital_font', 'Open Sans', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow: hidden;
  position: relative;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: var(--accent-color);
  text-align: center;
  z-index: 100;
  text-shadow: 0 0 10px var(--accent-color);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#message.visible {
  opacity: 1;
}

/* MetaMask Overlay */
#metamask-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 26, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

#metamask-content {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#metamask-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
}

#metamask-status {
  margin: 1rem 0;
  font-size: 1.2rem;
}

#metamask-connect-button {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.5);
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

#metamask-connect-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 245, 212, 0.8);
}

/* Restart Transaction Overlay */
#restart-transaction-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 26, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

#transaction-content {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#transaction-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

#transaction-status {
  margin: 1rem 0;
  font-size: 1.2rem;
}

.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
  margin: 1rem auto;
}

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

/* Fullscreen Game */
#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Header and Footer for Game Page */
#header-container, #footer-container {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 10;
  background-color: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(5px);
}

#header-container {
  top: 0;
}

#footer-container {
  bottom: 0;
}

/* Header Styles */
.site-header {
  width: 100%;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo a {
  font-family: 'digital_font', 'Pacifico', cursive;
  font-size: 1.8rem;
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color);
  transition: all 0.3s ease;
}

.logo a:hover {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.main-nav a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--accent-color);
}

.nav-play-button {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

.nav-play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.5);
  color: white !important;
  text-shadow: none !important;
}

.wallet-info {
  font-size: 1.1rem;
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
  position: relative;
  z-index: 100;
}

#wallet-address.connected {
  color: var(--accent-color);
  font-weight: bold;
  text-shadow: 0 0 5px var(--accent-color);
}

/* Footer Styles */
.site-footer {
  width: 100%;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo a {
  font-family: 'digital_font', 'Pacifico', cursive;
  font-size: 1.5rem;
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-section {
  flex: 1;
  min-width: 150px;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: rgba(0, 245, 212, 0.1);
  border-color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Media Queries */
@media (max-width: 768px) {
  #metamask-content, #transaction-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  #metamask-logo {
    width: 80px;
    height: 80px;
  }
}