a:hover {
  cursor: pointer;
}

.flexcol {
  flex-direction: column;
}

.flexcolrev {
  flex-direction: column-reverse;
}

.flexrow {
  flex-direction: row;
}

.flexrowrev {
  flex-direction: row-reverse;
}

.install-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1d3557;
  color: #f1faee;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.install-button .icon {
  margin-right: 8px;
  font-size: 20px;
}

.install-button:hover {
  background-color: #457b9d;
}

.install-button:active {
  transform: scale(0.95);
}

#install-container {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
}
.tutorial-button-container {
  display: flex;
  justify-content: space-around;
}
/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #1d3557;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: "Cinzel", serif;
  font-weight: bold;
}

.navbar .logo a {
  color: #f1faee;
  text-decoration: none;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a:hover {
  color: #e63946;
}

/* Burger Menu (Mobile) */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  background: #f1faee;
  height: 3px;
  width: 25px;
  margin: 4px 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #1d3557;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    box-shadow: -2px 4px 6px rgba(0, 0, 0, 0.3);
  }

  .nav-links.active {
    display: flex;
  }

  .burger {
    display: flex;
  }
}

.logo-icon-txt {
  display: flex;
  align-items: center;
}

.background {
  position: fixed; /* Sticks to the viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Places it behind everything */
  pointer-events: none; /* Prevents interference with user interactions */
}

.progress-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  position: relative;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0; /* Fully visible initially */
  background: rgba(255, 255, 255, 0.9); /* Darkened overlay effect */
  transition: height 0.3s ease;
}

.darkened-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.25); /* Darken the background */
  z-index: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.current-turn {
  display: flex;
  justify-content: center;
  padding: 5px;
  color: var(--text);
}

.score {
  display: flex;
  justify-content: center;
  color: var(--text);
}

.discarded-txt {
  color: var(--text);
}

.castle-container {
  position: relative;
}

.last-played-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100px;
  height: 200px;
  transform: translateX(-50%);
}

.texture {
  width: 100%;
  height: 50%; /* Start hidden (no height) */
  background-image: url("/assets/wallc.png"); /* Replace with your texture image path */
  background-size: auto; /* Ensure the texture repeats naturally */
  background-repeat: repeat; /* Repeat the texture */
  background-position: top; /* Background alignment */
  position: absolute; /* Align it within the container */
  bottom: 0; /* Ensure growth starts at the bottom */
  transition: height 2s ease; /* Smooth growth animation */
}

.cloudy-round-panel {
  color: white;
  background: var(--cloud-bg);
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.color-picker-container {
  color: white;
  text-align: center;
  background: var(--cloud-bg);
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 10px;
}

.color-picker-h1 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--text);
}

.text {
  color: var(--text);
}

