/* =========================
   1. CSS Variables
   ========================= */

:root {
  --dark: #8abbd8;
  --dark_popup: #366079;
  --primary: #FF3366;
  --success-color: #28a745;
  --failure-color: #dc3545;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-duration: 0.5s;
}

/* =========================
   2. Reset and Base Styles
   ========================= */


*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0px;
  padding: 0px;
}

body {
  margin: 0px;
  padding: 0px;
  font-family: var(--font-family);
  background-color: var(--dark);
  color: white;
}

h1 {
  font-size: 2rem;
  text-align: center;
}

p {
  font-size: 1.5rem;
  text-align: center;
}


/* =========================
   3. Layout Styles
   ========================= */

.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 1rem;
  background-color: var(--dark);
  margin: 5px;
}


.winscreen_view {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 1rem;
  background-color: var(--dark);
  margin: 5px;
}

.hidden {
  display: none;
  visibility: hidden;
}

#fireworks-container canvas {
  width: 100%;
  height: 100%;
}


/* =========================
   4. Component Styles
   ========================= */





/* CSS */
.button-30 {
  margin-right: 20px;
  border: none;
  background: #e67e22;
  padding: 10px 20px;
  border-radius: 1rem;
  border: solid 1px #f39c12;
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;

  -webkit-transition: all 0.1s;
  -moz-transition: all 0.1s;
  transition: all 0.1s;

  -webkit-box-shadow: 0px 6px 0px #d35400;
  -moz-box-shadow: 0px 6px 0px #d35400;
  box-shadow: 0px 6px 0px #d35400;
}

.button-30:focus {
  background: #dd8f11;
}

.button-30:hover {
  background: #dd8f11;
}

.button-30:active {
  -webkit-box-shadow: 0px 2px 0px #d35400;
  -moz-box-shadow: 0px 2px 0px #d35400;
  box-shadow: 0px 2px 0px #d35400;
  position: relative;
  top: 4px;
}

.button-30:disabled {
  background: #f39c12;
  color: #fff;
  cursor: not-allowed;
}
.button-logout {
  background: #dc3545;
  border-color: #c82333;
  box-shadow: 0px 6px 0px #a71d2a;
}

.button-logout:hover,
.button-logout:focus {
  background: #c82333;
}

.button-logout:active {
  box-shadow: 0px 2px 0px #a71d2a;
  position: relative;
  top: 4px;
}

.button-logout:disabled {
  background: #e74c3c;
  cursor: not-allowed;
}
#back_btn {
  padding: 0px;
}

#progress {
  position: relative;
  font-size: 2rem;

}


input[type=file]::file-selector-button {
  margin-right: 20px;
  margin-bottom: 20px;
  border: none;
  background: #e67e22;
  padding: 10px 20px;
  border-radius: 1rem;
  border: solid 1px #f39c12;
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;

  -webkit-transition: all 0.1s;
  -moz-transition: all 0.1s;
  transition: all 0.1s;

  -webkit-box-shadow: 0px 6px 0px #d35400;
  -moz-box-shadow: 0px 6px 0px #d35400;
  box-shadow: 0px 6px 0px #d35400;
}

input[type=file]::file-selector-button:hover {
  background: #dd8f11;
}

input {
  text-align: center;
}

.inp {
  position: relative;
  width: 100%;
  max-width: 280px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: -40px;
  padding: 5px;
  font-size: 1.5rem;
}

.inp label {
  position: relative;
  top: 40px;
  left: 12px;
  font-size: 16px;
  color: #0077FF;
  transform-origin: 0 0;
  transform: translate3d(0, 0, 0) scale(0.75);
  transition: all 0.2s ease;
  pointer-events: none;
  font-size: 5rem;
}

.inp .focus-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.05);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
}

.inp input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  border: 0;
  font-family: inherit;
  padding: 16px 12px 0 12px;
  height: 106px;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  color: #000;
  transition: all 0.15s ease;
  font-size: 2rem;
}

