/* Variables for easy theming */
:root {
  --font-family: "Noto Sans SC", "Arial Unicode MS", "Segoe UI", sans-serif;
  --body-bg: #ffffff;
  --text-color: #333333;

  --nav-bg: #333333;
  --nav-text: #ffffff;
  --nav-shadow: rgba(0, 0, 0, 0.3);
  --nav-height: 60px;
  
  --dropdown-bg: #444444;
  --dropdown-text: #ffffff;
  --dropdown-hover: #555555;

  --translator-bg: #f9f9f9;
  --translator-border: #cccccc;
  --output-bg: #eeeeee;
}

/* Reset & Base */
html {
  margin: 0;
  padding: 0;
  height: auto;
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-color);
  text-align: center;
}

body {
  height: auto;
  margin: 0;
  margin-bottom: 20px;
  padding-top: var(--nav-height);
}

/* Navigation */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #333;
  padding: 10px;
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
  font-family: sans-serif;
}

.nav-link {
  color: var(--nav-text);
  margin: 0 15px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.nav-link:hover {
  text-decoration: underline;
}


.nav-dropdown {
  display: inline-block;
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #444;
  z-index: 100;
  top: 100%; /* drop down below Games link */
  left: 0;
}

.dropdown-menu a {
  display: block;
  color: white;
  padding: 8px;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: #555;
}

/* Games dropdown */
#gameMenuButton {
  background: var(--nav-bg);
  color: var(--nav-text);
  border: none;
  cursor: pointer;
  font-size: 1em;
}

/* Main layout */
body.game-page {
  --nav-height: 38px;
    height: 100%;
	overflow: hidden
}

.container {
  display: flex;
  height: 100%;
  width: 100%;
}

.game-container {
  flex: 1;
    height: 100%;
  overflow: hidden;
}
.game-container iframe {
  width: 100%;
  border: none;
}

.resizer {
  width: 6px;
  cursor: col-resize;
  background: rgba(0,0,0,0.1);
}

.translator {
  width: 200px;          
  max-width: 60%;
  height: 100vh;
  overflow: auto;
  padding: 10px;
  background: var(--translator-bg);
  border-left: 2px solid var(--translator-border);
  box-sizing: border-box;
}

.translator h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

/* Translation output & history */
#translatedOutput {
  margin-top: 10px;
  background-color: var(--output-bg);
  padding: 10px;
}

#translationHistory {
  margin-top: 15px;
}

#historyList {
  padding-left: 20px;
}

#scriptToggleContainer select {
  margin-bottom: 8px;
  padding: 4px;
  font-size: 1em;
}