.color-picker-buttons {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.color-button {
  border: none;
  border-radius: 8px;
  padding: 15px 30px;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-button:hover {
  transform: scale(1.1);
}

.red-button {
  background-color: #e74c3c;
}

.blue-button {
  background-color: #3498db;
}

.red-button:focus,
.blue-button:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 8px;
  left: 8px;
}

.card-top-right {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 8px;
  right: 8px;
}

.card-icon {
  width: 16px;
  height: 16px;
}

.card-costs {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-cost {
  display: flex;
  flex-direction: row;
  color: white;
}

.cost-icon {
  width: 16px;
  height: 16px;
}

.card-value {
  font-size: 14px;
  font-weight: bold;
  color: white;
}
.card-name {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  /*white-space: nowrap;*/
  max-width: 80px;
  color: white;
}

.blue-hue {
  filter: hue-rotate(200deg);
}

.red-hue {
  filter: hue-rotate(290deg);
}

.efx-indicator {
  height: 50px;
}

:root {
  left: 0;
  --translate-start: -100%; /* Default: offscreen left */
  --translate-end: 0; /* Default: offscreen right */
}

@keyframes slideInOut {
  0% {
    transform: translateX(
      var(--translate-start)
    ); /* Start offscreen to the left */
    opacity: 0;
  }
  25% {
    transform: translateX(
      var(--translate-end)
    ); /* Fully visible in the center */
    opacity: 1;
  }
  75% {
    transform: translateX(
      var(--translate-end)
    ); /* Stay in place for a moment */
    opacity: 1;
  }
  100% {
    transform: translateX(
      var(--translate-start)
    ); /* Move offscreen to the right */
    opacity: 0;
    visibility: hidden;
  }
}

.played-card-anim {
  position: fixed;
  width: 130px;
  animation: slideInOut 2s ease-in-out 1 forwards;
  /*max-width: 60vw; */
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain; /* Preserve aspect ratio */
  overflow: hidden;
  top: 0%;
  /*transform: translateY(-50%);*/
  /* Adjust animation duration (3s) as needed */
}

.played-card-anim.red {
  left: 0;
  --translate-start: -100%; /* Default: offscreen left */
  --translate-end: 0; /* Default: offscreen right */
}

.played-card-anim.blue {
  right: 0;
  --translate-start: 100%; /* Default: offscreen left */
  --translate-end: 0; /* Default: offscreen right */
}

@keyframes fallToFlat {
  0% {
    transform: translate(-100%, -50%) rotate(-90deg); /* Offscreen, vertical position */
    opacity: 0; /* Hidden */
  }
  30% {
    transform: translate(0, -50%) rotate(-45deg); /* Midway, halfway through the fall */
    opacity: 1; /* Visible */
  }
  60% {
    transform: translate(0, -50%) rotate(0deg); /* In the center, flat position */
    opacity: 1;
  }
  80% {
    transform: translate(0, -50%) rotate(0deg); /* In the center, flat position */
    opacity: 1;
  }
  100% {
    transform: translateX(-100%); /* Move offscreen to the right */
    opacity: 0;
    visibility: hidden;
  }
}

.stick {
  position: absolute;
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform-origin: center left; /* Pivot point for rotation */
  transform: translate(-100%, -50%) rotate(-90deg); /* Initial offscreen vertical position */
  animation: fallToFlat 2s ease-out 1 forwards; /* Play once */
  max-width: 100vw; /* Fit within viewport width */
  max-height: 100vh; /* Fit within viewport height */
  object-fit: contain; /* Maintain aspect ratio */
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.overlay-image {
  width: 100%;
  max-width: 90%;
  max-height: 90%;
  cursor: pointer;
  border: 2px solid white;
}

/***** MODAL DIALOG ****/
#modal {
  /* Underlay covers entire screen. */
  position: fixed;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;

  /* Flexbox centers the .modal-content vertically and horizontally */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Animate when opening */
  animation-name: fadeIn;
  animation-duration: 150ms;
  animation-timing-function: ease;
}

#modal > .modal-underlay {
  /* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
  position: absolute;
  z-index: -1;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
}

#modal > .modal-content {
  /* Position visible dialog near the top of the window */
  margin-top: 10vh;

  /* Sizing for visible dialog */
  width: 80%;
  max-width: 600px;
  max-height: 80vh;

  /* Display properties for visible dialog*/
  border: solid 1px #999;
  border-radius: 8px;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
  background-color: var(--cloud-bg);
  padding: 20px;

  /* Animate when opening */
  animation-name: zoomIn;
  animation-duration: 150ms;
  animation-timing-function: ease;
  overflow: scroll;
}

#modal.closing {
  /* Animate when closing */
  animation-name: fadeOut;
  animation-duration: 150ms;
  animation-timing-function: ease;
}

#modal.closing > .modal-content {
  /* Animate when closing */
  animation-name: zoomOut;
  animation-duration: 150ms;
  animation-timing-function: ease;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.9);
  }
}

/* Form styling */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group button {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.games-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow: scroll;
}

.games-list li {
  display: flex;
  align-items: center;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 8px;
}

