/* General layout */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #2c3e50, #0ef);
    color: #fff;
    text-align: center;
    padding: 40px;
    margin: 0;
  }
  
  /* Headings */
  h1 {
    font-size: 2rem;
    margin-bottom: 30px;
  }
  
  /* Game selection grid */
  .games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: auto;
  }
  
  /* Game cards */
  .game-card {
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    padding: 25px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .game-card:hover {
    background: rgba(0,0,0,0.6);
    transform: translateY(-5px);
  }
  
  /* Footer */
  footer {
    margin-top: 50px;
    background: rgba(0,0,0,0.4);
    padding: 20px;
    border-radius: 10px;
  }
  
  /* Responsive tweaks */
  @media (max-width: 600px) {
    body { padding: 20px; }
    h1 { font-size: 1.6rem; }
    .game-card { padding: 20px; }
  }

  /* ---------- LIKHA PAGE STYLES ---------- */

.main-container {
    max-width: 900px;
    margin: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }
  
  /* Headings */
  h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  h2, h3 {
    color: #0ef;
    margin-top: 25px;
    margin-bottom: 10px;
  }
  
  /* Description section */
  #descriptionSection {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 20px;
    line-height: 1.8;
  }
  
  /* Buttons */
  button {
    margin: 10px 5px;
    padding: 12px 20px;
    background: #0ef;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
    transition: 0.3s;
  }
  
  button:hover {
    background: #00bcd4;
  }
  
  /* Input fields */
  .name-input, input[type=number] {
    border-radius: 6px;
    border: none;
    text-align: center;
    padding: 8px;
    font-size: 1rem;
  }

  input[type=number] {
  width: 5rem;
  }
  
  .name-input {
    width: 160px;
    margin: 6px;
  }
  
  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
  }
  
  th, td {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px;
    text-align: center;
  }
  
  th {
    background: rgba(0, 0, 0, 0.5);
    color: #0ef;
  }
  
  .score, .round-total {
    font-size: 1rem;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
  }
  
  .ok { background: rgba(0, 200, 0, 0.4); }
  .error { background: rgba(200, 0, 0, 0.5); }
  
  /* Footer */
  footer {
    margin-top: 50px;
    background: rgba(0,0,0,0.4);
    padding: 30px 10px;
    border-radius: 10px;
  }
  
  footer h3 { color: #0ef; }
  footer a {
    color: #fff;
    margin: 0 8px;
    text-decoration: none;
  }
  footer a:hover {
    text-decoration: underline;
    color: #0ef;
  }
  
  /* Responsive adjustments */
  @media (max-width: 700px) {
    body {
      padding: 10px;
    }
  
    .main-container {
      padding: 15px;
      width: 95%;
    }
  
    h1 { font-size: 1.5rem; }
    h2, h3 { font-size: 1.2rem; }
  
    table, th, td {
      font-size: 0.85rem;
    }
  
    .name-input {
      width: 120px;
    }
  
    button {
      width: 100%;
      margin: 8px 0;
    }
  }

  .winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.winner-popup .popup-content {
    background: white;
    padding: 25px;
    text-align: center;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 0 10px #000;
}

.winner-popup button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
}

  
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  color: black;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 350px;
  animation: fadeIn 0.2s ease-in-out;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.modal-buttons button {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

#confirmYes {
  background: #e74c3c;
  color: white;
}

#confirmNo {
  background: #2ecc71;
  color: white;
}

@keyframes fadeIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Overlay */
.modern-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  display: none;
  z-index: 9999;

  /* Centering method that works in WebView */
  justify-content: center;
  align-items: center;
}

/* Dialog */
.modern-dialog {
  background: #ffffff;
  width: 85%;
  max-width: 350px;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: dialogEnter 0.2s ease-out;
}

/* Content */
.dialog-content {
  padding: 20px;
  font-size: 16px;
  text-align: center;
  line-height: 1.5;
  color: #222;
}

/* Actions */
.dialog-actions {
  display: flex;
  border-top: 1px solid #eee;
}

/* Buttons */
.dialog-actions button {
  flex: 1;
  padding: 14px 0;
  font-size: 16px;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

/* Cancel */
.btn-text {
  color: #666;
}

/* Confirm */
.btn-primary {
  color: #1976d2; /* Material Blue */
  font-weight: bold;
}

/* Divider */
.dialog-actions button:first-child {
  border-left: 1px solid #eee;
}

/* Simple animation */
@keyframes dialogEnter {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
