/* --- Tambola Theme Card Styles --- */
.theme-card {
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s, border 0.18s;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid transparent;
  font-size: medium;
}
.theme-card:focus, .theme-card:hover {
  border: 2px solid #0072ff;
  box-shadow: 0 2px 12px #b3d1ff55;
  outline: none;
}
.theme-card.selected {

  border: 2px solid #ffb300;
  box-shadow: 0 2px 12px #ffe06655;
  color: #222831;
  outline: none;
  transform: scale(1.04);
  z-index: 2;
}
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background-color: #f4f4f9;
  color: #333;
}

header {
  background-color: #4CAF50;
  color: rgb(14, 158, 134);
  padding: 1em 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: #4CAF50;
  box-shadow: none;        /* Remove shadow if you want a flat green bar */
}

.header-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-title {
  flex: 1;
  display: flex;
  justify-content: center;
}

.page-title {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
  background-color: #4CAF50;
  padding: 0.5em 1em;
  color: white !important; /* Ensure white text */
  text-align: center;
}

.header-auth-btns {
  display: flex;
  gap: 12px;
  margin-left: auto;
  margin-top: 0.7em;
  align-items: center;
}

/* Language Selector Styles */
.language-selector {
  position: relative;
}

.language-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 140px;
  overflow: hidden;
}

.language-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: #f8f9fa;
}

.language-option.active {
  background-color: #e3f2fd;
  font-weight: 600;
  color: #1976d2;
}

.logo {
  max-width: 100px; /* Adjust the size as needed */
  height: auto;
  display: block;
  margin: 0 auto;
  padding: 10px 0;
  margin-right: 16px;
}

.container {
  max-width: 675px;
  margin: 2em auto;
  padding: 2em;
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  justify-content: center;
}

label {
  font-size: 1.2em;
  display: block;
  margin-bottom: 0.5em;
}

select {
  width: 100%;
  padding: 0.5em;
  font-size: 1em;
}

.question-text {
  font-size: 1.2em;
  margin-bottom: 1em;
}

.option {
  margin-bottom: 0.5em;
}

.option input {
  margin-right: 0.5em;
}

.btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 1em 2em;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  width: auto;
  min-width: 120px;
  justify-content: center;
  align-items: center;
  margin-top: 1em;
  margin-left: 0;
}

.btn:hover {
  background-color: #45a049;
}

.result-text {
  font-size: 1.2em;
  margin-top: 1em;
}

footer {
  text-align: center;
  padding: 1em;
  background-color: rgb(56, 175, 112);
  color: white;
}

#category-selection-container p {
  text-align: center; /* Center align the text */
  font-size: 1.3em; /* Optional: to make the text larger */
  margin-bottom: 1em; /* Optional: to add some space below the text */
  display: block; /* Ensure "Select Category" is on a separate line */
}

#category-selection-container {
  display: block; /* Ensure the container is displayed as a block element */
}

.category-tiles {
  display: flex; /* Flex container for tiles */
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px; /* Adjusted width to accommodate increased tile size */
  margin: 0 auto;
}

.category-tile {
  display: inline-flex; /* Changed from inline-block to inline-flex */
  width: 150px; /* Increased width by 50% */
  height: 100px;
  margin: 10px;
  padding: 20px;
  border: 2px solid #ccc;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  align-items: center; /* Center items vertically */
  justify-content: center; /* Center items horizontally */
}

/* Other category-tile rules remain the same */

.category-tile:hover {
  background-color: #f0f0f0;
}

.category-tile.selected {
  background-color: #d0e6f7;
  border-color: #007bff;
  color: #007bff;
}

.category-tile label {
  display: block;
  font-size: 18px;
  font-weight: 500;
}

/* Distinct background colors for different category tiles */
.category-tile.category1 {
  background-color: #FFCDD2; /* Light Red */
}

.category-tile.category2 {
  background-color: #C8E6C9; /* Light Green */
}

.category-tile.category3 {
  background-color: #BBDEFB; /* Light Blue */
}

.category-tile.category4 {
  background-color: #FFF9C4; /* Light Yellow */
}

.category-tile.category5 {
  background-color: #D1C4E9; /* Light Purple */
}
 .category-tile.category6 {
  background-color: #FFE0B2; /* Light Orange */
}

.category-tile.category7 {
  background-color: #FFC1E3; /* Light Pink for Yoga */
}

.category-tile.category8 {
  background-color: #B3E5FC; /* Light Cyan for Brain Teasers */
}