.games-list li span {
  flex: 1;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-list .room-name {
  flex: 2; /* Room name gets more space */
}

.games-list .actions {
  flex: 0 0 auto; /* Prevent actions from stretching */
  display: flex;
  gap: 5px;
}

.games-list .actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.games-list .actions button img {
  width: 16px;
  height: 16px;
}

.games-list .actions button:hover {
  opacity: 0.8;
}

.red {
  color: red;
}

.cloudbg2 {
  background-color: var(--cloud-bg2);
}

.info-bar-above-game {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-stats {
  display: flex;
  padding: 5px 0;
}

.shield-magic-defense {
  position: absolute;
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(
    -50%,
    -50%
  ); /* Adjust position to center the image fully */
  width: 40%; /* Adjust size as needed */
  height: auto;
  z-index: 10; /* Ensure it appears on top of other content */
}

.shield-magic-defense-glow {
  filter: blur(10px) brightness(1.5);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 5px;
}

.online {
  background-color: green;
}

.offline {
  background-color: red;
}

.banner-on-home {
  width: 300px;
  height: 250px;
  border: 1px solid red;
  margin-right: 10px;
}

.small-text-pane {
  width: 400px;
  margin-left: 10px;
}

.eventlog {
  display: flex;
  flex-direction: column;
  align-items: first baseline;
  align-self: baseline;
  height: 80px;
  width: 100%;
  overflow: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */

  ::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
}

/* HEX MAP */
.map-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.hex-map {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hex-map-row {
  display: flex;
}

.hex-img {
  background-size: cover;
  background-position: center;
}

.hex-value-txt {
  background-color: #0009;
  border-radius: 10px;
  padding: 5px;
}

.hex-map-offset {
  margin-left: 51px; /* Offset every other row for staggered effect */
  height: 31px;
  transform: translate(0, -13px);
}

.hex {
  width: 50px;
  height: 57px;
  background-color: #6b8e23;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: white;
  font-weight: bold;
  /*border: 2px solid #4d6b15;*/
  margin-right: 1px;
}

.progbar-container {
  position: relative;
  width: 100%;
  background: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 5px;
}
.progbar-bar {
  height: 8px;
  background: #4caf50;
  width: 0%; /* Example progress */
  transition: width 0.3s;
  /*flex-grow: 1;*/
  position: relative;
}
.progbar-hint {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: white;
  font-weight: bold;
  pointer-events: none;
}
.progbar-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4caf50;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.progbar-details {
  max-height: 0;
  overflow: hidden;
  background: #333;
  color: white;
  padding: 0 10px;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s;
}
.progbar-details.active {
  max-height: 100px;
  padding: 10px;
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

/* Toast Notification */
.toast {
  background-color: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  animation:
    toastFadeIn 0.3s ease,
    toastFadeOut 0.5s ease 3s forwards;
}

/* Fade Animations */
@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.fill-button {
  position: relative;
  height: 45px;
  width: 150px;
  margin: 10px 7px;
  padding: 5px 5px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: gray;
  border: 2px #383736 solid;
  border-radius: 4px;
  text-transform: uppercase;
  outline: 0;
  overflow: hidden;
  background: none;
  z-index: 1;
  cursor: pointer;
  transition: 0.08s ease-in;
  -o-transition: 0.08s ease-in;
  -ms-transition: 0.08s ease-in;
  -moz-transition: 0.08s ease-in;
  -webkit-transition: 0.08s ease-in;
}

.fill-button:hover {
  color: whitesmoke;
}

.fill-button:before {
  content: "";
  position: absolute;
  background: #383736;
  bottom: 0;
  left: 0;
  right: 0;
  top: var(--fill-height, 20%);
  /*top: 100%;*/
  z-index: -1;
  -webkit-transition: top 0.09s ease-in;
}

/*.fill-button:hover:before {*/
/*  top: 0;*/
/*}*/