.inp input:hover {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.inp input:focus {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
  box-shadow: inset 0 -2px 0 #0077FF;
}

.inp input:focus+.label+.focus-bg {
  transform: scaleX(1);
  transition: all 0.1s ease;
}


.dimensions {
  display: flex;
  flex-direction: row;
}

.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 10px;
  padding: 10px;
  color: white;
  font-weight: bold;
  text-align: center;
  width: 100%;
  height: 100%;
}


.topmenu {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  width: 100%;
  height: 10%;
}

.topmenu *{
  margin: 1rem;
}

.pointform {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 10px;
  padding: 10px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  width: 100%;
  height: 100%;
}

.popup {
  display: block;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  border-radius: 10px;
  background-color: var(--dark);
  align-items: center;
}



.map_view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 5px;
  padding: 5px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  height: 100%;
}


.images_view {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
}

.images_view .button-30{
  margin: 1rem;
  width: 95%;
}

.images_view #hintimage{
  width: 95%;
  height: 100%;
  margin: 1rem;
}

.images_view #map{
  width: 95%;
  height: 100%;
  margin: 1rem;
}



#map {
  width: 95%;
  height: 100%;
  min-height: 400px;
}

#alertpopup {
  display: block;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  border-radius: 10px;
  background-color: var(--dark_popup);
  align-items: stretch;
  justify-content: center;
  box-shadow: #000 0px 0px 10px;
  z-index: 1001;
}

#game_id_form{
  margin-top: 10%;
}

#overlay {
  position: fixed;
  top: -5%;
  overflow: hidden;
  left: -5%;
  width: 105%;
  height: 105%;
  background-color: rgba(0, 0, 0, 0.5);
  display: block;
  justify-content: center;
  align-items: center; 
  z-index: 1000;
}

#success-icon,
#fail-icon {
  display: flex;
  position: fixed;
  min-width: 50px;
  min-height: 50px;
  font-size: 10rem;
  top: 50%;        /* Center vertically */
  left: 50%;       /* Center horizontally */
  transform: translate(-50%, -50%); /* Center the element */
  text-shadow: 0 4px 8px rgb(0, 0, 0);
  z-index: 1000;   /* Ensure it's on top */
  transition: opacity 0.5svar(--transition-duration) ease, visibility var(--transition-duration) ease;
  opacity: 0;
  visibility: hidden;
}

#success-icon i, /* For Font Awesome */
#success-icon img { /* For Image */
  font-size: 10rem; /* Adjust size */
  color: var(--success-color); /* Green color for Font Awesome */
}

#fail-icon i, /* For Font Awesome */
#fail-icon img { /* For Image */
  font-size: 10rem; /* Adjust size */
  color: var(--failure-color); /* Red color for Font Awesome */
}

#back_btn i {
  font-size: 1rem;     /* Adjust icon size */
}

/* Image Preview Container Styling */
#image_preview_container {
  margin-top: 1rem;
  text-align: center;
}

#image_preview {
  max-height: 400px;
  width: auto;
  border: 2px solid rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#winning_image_preview_container {
  margin-right: 1rem;
}

#winning_image_preview,
#winscreen_image {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.winning-image-picker {
  align-items: center;
  flex-wrap: wrap;
}

.point-item{
  display: flex;
  flex-direction: row;
  margin: 1rem;
}

.point-item img{
  max-width: 100px; 
  max-height: 100px;
  margin-right: 1rem;
}

.point_details {
  display: flex;
  flex-direction: column;
  align-items:flex-start;
  justify-content: center;
  margin: 0;
  margin-right: 1rem;
  padding: 0;
  color: white;  
  width: 100%;
  height: 100%;
}


.point_details p{
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
}

.listimage {
  width: 10%;
  height: 10%;
  margin: 1rem;
}

/* =========================
   5. Animations
   ========================= */

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(0.9); }
  90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

#success-icon.show,
#fail-icon.show {
  animation: fadeInOut 2s forwards;
}