.category-tile.category9 {
  background-color: #b89db4; /* Light Cyan for Taddhit Chayaddvi */
}
.category-tile.category10 {
  background-color: #E1BEE7; /* Light Purple for Taddhit Pragghitiya */
}
.category-tile.category11 {
  background-color: #FFAB91; /* Light Orange for Taddhit Pragvahatiya */
}
.category-tile.category12 {
  background-color: #C5E1A5; /* Light Green for Taddhit Shaishik */
}
.category-tile.category13 {
  background-color: #FFCCBC; /* Light Orange for Taddhit Chaturthik */
}
.category-tile.category14 {
  background-color: #cab7b1; /*  Taddhit adhikar */
}
.category-tile.category15 {
  background-color: #D1C4E9; /* Distinct but subtle lavender for Taddhit Chayadwidhi */
}
.category-tile.category16 {
  background-color: #F8BBD0; /* Light Pink for Taddhit Matvarthiya */
}
.category-tile.category17 {
  background-color: #B2DFDB; /* Distinct but subtle teal for Taddhit Kaladhikar */
}
.category-tile.category18 {
  background-color: #FFE082; /* Distinct but subtle yellow for Taddhit Thanvidhi */
}
.category-tile.category19 {
  background-color: #D7CCC8; /* Distinct but subtle brown/grey for Taddhit Bhavakarmartha */
}
.category-tile.category20 {
  background-color: #FFF9C4; /* Distinct but subtle pale yellow for Taddhit Panchamika */
}
.category-tile.category21 {
  background-color: #D1C4E9; /* Light Purple for Taddhit Pragdishiya */
}
.category-tile.category23 {
  background-color: #FFF3E0; /* Light Apricot for Taddhit Pragiviya */
}
.category-tile.category24 {
  background-color: #E0F7FA; /* Light Blue for Taddhit Svarthika */
}
.category-tile.category25 {
  background-color: #F3E5F5; /* Light Lavender for Taddhit Dvirukta */
}
.category-tile.category26 {
  background-color: #E3F2FD; /* Light Blue for Bhvadi */
}
.category-tile.category27 {
  background-color: #FFF9C4; /* Light Yellow for Adadi */
}
.category-tile.category28 {
  background-color: #C8E6C9; /* Light Green for Swadi */
}
.category-tile.category29 {
  background-color: #FFECB3; /* Light Amber for Divadi */
}
.category-tile.category30 {
  background-color: #FFCDD2; /* Light Red for Tudadi */
}
.category-tile.category31 {
  background-color: #D1C4E9; /* Light Purple for Kryadi */
}
.category-tile.category32 {
  background-color: #B2EBF2; /* Light Cyan for Tanadi */
}
.category-tile.category33 {
  background-color: #F8BBD0; /* Light Pink for Curadi */
}
.category-tile.category34 {
  background-color: #DCEDC8; /* Light Lime for Rudhadi */
}
.category-tile.category35 {
  background-color: #FFE0B2; /* Light Orange for Juhotyadi */
}

/* End Quiz Button Styling */
#end-quiz-btn {
  display: inline-block;
  background: #f4f4f4;
  color: #666;
  border: 1.5px solid #ccc;
  border-radius: 22px;
  padding: 0.7em 1.7em;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: none;
  margin: 18px auto 0 auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
  cursor: pointer;
  outline: none;
}

#end-quiz-btn:hover, #end-quiz-btn:focus {
  background: #e9e9e9;
  color: #333;
  border-color: #bbb;
  transform: translateY(-1px) scale(1.02);
}

#end-quiz-btn:active {
  background: #ededed;
  color: #222;
  border-color: #aaa;
  transform: scale(0.98);
}

.btn {
  display: inline-flex;
  padding: 10px;
  background-color: #007bff;
  color: #fff;
  text-align: center;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}

.logo {
  max-width: 100px; /* Adjust the size as needed */
  height: auto;
  display: block;
  margin: 0 auto;
  padding: 10px 0;
}

#start-quiz:disabled {
  background-color: grey;
  color: white;
  cursor: not-allowed;
}

/* New styles for difficulty levels */
.difficulty-levels {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* Adjust the gap between radio buttons as needed */
}

.difficulty-levels input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.difficulty-levels label {
  background-color: #f4f4f9;
  color: #333;
  padding: 10px 20px;
  border: 2px solid #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  width: 100px; /* Set a fixed width for all difficulty buttons */
  text-align: center; /* Ensure text is centered */
}

