/* --- Algemene Stijlen & Box Sizing Reset --- */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}
/* Add this to the top of css/style.css */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: auto; /* This ALLOWS vertical scrolling */
}

body {
    display: flex;
    flex-direction: column;
}
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #0D5239; /* Standaard biljartlaken groen */
    color: white; /* Standaard tekstkleur naar wit voor donkere achtergrond */
}

/* --- Kahoot-stijl Achtergrond (voor Scorebord & Admin) --- */
.kahoot-scoreboard-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}
.admin-page-background {
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Crect x='50' width='50' height='50'/%3E%3Crect y='50' width='50' height='50'/%3E%3C/g%3E%3C/svg%3E");
}

/* --- Index Pagina (Portal) --- */
.portal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.portal-card {
    background-color: white;
    color: #333;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    width: 100%;
    max-width:fit-content;
}
/* Add this to your css/style.css file */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.admin-card {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-card h2 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}
/* --- Scorebord (Kahoot-stijl) --- */

.kahoot-scoreboard-page {
  /* The new green background */
  background-color: #0D5239; 
  min-height: 100vh;
  color: white;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.scoreboard-header {
  background-color: white;
  color: black;
  font-weight: 700;
  font-size: 2em;
  padding: 10px 40px;
  border-radius: 6px;
  margin-bottom: 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-align: center;
  margin-top: 120px; /* Adjusted top margin */
  margin-bottom: 20px; /* Reduced bottom margin */
	 display: flex; /* New */
  justify-content: space-between; /* New */
  align-items: center; /* New */
  width: 100%; /* New */
  max-width: 1200px; /* New */
  box-sizing: border-box; /* New */
}
#refresh-timer {
    font-size: 0.8em;
    font-weight: normal;
    background-color: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 4px;
	    align-self: flex-end;
}
.scoreboard-list-kahoot {
  /* No longer a grid */
  position: relative;
  width: 100%;
  max-width: 1200px;
  /* Height is now set by JavaScript */
}

.team-bar {
  position: absolute;
  width: 49%;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: top 0.8s ease, left 0.8s ease;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  font-weight: 600;
}