/* Game Thumbnail List*/
/* Container for all tiles */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* Individual game tile */
.game-tile {
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Thumbnail image */
.game-tile img {
  width: 100%;
  height: auto;
  display: block;
}

/* Title below image */
.game-tile h3 {
  font-size: 1rem;
  margin: 8px;
  color: #fff;
}
 /*Filter Bar*/
.filter-bar {
  background: #111;
  border: 1px solid #444;
  padding: 4px 14px;
  margin: 4px auto;
  border-radius: 1px;
  font-family: sans-serif;
  font-size: 0.7rem;
  color: white;
  max-width: 700px;            /* restores a broader layout */
  width: 100%;       
  box-sizing: border-box;
  display: inline-block;        /* ensure width matches contents */
}


.filter-bar h3 {
  margin-top: 0;
  font-size: .9rem; 
  color: #eee;
}

.filter-bar strong {
  display: inline-block;
  margin-right: 10px;
  font-size: 0.85rem;
  color: #ccc;
  padding-top: 7px; /* drops heading text slightly */
}

.filter-bar label {
  margin-right: 8px;
  display: inline-block;
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-bar input[type="checkbox"] {
  margin-right: 4px;
  accent-color: #4af;
}

.filter-bar > div {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 6px;
  gap: 4px;
}

/* Base styles for filter toggles */
.filter-toggle {
  display: inline-block;
  padding: 4px 8px;
  margin: 4px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  border: 1px solid #555;
  user-select: none;
  vertical-align: middle;
}

/* Neutral (default) state */
.filter-toggle.neutral {
  background-color: #222;
  color: #aaa;
  border-color: #444;
}

/* Include state */
.filter-toggle.include {
  background-color: #2962ff;
  color: #fff;
  border-color: #4af;
}

/* Exclude state */
.filter-toggle.exclude {
  background-color: #ff5252;
  color: #fff;
  border-color: #f44;
}

/* Hover effect */
.filter-toggle:hover {
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
}

/* Table Styling */
.TableStyles {
  width: 90%;
  max-width: 1000px;
  margin: 30px auto;
  border-collapse: collapse;
  background-color: #111;
  color: #eee;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  font-family: var(--font-family);
  border-radius: 6px;
  overflow: hidden;
}

.TableStyles thead {
  background-color: #222;
  color: #fff;
}

.TableStyles th,
.TableStyles td {
  padding: 12px 16px;
  border: 1px solid #333;
  text-align: left;
}

.TableStyles th {
  font-weight: bold;
  font-size: 0.95rem;
  position: relative;
}

/* Default icon for sortable headers */
.TableStyles th::after {
  content: "⇅"; /* Or use "▲▼" if preferred */
  position: absolute;
  right: 8px;
  font-size: 0.75rem;
  color: #666; /* Dim to suggest inactive */
}

/* Highlight active ascending */
.TableStyles th.sorted-asc::after {
  content: "▲";
  color: #4af;
}

/* Highlight active descending */
.TableStyles th.sorted-desc::after {
  content: "▼";
  color: #ff5252;
}


.TableStyles tbody tr:nth-child(even) {
  background-color: #1c1c1c;
}

.TableStyles tbody tr:hover {
  background-color: #333;
}

#clearHistory {
  background-color: #2962ff;
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin: 20px auto;
  display: block;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.3s;
}

#clearHistory:hover {
  background-color: #1e50d2;
}

#clearQuizStats {
  background-color: #2962ff;
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin: 20px auto;
  display: block;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.3s;
}

#clearQuizStats:hover {
  background-color: #1e50d2;
}
/* Quiz Start Buttons Container */
#controls {
  text-align: center;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Quiz Start Buttons Styling */
#controls button {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
}


#controls button:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Quiz Container */
#quiz-container {
  display: none;
  text-align: center;
}

/* No Data Return Button */
#quiz-container p {
  font-size: 1rem;
  color: #666;
  text-align: center;
  margin: 20px 0;
  font-style: italic;
}


/* Quiz Answer Buttons */
.quiz-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.quiz-buttons button {
  background-color: #4af;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
}

.quiz-buttons button:hover {
  background-color: #1e90ff;
  transform: translateY(-2px);
}

.end-button-row {
  text-align: center;
  margin-top: 16px;
}

.end-button-row button {
  background-color: #dc3545;
  padding: 10px 18px;
  font-size: 1rem;
  color: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.end-button-row button:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}


/* Resources container reused from contact-container */
.resources-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px 30px;
  background-color: var(--body-bg);
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 8px;
  text-align: center;
}

/* Resource Section Style */
.resource-section {
  margin-bottom: 40px;
}

.resource-section h2 {
  font-size: 1.3em;
  margin-bottom: 12px;
  color: var(--text-color);
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.resource-section ul {
  list-style-type: none;
  padding-left: 0;
}

.resource-section li {
  margin-bottom: 8px;
}

.resource-section a {
  color: #2962ff;
  text-decoration: none;
}

.resource-section a:hover {
  text-decoration: underline;
}

/* Resource thumbnails using game grid styles */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.thumb {
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.thumb img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.thumb p {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #fff;
}

/* Contact Styling */
.contact-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px 30px;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 8px;
}

form label {
  display: block;
  margin-top: 20px;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}