.difficulty-levels input[type="radio"]:checked + label {
  background-color: #4CAF50;
  color: white;
  border-color: #4CAF50;
}

.difficulty-levels label:hover {
  background-color: #e0e0e0;
}

#timer {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 16px;
  font-weight: bold;
}

#question-container {
  position: relative; /* Ensure it is relatively positioned */
  /* other styles */
}

/* Modal Styles */
.modal {
  display: none; 
  position: fixed; 
  z-index: 200; 
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  margin: auto;
  border-radius: 8px;
  padding: 2rem;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tab {
  flex: 1;
  padding: 0.7rem 0;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.tab.active {
  border-bottom: 2px solid #0078d7;
  color: #0078d7;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.auth-form input {
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  border-color: #0078d7;
  outline: none;
}

.primary-btn {
  background: linear-gradient(90deg, #0078d7 60%, #00c6fb 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: linear-gradient(90deg, #005fa3 60%, #009ec3 100%);
}

.auth-btn {
  display: inline-block;
  margin: 0 auto 16px auto;
  float: none;
  width: 180px;
  font-size: 1.1em;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s;
  min-width: 100px;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #0078d7 60%, #00c6fb 100%);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.auth-btn:hover {
  background: linear-gradient(90deg, #005fa3 60%, #009ec3 100%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

#auth-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

#signout-modal .btn {
  box-shadow: none;
  border-radius: 8px;
  font-weight: 500;
}
#signout-modal .btn:not(.primary-btn) {
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
}
#signout-modal .btn:not(.primary-btn):hover {
  background: #ddd;
}

#history-modal .modal-content {
  max-width: 700px;
  max-height: 80vh;
  overflow: auto;
}

/* Dropdown menu styles */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-menu-btn {
  background: #0078d4;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  z-index: 100;
  flex-direction: column;
  padding: 8px 0;
}

.user-menu-dropdown .dropdown-item {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu-dropdown .dropdown-item:hover {
  background: #f0f4f8;
}

/* Profile Modal Enhancements */
.profile-modal-content {
  max-width: 400px;
  padding: 2rem 2rem 1.5rem 2rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
  margin: auto;
}

.profile-title {
  text-align: center;
  margin-bottom: 1.2rem;
  color: #0078d4;
  font-weight: 700;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  background: #e0e7ef;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #0078d4;
  font-weight: bold;
}

.profile-email-label {
  margin: 0;
  font-size: 0.95rem;
  color: #888;
}

.profile-email {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #222;
  word-break: break-all;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.profile-form label {
  font-size: 0.98rem;
  color: #555;
  margin-bottom: 0.2rem;
}

.profile-form input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 1rem;
}

.profile-btn {
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}

.profile-btn:hover {
  background: #005fa3;
}

.profile-message {
  margin-top: 0.5rem;
  font-size: 0.98rem;
  min-height: 1.2em;
}

/* Tambola styles */
.tambola-ticket {
  display: inline-block;
  margin: 0;
  border: 2px solid #333;
  border-radius: 8px;
  background: #dae5ec;
  box-shadow: 2px 2px 8px #eee;
  padding: 0.5em 1em;
  width: 100%;
  max-width: 740px;
  min-width: 260px;
  table-layout: fixed;
}
.tambola-ticket tr {
  width: 100%;
}
.tambola-ticket td {
  border: 1px solid #b0c4de;
  text-align: center;
  padding: 0.4em 0.7em;
  font-size: 1.1em;
  min-width: 2.2em;
  min-height: 2.2em;
  width: 11%; /* 9 columns: 100/9 ≈ 11% */
  box-sizing: border-box;
}
.ticket-label {
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: center;
}
.tambola-board-grid {
  display: grid;
  grid-template-columns: repeat(10, 2em);
  gap: 0.2em;
  margin: 1em 0;
}
.board-cell {
  display: inline-block;
  width: 2em;
  height: 2em;
  text-align: center;
  line-height: 2em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f9f9f9;
  font-size: 1em;
}
.board-cell.called {
  background: #ffe066;
  color: #222;
  font-weight: bold;
}
#organizer-section {
  border: 1px solid #ccc;
  background: #f6f6f6;
  margin: 1em 0;
  padding: 1em;
  border-radius: 8px;
}

#text-answer {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 1em 0;
  padding: 0.6em 0.8em;
  font-size: 1.1em;
  border: 1px solid #bbb;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fafbfc;
  transition: border 0.2s;
}

