/* === Global Reset & Base Styles === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 5vh 20px;
  background-color: #f0f2f5;
  color: #333;
  box-sizing: border-box;
}

/* === Container Layout === */
.container {
  max-width: 1200px;
  width: 100%;
  padding: 30px 40px;
  padding-top: 15px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  box-sizing: border-box;
}

/* === Typography === */
h1 {
  margin-bottom: 40px;
  font-size: 2.5em;
  font-weight: 600;
  color: #2c3e50;
}

.section-title {
  margin: 50px 0 20px;
  padding-bottom: 10px;
  font-size: 2em;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
}

/* === Grid & Cards === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  justify-content: center;
  align-items: stretch;
}

.house-card {
  padding: 25px 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.container:not(.disable-hover) .house-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.house-name {
  margin-bottom: 10px;
  font-size: 1.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.house-score {
  font-size: 3.5em;
  font-weight: 900;
  line-height: 1;
}

.big-header .house-score { font-size: 6em; }
.big-header .house-name { font-size: 2.5em; }

/* === House Colors === */
.house-salus   { background-color: #e74c3c; }
.house-fides   { background-color: #2ecc71; }
.house-veritas { background-color: #2c3e50; }
.house-pax     { background-color: #3498db; }

/* === Entries Table === */
.entries {
  margin-top: 20px;
  overflow-x: auto;
}

.entries-table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.entries-table th,
.entries-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.entries-table th {
  background-color: #f8f8f8;
  color: #555;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9em;
}

.entries-table tbody tr:last-child td { border-bottom: none; }
.entries-table tbody tr:hover { background-color: #f5f5f5; }

.entries-table td:nth-child(5) {
  font-weight: 600;
  color: #3498db;
}

/* === Buttons === */
.see-all-container {
  margin-top: 20px;
  text-align: center;
}

.see-all-button,
.home-button,
.home-mobile {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1.1em;
  font-weight: 600;
  background-color: #3498db;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.home-button {
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.home-button:hover {
  background-color: #2980b9;
}

.see-all-button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}
	

/* === Header with Home Button === */
#house-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#house-header .house-name {
  flex-grow: 1;
  text-align: center;
  margin: 0;
}

/* Prevent hover jump */
#house-header:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}


/* Desktop / normal page by default */
.normal-view {
  display: block;  /* visible */
}

.mobile-view {
  display: none;   /* hidden */
}

/* === Responsive === */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2em; }
  .container { padding: 20px 25px; }
  .house-name { font-size: 1.5em; }
  .house-score { font-size: 3em; }

  .entries-table,
  .entries-table thead,
  .entries-table tbody,
  .entries-table th,
  .entries-table td,
  .entries-table tr {
    display: block;
  }

  .entries-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .entries-table tr {
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
  }

  .entries-table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  .entries-table td:before {
    position: absolute;
    left: 15px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    font-weight: bold;
    text-align: left;
  }

  .entries-table tbody tr:last-child td { border-bottom: 1px solid #eee; }
  .entries-table tbody tr:last-child td:last-child { border-bottom: none; }
  .normal-view {
    display: none;  /* hide desktop div */
  }

  .mobile-view {
    display: block; /* show mobile div */
  }
}



/* === Minimal Back Arrow === */
.nav-bar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 15px;
}

.nav-link,
.back-link  {
  display: inline-block;
  height: 36px;
  padding-right: 10px;
  padding-left: 10px;
  line-height: 34px;
  text-align: center;
  font-size: 1.4em;
  font-weight: bold;
  color: #2c3e50;
  background-color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
	

.back-link {
  width: 16px;
}



.back-link:hover,
.nav-link:hover {
  background-color: #f0f0f0;
  color: #000;
}
