/* Fonts */
@font-face {
  font-family: 'SF Pro Display';
  src: url('resources/SFProDisplay.woff2');
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  display: flex;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-image: url('resources/background_potrait.png');
  /* Default (Spaceman) for login and Spaceman page */
}

@media (min-width: 1000px) {
  body {
    background-image: url('resources/background_landscape.png');
    /* Default landscape */
  }
}

/* Big Bass-specific Background (overrides default) */
.bigbass-page {
  background-image: url('resources/bigbass_background_potrait.png');
  /* Big Bass portrait */
}

@media (min-width: 1000px) {
  .bigbass-page {
    background-image: url('resources/bigbass_background_landscape.png');
    /* Big Bass landscape */
  }
}

/* Game Navigation Dropdown */
.game-nav {
  margin: 10px auto;
  text-align: center;
}

#game-select {
  padding: 5px;
  width: 200px;
  height: 30px;
  border: none;
  background: #1a1a1a;
  color: white;
  font-family: 'SF Pro Display';
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 20px;
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
  .pagination-search input {
    font-size: 14px;
    /* Slightly smaller on mobile, but still readable */
  }

  .pagination-search button {
    font-size: 14px;
  }

  ul li {
    font-size: 14px;
  }

  .hovertext {
    font-size: 10px;
    white-space: normal;
    max-width: 70vw;
    padding: 6px;
    line-height: 1.2;
    box-sizing: border-box;
    overflow: hidden;
    text-align: left;
  }

  #game-select {
    width: 150px;
    /* Smaller width for mobile */
  }
}

/* Layout */
.form-container {
  width: 400px;
  margin: 0 auto 50px;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  /* Center child elements */
}

.content-container {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: fit-content;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 30px 10px 50px 10px;
  border-radius: 10px;
}

/* Spaceman-specific content background */
.spaceman-page .content-container {
  background-image: url('resources/watermark-no-border.png');
  /* Spaceman watermark */
}

/* Big Bass-specific content background */
.bigbass-page .content-container {
  background-image: url('resources/bigbass_watermark-no-border.png');
  /* Big Bass watermark */
}

.header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 30px;
}

.header img {
  width: 80%;
}

.footer {
  text-align: center;
}

/* Login Form */
.form-group {
  margin-bottom: 15px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.login-buttons button,
.login-buttons a.button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #6a0dad;
  color: white;
  font-family: 'SF Pro Display';
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 20px 0 40px 0;
}

.login-buttons button:hover,
.login-buttons a.button:hover {
  background-color: #5a0c9d;
}

.login-buttons a.kontak-admin {
  background-color: #ff5733;
  border: 2px solid #ffffff;
  font-weight: bold;
}

.login-buttons a.kontak-admin:hover {
  background-color: #e04e2d;
}

.login-text {
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  max-width: 300px;
  margin: 0 auto;
}

/* SEO Text */
.seo-text {
  opacity: 0;
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* Components */
.grid-container {
  display: grid;
  grid-template-areas:
    'icon text1 text1'
    'icon text2 text2';
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.icon {
  grid-area: icon;
  height: 70px;
  width: auto;
}

.text1 {
  grid-area: text1;
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 14px;
}

.text2 {
  grid-area: text2;
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 14px;
}

.tooltip {
  position: relative;
}

/* Hover Popup */
.hovertext {
  position: absolute;
  top: 0;
  left: 100px;
  z-index: 100;
  overflow: hidden;
  white-space: nowrap;
  background-color: #101328C8;
  transition: opacity 0.1s ease-in;
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  visibility: hidden;
  text-align: left;
}

.visible {
  visibility: visible;
}

/* History Table */
.tbl-container {
  background-color: rgba(26, 26, 26, 0.5);
  /* Semi-transparent white background */
  border: 2px solid #ffffff;
  /* White border around the table */
  border-radius: 10px;
  font-size: 16px;
  font-family: 'SF Pro Display';
  padding: 15px 15px 5px;
  /* Padding inside the border */
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 5px;
}

.tbl-header {
  padding-top: 0px;
  border-bottom: solid 2px rgba(255, 255, 255);
}

.tbl-header td:nth-child(1) {
  text-align: left;
  padding-left: 5px;
  width: 65%;
  /* Match the date/time column */
}

.tbl-header td:nth-child(2) {
  text-align: center;
  width: 25%;
  /* Match the result column */
}

.tbl-content {
  position: relative;
  margin-top: 10px;
  /* Reduced from 30px */
}

td {
  padding: 5px;
  /* Increased padding */
  vertical-align: middle;
  font-weight: 300;
  font-size: 12px;
  color: #fff;
}

/* Row number (first column) */
td:nth-child(1) {
  text-align: right;
  padding-right: 10px;
}

/* Date/time (second column) */
td:nth-child(2) {
  text-align: left;
}

/* Result (third column) */
td:nth-child(3) {
  text-align: center;
}

.blurred {
  filter: blur(3px);
}

.tbl-content {
  position: relative;
  margin-top: 20px;
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Controls (Dropdown and Refresh Button) */
.controls-wrapper {
  position: relative;
  display: flex;
  justify-content: flex-end;
  /* Align to the right */
  margin: 10px 0 10px 10px;
  /* Add margin to avoid edge */
}

.round-refresh-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* Ensure alignment to the right */
}

#round {
  padding: 5px;
  height: 30px;
  border: none;
  background: #1a1a1a;
  color: white;
  font-family: 'SF Pro Display';
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 20px;
}

#refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: 5px;
}

#refresh-icon {
  width: 20px;
  height: 20px;
}

#refresh-countdown {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  vertical-align: middle;
  font-family: 'SF Pro Display';
  font-size: 14px;
  color: white;
  margin-left: 5px;
  line-height: 20px;
}

/* Pagination */
.pagination-container {
  text-align: center;
  margin: 5px 0;
  background: none;
}

.pagination-search {
  margin-bottom: 10px;
}

.pagination-search input {
  padding: 5px;
  width: 100px;
  margin-right: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'SF Pro Display';
}

.pagination-search button {
  padding: 5px 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  /* Increased font size for button */
  font-family: 'SF Pro Display';
}

.pagination-search button:hover {
  background-color: #0056b3;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
}

ul li {
  color: #fff;
  display: flex;
  font-size: 14px;
  /* Increased font size for pagination numbers */
  font-family: 'SF Pro Display';
}

ul li a {
  padding: 5px 10px;
}

ul li.active a {
  background-color: blue;
}

/* Miscellaneous */
.upgrade {
  position: absolute;
  width: 80px;
  height: auto;
  left: 50%;
  margin-left: -40px;
  margin-top: 30px;
}

.hide {
  display: none;
}

.error-message {
  color: red;
  font-family: 'SF Pro Display';
  font-size: 14px;
  text-align: center;
  margin: 10px 0;
}

#copyright {
  border-top: solid 2px rgb(255, 255, 255);
  height: 50px;
  text-align: right;
  color: #fff;
  font-family: 'SF Pro Display';
  font-size: 12px;
  padding-top: 5px;
}

.spacer {
  height: 10px;
  /* Adjust this value to control the gap */
}