#text-answer:focus {
  border: 1.5px solid #0078d4;
  outline: none;
  background: #fff;
}

/* Correct answer display */
.result {
  margin-top: 1em;
  font-size: 1.15em;
  min-height: 2em;
  transition: background 0.3s, color 0.3s;
}

.result.correct {
  color: #1a7f37;
  background: #e6f9ec;
  border-left: 4px solid #1a7f37;
  padding: 0.5em 1em;
  border-radius: 4px;
}

.result.incorrect {
  color: #b91c1c;
  background: #fdeaea;
  border-left: 4px solid #b91c1c;
  padding: 0.5em 1em;
  border-radius: 4px;
}

.result .answer-label {
  font-weight: bold;
  margin-right: 0.5em;
  color: #0078d4;
}

/* --- Tambola Board Modern Chessboard Style --- */
#tambola-board {
  display: grid;
  grid-template-columns: repeat(10, 48px);
  grid-template-rows: repeat(9, 48px);
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin: 2em auto 1em auto;
  background: #222831;
  border: 2px solid #333;
  border-radius: 12px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.12), 0 1.5px 6px 0 rgba(0,0,0,0.10);
  padding: 16px 12px;
  max-width: 480px;
}

.tambola-board-num {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #393e46;
  background: #f7f7fa;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  user-select: none;
  border: 2px solid #e0e0e0;
  min-width: 44px;
  min-height: 44px;
}

/* Chessboard effect: alternate backgrounds 
#tambola-board .tambola-board-num:nth-child(18n+1),
#tambola-board .tambola-board-num:nth-child(18n+3),
#tambola-board .tambola-board-num:nth-child(18n+5),
#tambola-board .tambola-board-num:nth-child(18n+7),
#tambola-board .tambola-board-num:nth-child(18n+9),
#tambola-board .tambola-board-num:nth-child(18n+10),
#tambola-board .tambola-board-num:nth-child(18n+12),
#tambola-board .tambola-board-num:nth-child(18n+14),
#tambola-board .tambola-board-num:nth-child(18n+16),
#tambola-board .tambola-board-num:nth-child(18n+18) {
  background: #e3eafc;
} */

.tambola-board-num:hover {
  background: #b2e0ff;
  color: #222831;
  box-shadow: 0 2px 8px rgba(0, 180, 255, 0.12);
}

.tambola-board-num.called-past {
  background: linear-gradient(135deg, #0072ff 0%, #0056b3 100%) !important;
  color: #fff !important;
  border: 2px solid #0056b3 !important;
  box-shadow: 0 2px 8px rgba(0, 114, 255, 0.10);
}

.tambola-board-num.called {
  background: linear-gradient(135deg, #ffde00 0%, #ffb300 100%) !important;
  color: #222831 !important;
  border: 2.5px solid #ffb300 !important;
  box-shadow: 0 0 0 6px #ffe06655, 0 2px 16px #ffb30044;
  animation: tambolaLastPickedCell 0.7s;
  z-index: 2;
  position: relative;
}

/* Highlight called numbers in tickets */
.tambola-num-called {
  background: #e0ae0b !important;
  color: #fff !important;
  font-weight: bold;
  border-radius: 0.4em;
  border: 2px solid #0072ff !important;
  box-shadow: 0 2px 8px rgba(0, 114, 255, 0.10);
  transition: background 0.2s, color 0.2s;
}

/* --- Tambola Two-Column Layout (updated for 70/30 split) --- */
#tambola-main {
  display: flex;
  gap: 2em;
  align-items: flex-start;
  max-width: 1200px;
  margin: auto;
}
#tambola-left-panel {
  flex-basis: 70%;
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 340px;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative; /* Needed for absolute toast centering */
}
#tambola-right-panel {
  flex-basis: 30%;
  flex-shrink: 1;
  flex-grow: 1;
  min-width: 320px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow-x: auto;
  margin-left: 1em;
}

/* --- Board: 9 rows x 10 columns --- */
#tambola-board {
  display: block;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.tambola-board-row {
  /* Only used as a flex row in both modes, so keep minimal */
  display: flex;
  flex-direction: row;
  gap: 0.2em;
  width: 100%;
}

