/* Combined Components Styles for VaporRacer */

/* Header Styles */
.site-header {
  width: 100%;
  padding: 1rem 0;
  background-color: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1000;
}

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

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

@media (min-width: 769px) {
  .header-container {
    flex-wrap: nowrap;
  }
  
  .header-top {
    width: auto;
    margin-right: 1rem;
    flex: 0 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 {
  margin-top: 1rem;
}

@media (min-width: 769px) {
  .main-nav {
    margin-top: 0;
    flex: 1;
    display: flex;
    justify-content: center;
  }
}

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

.main-nav a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  margin-left: 1rem;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--accent-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

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

.nav-play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.5);
}

.nav-play-button::after {
  display: none;
}

.wallet-info {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 30, 60, 0.5);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
  width: 100%;
}

@media (min-width: 769px) {
  .wallet-info {
    margin-top: 0;
    width: auto;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: 1rem;
  }
}

#wallet-address.connected,
#fallback-wallet-address.connected {
  color: var(--accent-color);
}

.wallet-info {
  position: relative;
}

.wallet-info::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.8;
}

.wallet-info.connected::after {
  content: "Click to disconnect";
  color: var(--accent-color);
}

.wallet-info:not(.connected)::after {
  content: "Click to connect wallet";
  color: var(--text-color);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mobile-controls {
  display: flex;
  align-items: center;
}

.theme-toggle-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.theme-toggle-track {
  position: relative;
  width: 50px;
  height: 24px;
  background-color: rgba(30, 30, 60, 0.7);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: var(--accent-color);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--accent-color);
}

.theme-toggle.light .theme-toggle-thumb {
  left: calc(100% - 20px);
}

/* Footer Styles */
.site-footer {
  background-color: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 1rem;
  position: relative;
  z-index: 1000;
}

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

.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-top {
  margin-bottom: 2rem;
}

.footer-accordion {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 2rem 0;
  gap: 2rem;
}

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

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-toggle .toggle-icon {
  display: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

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

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

.footer-content {
  transition: max-height 0.3s ease-out;
  overflow: hidden;
}

.footer-section a {
  color: var(--text-color);
  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;
  flex-wrap: wrap;
}

.social-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 30, 60, 0.5);
  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.2);
  transform: translateY(-3px);
}

.newsletter {
  margin-top: 1rem;
}

.newsletter p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.email-signup {
  display: flex;
  margin-top: 0.5rem;
}

.email-signup input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 4px 0 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(30, 30, 60, 0.5);
  color: var(--text-color);
  font-family: inherit;
}

.email-signup button {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.email-signup button:hover {
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

body.light-theme .email-signup input {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

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

/* Light/Dark Theme */
body.light-theme {
  --primary-color: #e98c00;
  --secondary-color: #7b2cbf;
  --accent-color: #7b2cbf;
  --text-color: #333333;
  --background-color: #f5f5f5;
  --card-background: rgba(255, 255, 255, 0.9);
  --gradient-start: #7b2cbf;
  --gradient-end: #e98c00;
  background-image: linear-gradient(to bottom, rgba(245, 245, 245, 0.9), rgba(245, 245, 245, 0.7)), url('../Assets/Images/background.jpg');
}

body.light-theme .site-header,
body.light-theme .site-footer {
  background-color: rgba(255, 255, 255, 0.8);
}

body.light-theme .about,
body.light-theme .how-to-play {
  background-color: rgba(245, 245, 245, 0.7);
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3 {
  color: var(--secondary-color);
  text-shadow: 0 0 10px rgba(123, 44, 191, 0.3);
}

body.light-theme .wallet-info,
body.light-theme .social-link,
body.light-theme .theme-toggle-track {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Header & Footer */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
    flex-direction: column;
  }
  
  .main-nav {
    display: none;
    margin-top: 1rem;
    width: 100%;
  }
  
  .main-nav.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .wallet-info {
    margin-top: 1rem;
    text-align: center;
    width: 100%;
  }
  
  .footer-accordion {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
  }
  
  .footer-section:last-child {
    border-bottom: none;
  }
  
  .footer-toggle .toggle-icon {
    display: inline-block;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .newsletter {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem;
  }
  
  .logo a {
    font-size: 1.5rem;
  }
  
  .wallet-info {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* MetaMask Overlay */
#metamask-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 26, 0.9);
  display: none; /* Hidden by default, will be shown with JS */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  font-family: 'Open Sans', 'digital_font', sans-serif;
}

#metamask-content {
  background-color: rgba(30, 30, 60, 0.7);
  padding: 2rem;
  border-radius: 10px;
}

/* Wallet Disconnect Modal */
.wallet-disconnect-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 26, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1100;
  backdrop-filter: blur(5px);
  font-family: 'Open Sans', 'digital_font', sans-serif;
}

.wallet-disconnect-content {
  background-color: rgba(30, 30, 60, 0.7);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
}

.wallet-disconnect-content h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.wallet-disconnect-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.wallet-disconnect-buttons button {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#wallet-disconnect-yes {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
}

#wallet-disconnect-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

#wallet-disconnect-no {
  background-color: rgba(60, 60, 90, 0.7);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#wallet-disconnect-no:hover {
  background-color: rgba(80, 80, 120, 0.7);
}

/* Wallet info styling for connected state */
.wallet-info.connected {
  background-color: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.3);
  transition: all 0.3s ease;
}

.wallet-info:hover {
  background-color: rgba(0, 245, 212, 0.2);
  cursor: pointer;
}

#metamask-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  animation: pulse 2s infinite;
}

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

#metamask-connect-button {
  background: linear-gradient(135deg, #7b2cbf, #e98c00);
  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;
  font-family: 'digital_font', 'Open Sans', sans-serif;
}

#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: none; /* Hidden by default, will be shown with JS */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  font-family: 'Open Sans', 'digital_font', sans-serif;
}

#transaction-content {
  background-color: rgba(30, 30, 60, 0.7);
  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);
  animation: fadeIn 0.5s ease-in-out;
}

#transaction-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #00f5d4;
  text-shadow: 0 0 10px #00f5d4;
  animation: pulse 2s infinite;
}

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

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */
@media (max-width: 768px) {
  #metamask-content, #transaction-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  #metamask-logo {
    width: 80px;
    height: 80px;
  }
  
  #transaction-icon {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
  }
}