/* The colors for the ranks */
.team-bar.gold { background-color: #ffd700; color: #5a4f00; }
.team-bar.silver { background-color: #c0c0c0; color: #3b3b3b; }
.team-bar.bronze { background-color: #cd7f32; color: #41280e; }
.team-bar.normal { background-color: #ffffff; color: #333333; }

.rank-kahoot {
  font-size: 1.2em;
  margin-right: 15px;
	    width: 95%;

}

.avatar-placeholder {
  height: 40px;
    width: 100%;
    border-radius: 10%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex
;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    margin-right: 15px;
    padding: 5px;
    color: white;
}

.name-kahoot {
  flex-grow: 1;
  font-size: 1.4em;
	overflow: hidden;         /* Hides the overflowing part of the name */
  text-overflow: ellipsis;  /* Adds the "..." */
  margin-right: 10px;  
}

.score-kahoot {
  font-size: 1.5em;
  font-weight: 700;
	overflow: hidden;         /* Hides the overflowing part of the name */
  text-overflow: ellipsis;  /* Adds the "..." */
  margin-right: 10px;  
}


.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;      /* Horizontally centers the content */
    justify-content: center;  /* Vertically centers the content */
    min-height: 100vh;        /* Makes the container fill the full screen height */
    padding: 20px;            /* Prevents content from touching the edges */
    box-sizing: border-box;   /* Ensures padding is included in the height calculation */
}

.login-title {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 0.2em;
    color: white;
}

.login-subtitle {
    font-size: 1.2em;
    color: #ddd;
    margin-top: 0;
}

.login-menu {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.login-button:hover {
    transform: scale(1.05);
}

.button-icon {
    font-size: 1.5em;
    margin-right: 15px;
}

/* Specifieke kleuren voor de knoppen */
.admin-login {
    background-color: #c2185b; /* A strong pink/purple */
}

.organizer-login {
    background-color: #0277bd; /* A strong blue */
}
#index-page {
    background-image: url('../images/backgrounds/achtergrond.png');
    background-size: cover; /* Zorgt dat de afbeelding het hele scherm vult */
    background-position: center center;
    background-repeat: no-repeat;
   
}
/* Modal Styles */
.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex; justify-content: center; align-items: center;
}
.modal-content {
  background: white; color: #333;
  padding: 30px; border-radius: 8px;
  width: 90%; max-width: 500px;
}
.modal-close-btn {
  float: right; font-size: 2em;
  cursor: pointer;
}
.admin-grid {
    display: grid;
    /* Adjust minmax to better fit potentially smaller cards */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logout-button {
    background-color: #d32f2f; /* Red color */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.logout-button:hover {
    background-color: #c62828; /* Darker red on hover */
}
.zeskamp-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.zeskamp-row .form-group {
    flex-grow: 1;
    margin-bottom: 0;
}

.zeskamp-row .save-single-btn {
    padding: 15px;
    flex-shrink: 0; /* Prevents the button from shrinking */
}

.save-status-zeskamp {
    width: 80px; /* Gives the status text a fixed space */
    font-weight: bold;
}
/* Add this to your css/style.css file */

.score-entry-form .form-group {
    margin-bottom: 25px;
}

.score-entry-form label {
    font-size: 1.2em;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.score-entry-form input[type="number"] {
    width: 100%;
    padding: 15px;
    font-size: 2em;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.submit-score-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    background-color: #4CAF50; /* Green for submit */
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#form-message {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
}
/* Style for the new scan button */
.scan-login {
    background-color: #4CAF50; /* Green */
}

/* Style for the QR reader container */
.qr-reader-container {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
    border: 4px solid white;
    border-radius: 8px;
    overflow: hidden;
    display: none; /* Hidden by default */
}
/* This makes your main containers fill the available space */
.login-container, 
.admin-content-container, 
.kahoot-scoreboard-page .admin-content-container /* For nested containers */ {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the content inside */
}
.dashboard-layout {
    display: flex;
    height: 100vh; /* Fill the full screen height */
}

.admin-menu {
    flex: 0 0 280px; /* Fixed width for the menu */
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.admin-menu .admin-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.menu-item {
    color: white;
    text-decoration: none;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-content-area {
    flex-grow: 1; /* Take up the remaining space */
    padding: 30px;
    overflow-y: auto; /* Add a scrollbar only if the content is too tall */
}.registered-teams-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.registered-teams-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 5px;
}

.delete-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}
.scoresheet-table input {
    width: 65px; /* Narrower width */
    height: 40px; /* Taller height */
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    font-size: 1.1em; /* Make the numbers a bit bigger */
}
.scoresheet-table th, .scoresheet-table td {
  border: 1px solid #ccc;
  padding: 12px; /* Increased from 8px to add more space */
  text-align: center;
}
/* Highlights the 'Wij' points and roem cells when it's their turn */

.scoresheet-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background-color: white; /* Make the whole table white */
    color: #333; /* Default text color to dark grey */
    border-radius: 8px; /* Optional: adds rounded corners to the table */
    overflow: hidden; /* Ensures the background color respects the rounded corners */
}

.ronde-resultaat {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 8px;
    color: #333; /* Ensure this text is also dark */
    background-color: rgba(0,0,0,0.05);
    padding: 4px;
    border-radius: 4px;
    min-height: 28px;
}
.spelend-wij > td[data-label*="(Wij)"] {
  background-color: #fffde7; /* Light yellow */
  
}

/* Highlights the 'Zij' points and roem cells when it's their turn */
.spelend-zij > td[data-label*="(Zij)"] {
  background-color: #fffde7; /* Light yellow */
  color:#000000;
}
.registered-teams-list li {
    flex-wrap: wrap; /* Allows the QR code to wrap to the next line on small screens */
    padding-bottom: 15px;
}

.qr-code-placeholder {
    width: 100%;
    margin-top: 15px;
    display: flex;
    justify-content: center;
}
/* --- Stijlen voor Mobiel --- */
@media screen and (max-width: 768px) {
  /* --- Scoreformulier (Partij Pagina) --- */
  .scoresheet-container {
      padding: 5px; /* Reduce padding on small screens */
  }

  .scoresheet-table thead {
    /* Verberg de tabel-headers op mobiel */
    display: none;
  }

  .scoresheet-table, .scoresheet-table tbody, .scoresheet-table tr, .scoresheet-table td {
    /* Maak van alles een block element i.p.v. een tabel-element */
    display: block;
    width: 100%;
  }

  .scoresheet-table tr {
    /* Elke rij wordt een 'kaart' */
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
  }

  .scoresheet-table tr:nth-child(odd) {
    background-color: #e0f7fa; 
  }

  .scoresheet-table tr:nth-child(even) {
    background-color: #e8f5e9;
  }
  
  .scoresheet-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 5px;
  }
  
  .scoresheet-table td:last-child {
      border-bottom: none;
  }

  .scoresheet-table td::before {
    /* Toon het data-label als de naam van het veld */
    content: attr(data-label);
    font-weight: bold;
    text-align: left;
    margin-right: 10px;
  }
  
  .scoresheet-table input {
    width: 100px; /* Geef de inputs een vaste breedte */
  }

  .total-scores {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  
  /* Reset de achtergrondkleur voor de spelende team indicator op mobiel */
  .spelend-wij td[data-label*="(Wij)"],
  .spelend-zij td[data-label*="(Zij)"] {
     background-color: rgba(255, 253, 231, 0.5);
  }
}