/* --- Tambola Board Classic Mode: 9 rows, 10 columns --- */
#tambola-board.tambola-board-10x9 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2em;
  background: #f1f2f1;
  border-radius: 1em;
  padding: 0.7em 0.5em;
  margin-bottom: 1em;
  width: 100%;
  max-width: 600px;
  min-width: 320px;
}
.tambola-board-10x9 .tambola-board-row {
  display: flex;
  flex-direction: row;
  gap: 0.2em;
  width: 100%;
}
.tambola-board-10x9 .tambola-board-num, .tambola-board-10x9 .tambola-board-cell {
  flex: 1 1 0;
  min-width: 36px;
  max-width: 48px;
  text-align: center;
  padding: 0.3em 0;
  border-radius: 0.4em;
  background: #f5f8ff;
  font-weight: bold;
  font-size: 1.1em;
  border: 2px solid #e0e7ff;
  margin: 0;
}
.tambola-board-10x9 .tambola-board-num.called {
  background: #f0cc04;
  color: #fff;
  border: 2px solid #0072ff;
}
.tambola-board-10x9 .tambola-board-num.called-past {
  background: #0072ff;
  color: #b3d1ff;
  border: 2px solid #b3d1ff;
}

/* --- Tambola Board Theme Mode: 10x6 (10 rows, 6 columns) --- */
#tambola-board.tambola-board-10x6 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2em;
  width: 90%;
  max-width: 900px;
  margin: 0 auto 1.5em auto;
}
.tambola-board-10x6 .tambola-board-row {
  display: flex;
  flex-direction: row;
  gap: 0.2em;
  width: 100%;
}
.tambola-board-10x6 .tambola-board-cell, .tambola-board-10x6 .tambola-board-num {
  flex: 1 1 0;
  min-width: 0;
  max-width: 16.5%;
  background: #fff;
  border: 1px solid #b3d1ff;
  border-radius: 0.5em;
  text-align: center;
  font-size: 0.8em;
  padding: 0.2em 0.2em;
  overflow-wrap: break-word;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 0;
}
.tambola-board-10x6 .tambola-board-num.called {
  background: #0072ff;
  color: #fff;
  font-weight: bold;
}
.tambola-board-10x6 .tambola-board-num.called-past {
  background: #b3d1ff;
  color: #0072ff;
}

/* --- Remove/Override grid-based board for classic/theme modes --- */
#tambola-board.tambola-board-10x9,
#tambola-board.tambola-board-10x6 {
  grid-template-columns: unset !important;
  grid-template-rows: unset !important;
  display: flex !important;
}

/* --- Remove duplicate/old board-row and board-num rules --- */
.tambola-board-row {
  /* Only used as a flex row in both modes, so keep minimal */
  display: flex;
  flex-direction: row;
  gap: 0.2em;
  width: 100%;
}

/* Remove/override any grid display for #tambola-board */
#tambola-board {
  display: block;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* --- End Tambola Board Cleanup --- */
#tambola-organizer-controls {
  display: flex !important;
  flex-direction: row;
  gap: 0.7em;
  align-items: center;
  margin-bottom: 1.2em;
}
#tambola-organizer-controls .btn {
  display: inline-flex;
  width: auto;
  min-width: 120px;
  justify-content: center;
}
#tambola-generate-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5em;
  flex-wrap: nowrap;
}

#tambola-generate-controls > * {
  margin-bottom: 0 !important;
}

/* --- Tambola Board & Ticket UI Improvements --- */
#tambola-board.tambola-board-10x9,
#tambola-board.tambola-board-10x6 {
  background: #f7fafd;
  border: 2px solid #b3d1ff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1.1em 0.7em 2.2em 0.7em;
  margin-top: 0.5em;
  margin-bottom: 2.2em;
}

.tambola-ticket {
  background: #f7fafd;
  border: 2px solid #b3d1ff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #e3eafc;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
  padding: 0.7em 1.2em;
  min-width: 480px;
  max-width: 480px;
}

.tambola-board-10x9 .tambola-board-num,
.tambola-board-10x6 .tambola-board-num,
.tambola-board-10x6 .tambola-board-cell,
.tambola-ticket td {
  border: 2px solid #b3d1ff !important;
  background: #fff;
  color: #222831;
  border-radius: 0.5em;
  font-size: 0.9em;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

.tambola-board-10x9 .tambola-board-num.called,
.tambola-board-10x6 .tambola-board-num.called {
  background: #e89907 !important;
  color: #fff !important;
  border: 2px solid #0072ff !important;
}
.tambola-board-10x9 .tambola-board-num.called-past,
.tambola-board-10x6 .tambola-board-num.called-past {
  background: #b3d1ff !important;
  color: #0072ff !important;
  border: 2px solid #b3d1ff !important;
}

.tambola-ticket td.tambola-num-called {
  background: #b3d1ff !important;
  color: #0072ff !important;
  border: 2px solid #b3d1ff !important;
}

/* Board margin tweaks for better layout */
#tambola-board {
  margin-top: 0.5em !important;
  margin-bottom: 2.2em !important;
}

