:root {
  --cell: 100px; /* Base size, might be unused here */
  --bg: rgba(255, 255, 255, 0.1); /* Standard background */
  --bg-hover: rgba(255, 255, 255, 0.2);
  --border: rgba(255, 255, 255, 0.2);
  --highlight: #4CAF50; /* Shared green highlight */
  --text-light: #ffffff;
  --text-dark: #cccccc;
  --fs: 1rem;
  --radius-lg: 16px;
  --radius-md: 8px;
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Press Start 2P', cursive;
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--text-light);
  font-family: var(--font-primary);
  padding: 20px;
}

/* Main Layout (from tic-tac-toe) */
#main-layout {
  display: block; /* Default stacking */
  width: 100%;
  max-width: 1200px; /* Max width for the whole layout */
  margin: 0 auto; /* Center layout */
  padding: 0 20px; /* Padding for smaller screens */
}

/* On larger screens, use flex for side-by-side */
@media (min-width: 900px) {
  #main-layout {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 40px; /* Gap between main content and sidebar */
    padding: 0;
  }
  #container, .game-container-placeholder { /* Game area */
    flex-shrink: 0; /* Prevent game container from shrinking */
    width: 100%;
    max-width: calc(var(--cell) * 3 + 40px + 24px); /* Adjust as needed for games */
  }
  #footer-content { /* Sidebar area */
    flex-grow: 1;
    margin-top: 0;
    max-width: 350px;
    position: sticky;
    top: 20px;
  }
}

/* Generic Glassmorphism Container */
.glass-container {
  width: 100%;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), 0 0 15px rgba(76, 175, 80, 0.3); /* Greenish shadow */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Button Styles */
button {
  padding: 10px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-light);
  cursor: pointer;
  font-size: var(--fs);
  font-family: var(--font-secondary); /* Retro font for buttons */
  box-shadow: 0 0 8px var(--highlight);
  transition: background 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}

button:hover {
  background: var(--bg-hover);
  box-shadow: 0 0 15px var(--highlight);
}

/* Modal Styles */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.modal.show, .modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg);
  padding: 30px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--highlight);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-width: 90%;
  width: 500px; /* Max width for modal content */
}

.modal.show .modal-content, .modal.active .modal-content {
  transform: scale(1);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-family: var(--font-secondary);
  color: var(--highlight);
}

.modal-content p, .modal-content ul {
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 1em;
  font-family: var(--font-primary);
}

.modal-content ul { padding-left: 20px; }

.modal-content button {
  margin-top: 15px;
}

.modal-close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  box-shadow: none;
  font-family: var(--font-primary);
}

.modal-close-button:hover {
  color: var(--highlight);
  background: none;
  box-shadow: none;
}


/* Footer Content / Sidebar Styles */
#footer-content {
  width: 100%;
  margin-top: 30px; /* Space above footer (applies on small screens) */
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px; /* Increased gap */
  font-size: 0.9rem;
  font-weight: 300;
  text-align: center;
}

.footer-section {
  width: 100%;
}

.footer-title {
  font-weight: 400;
  font-size: 1.1rem; /* Slightly larger title */
  font-family: var(--font-secondary); /* Retro font */
  color: var(--highlight);
  margin-bottom: 15px; /* More space below title */
}

#footer-content a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s, text-shadow 0.2s;
}

#footer-content a:hover {
  color: var(--highlight);
  text-shadow: 0 0 5px var(--highlight);
}

.newsletter-iframe {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background-color: rgba(0,0,0,0.1) !important;
}

.sponsor-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.sponsor-link {
  display: block;
  padding: 12px 18px; /* Slightly larger padding */
  background: rgba(255, 255, 255, 0.05); /* Slightly darker */
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  font-family: var(--font-secondary); /* Retro font */
  font-size: 0.9rem;
}

.sponsor-link:hover {
  background: var(--bg-hover);
  box-shadow: 0 0 8px var(--highlight);
  color: var(--text-light);
  text-shadow: none;
  transform: translateY(-2px);
}

.sponsor-description {
  font-size: 0.8rem;
  font-weight: 300;
  margin-top: 5px;
  opacity: 0.8;
  font-family: var(--font-primary); /* Normal font */
}

.branding {
    font-family: var(--font-secondary);
    font-size: 1rem;
}

.branding a {
  color: var(--highlight);
  font-weight: 600; /* Match tic-tac-toe */
}

.branding a:hover {
  text-shadow: 0 0 8px var(--highlight);
}

.made-by {
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Utilities */
.hidden { display: none; }

/* Add specific styles for index page */
.page-title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    color: var(--highlight);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.game-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px;
    width: 100%;
    max-width: 320px; /* Limit card width */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 25px var(--highlight);
}

.game-card h2 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--highlight);
    margin-bottom: 10px;
}

.game-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    flex-grow: 1; /* Allow description to take space */
    margin-bottom: 15px;
}

.game-card button {
    margin-top: auto; /* Push button to bottom */
}

@media (min-width: 900px) {
    /* Adjust main content area width on index page */
    #main-layout > div:first-child { /* Target the main content container */
        flex-grow: 1; /* Allow it to take more space */
        max-width: none; /* Remove max-width constraint */
    }
} 