@import url("https://fonts.googleapis.com/css?family=Press+Start+2P");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f0f23;
  color: #ffffff;
  line-height: 1.6;
}

/* Header Styles */
.site-header {
  background-color: #1e1e3f;
  border-bottom: 2px solid #333366;
  padding: 0;
}

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

.logo h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.game-section {
  text-align: center;
}

.game-header {
  margin-bottom: 2rem;
}

.game-header h2 {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  color: #ffffff;
  font-weight: 700;
}

.game-description {
  font-size: 1.1rem;
  color: #cccccc;
  max-width: 600px;
  margin: 0 auto;
}

/* Game Container - Updated for new layout */
#game-container {
  width: 40vw;
  height: 30vw;
  position: relative;
  border: 3px solid #333366;
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem auto;
  background-color: #1a1a1a;
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

/* Fullscreen mode */
#game-container:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#game-container:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#game-container:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#game-container:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Game Controls */
.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 3rem 0;
}

.game-btn {
  background-color: #333366;
  color: #ffffff;
  border: 2px solid #00ff88;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.game-btn:hover {
  background-color: #00ff88;
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

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

/* Top 10 Section */
.top-10-section {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}

.top-10-section h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.top-10-table {
  background-color: #1e1e3f;
  border-radius: 12px;
  border: 1px solid #333366;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background-color: #333366;
  padding: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #333366;
  transition: background-color 0.2s ease;
}

.table-row:hover {
  background-color: #2a2a5f;
}

.table-row:last-child {
  border-bottom: none;
}

.rank-col, .score-col, .date-col {
  color: #cccccc;
}

.rank-col {
  font-weight: 600;
}

/* Game Info Section - Now vertical */
.game-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.controls-info, .game-tips {
  background-color: #1e1e3f;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #333366;
}

.controls-info h3, .game-tips h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.controls-info ul, .game-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.controls-info li, .game-tips li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #333366;
}

.controls-info li:last-child, .game-tips li:last-child {
  border-bottom: none;
}

.controls-info strong {
  color: #ffffff;
}

/* Footer */
.site-footer {
  background-color: #1e1e3f;
  border-top: 2px solid #333366;
  margin-top: 4rem;
  padding: 3rem 0 1rem 0;
}

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

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

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

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

.footer-section a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #333366;
  padding-top: 1rem;
  text-align: center;
  color: #888888;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  .game-header h2 {
    font-size: 2rem;
  }
  
  #game-container {
    width: 90vw;
    height: 67.5vw;
  }
  
  .game-controls {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .game-btn {
    width: 200px;
    padding: 1rem 1.5rem;
  }
  
  .top-10-section {
    margin: 1.5rem auto;
  }
  
  .top-10-table {
    font-size: 0.9rem;
  }
  
  .table-header, .table-row {
    padding: 0.5rem;
  }
  
  .game-info {
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .main-content {
    padding: 1rem;
  }
}

/* Game-specific styles */
#score {
  position: absolute;
  font-family: "Press Start 2P", cursive;
  font-size: 0.9em;
  color: white;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  max-width: 100px;
  text-align: center;
  line-height: 1.6em;
  z-index: 10;
}

#bottom-right-text {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0.8;
  z-index: 5;
  pointer-events: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  letter-spacing: 1px;
}

#results {
  position: absolute;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background-color: rgba(20, 20, 20, 0.75);
  display: none;
  z-index: 51;
}

#results .content {
  max-width: 350px;
  padding: 50px;
  border-radius: 20px;
  background-color: #1e1e3f;
  border: 2px solid #333366;
  text-align: center;
}

#results h1 {
  color: #ff4444;
  margin-bottom: 1rem;
}

#results p {
  color: #cccccc;
}

/* Media queries for game elements */
@media (min-height: 425px) {
  #score {
    font-size: 1.5em;
    max-width: 150px;
  }
}