/* Ticket panel spacing */
#tambola-right-panel {
  margin-top: 0.5em;
}

/* --- Apply suggested changes for Tambola board spacing --- */
#tambola-board.tambola-board-10x9,
#tambola-board.tambola-board-10x6 {
  padding: 1em;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

.tambola-board-10x9 .tambola-board-row,
.tambola-board-10x6 .tambola-board-row {
  gap: 0.1em;
}

.tambola-board-10x9 .tambola-board-num,
.tambola-board-10x6 .tambola-board-num,
.tambola-board-10x6 .tambola-board-cell {
  margin: 0.1em;
}

/* --- Modernized Tambola Ticket Count Input --- */
.tambola-ticket-gen-controls {
  display: flex;
  align-items: center;
  gap: 0em;
  margin-bottom: 0em;
  margin-left: 0em;
  margin-top: 0em;
}
.tambola-ticket-gen-controls label {
  font-size: 1.08em;
  font-weight: 500;
  margin-right: 0.5em;
  color: #0078d4;
  letter-spacing: 0.01em;
}
.modern-number-input {
  width: 80px;
  padding: 0.5em 0.7em;
  font-size: 1em;
  border: 2px solid #b3d1ff;
  border-radius: 8px;
  background: #f7fafd;
  color: #222831;
  outline: none;
  margin-top: 1em;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,123,255,0.04);
}
.modern-number-input:focus {
  border: 2px solid #0078d4;
  box-shadow: 0 0 0 2px #b3d1ff55;
  background: #fff;
}

/* Tambola Player Dashboard Styles */
#tambola-player-dashboard {
  margin-top: 1.2em;
  margin-left: 1em;
  background: #fff;
  border: 1.5px solid #b3d1ff;
  border-radius: 0.7em;
  box-shadow: 0 2px 8px rgba(0,123,255,0.07);
  overflow: hidden;
  transition: max-height 0.3s;
  width: 90%;
  max-width: 800px;
}
#tambola-player-dashboard.collapsed {
  max-height: 2.5em;
  overflow: hidden;
}
#tambola-player-dashboard-header {
  cursor: pointer;
  user-select: none;
}
#tambola-player-list {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5em;
}
#tambola-player-list th, #tambola-player-list td {
  border-bottom: 1px solid #e6f0ff;
  padding: 0.3em 0.7em;
  font-size: 1em;
}
#tambola-player-list th {
  background: #f7fafd;
  font-weight: 600;
}
.tambola-status-badge {
  display: inline-block;
  min-width: 70px;
  text-align: center;
  font-size: 0.95em;
  border-radius: 0.7em;
  padding: 0.2em 0.7em;
  font-weight: 500;
}
.tambola-status-badge.joined {
  background: #4CAF50;
  color: #fff;
}
.tambola-status-badge.dropped {
  background: #e89907;
  color: #fff;
}
.tambola-status-badge.not-joined {
  background: #eee;
  color: #888;
}

#question-container {
  position: relative;
}

#feedback-buttons {
  position: absolute !important;
  top: 3.5em;
  right: 2em;
  z-index: 10;
  display: flex;
  gap: 0.5em;
}

#end-quiz-btn {
  position: absolute !important;
  bottom: 1.5em;
  right: 2em;
  z-index: 10;
}

#show-answer-btn {
  position: absolute !important;
  bottom: 1.5em;
  right: 10em;
  z-index: 10;
  display: inline-block;
  background: #f4f4f4;
  color: #666;
  border: 1.5px solid #ccc;
  border-radius: 22px;
  padding: 0.7em 1.7em;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: none;
  margin: 18px auto 0 auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
  cursor: pointer;
  outline: none;
}

#show-answer-btn:hover, #show-answer-btn:focus {
  background: #e9e9e9;
  color: #333;
  border-color: #bbb;
  transform: translateY(-1px) scale(1.02);
}

#show-answer-btn:active {
  background: #ededed;
  color: #222;
  border-color: #aaa;
}

#question {
  margin-bottom: 1.5em;
}
