@import url("https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Lora:ital,wght@0,400..700;1,400..700&family=MedievalSharp&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

.hidden {
  display: none;
}

html {
  display: flex;
  width: 100%;
}

a {
  text-decoration: none;
  color: black;
}

html,
body {
  margin: auto;
  align-items: center;
  margin-top: 5rem;
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-style: normal;
}

#mainMenuH1 {
  font-family: "Playfair Display", serif;
  font-optical-sizing: auto;
  font-style: normal;
}

#bodyBlock {
  position: relative;
}

.mainMenuButtons {
  text-align: center;
  margin: 5px 0px;
  display: block;
  width: 200px;
  border: 1px solid rgba(1, 1, 1, 0.5);
  border-radius: 4px;
  transition: 200ms;
  font-size: 15px;
}
.mainMenuButtons:hover {
  background: #000;
  color: white;
}

.inputLabel {
  margin: 0;
  font-size: 19px;
}
#pageCreate input {
  margin-bottom: 1rem;
  padding: 5px 0;
  width: 198px;
}

#typeSelectors select {
  margin-bottom: 1rem;
  padding: 5px 0;
  width: 200px;
}


#pageCreate button {
  background: #303030;
  color: white;
  border: 1px solid rgba(1, 1, 1, 0.5);
  padding: 3px;
  border-radius: 4px;
  font-size: 15px;
}
button#createGame {
  width: 202px;
  padding: 3px;
}

div#topGame.bodyBlock {
  width: 100%;
  height: 15%;
}
div#bottomGame.bodyBlock {
  width: 100%;
  height: 35%;
}
div#middleGame.bodyBlock {
  width: 100%;
  height: 40%;
}
h4 {
  float: left;
}

.gameHTML,
.gameBody {
  height: 100%;
  margin-top: 0rem;
  text-align: center;
}

.bodyBlock button {
  margin-top: 0.2rem;
  width: 202px;
  padding: 3px;
  border-radius: 4px;
  font-size: 15px;
  background: #101010;
  color: white;
  border: 1px solid rgba(1, 1, 1, 0.5);
}

.bodyBlock button#generateCode {
  width: max-content;
}
.bodyBlock button.hidden {
  display: none;
}

#op-cards img {
  width: 50px;
  height: 75px;
  margin: 2px;
}
#op-cards {
  margin-bottom: 1rem;
}
#deck-cards {
  width: 50.5em;
  height: 7em;
  flex-grow: 1;
  padding-top: 40px;
  text-align: center;
  display: flex;
  justify-content: right;
  align-items: flex-start;
  z-index: 1;
}
#deck-cards img {
  width: 75px;
  height: 100px;
  margin: 2px;
  display: inline-block;
  border: 1px solid black;
  border-radius: 8px;
  overflow: hidden;
  position: absolute;
  will-change: transform;
  transition: all 0.3s ease-in-out;
  cursor: -webkit-grab;
  cursor: -moz-grab;
  cursor: grab;
}

#table-cards img {
  width: 75px;
  height: 100px;
  margin: 2px;
  display: inline-block;
  border: 1px solid black;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  cursor: -webkit-grab;
  cursor: -moz-grab;
  cursor: grab;
}

#turn-cards,
#defender-cards {
  display: grid;
  grid-template-columns: repeat(6, 80px);
}
#turn-cards img,
#defender-cards img {
  float: left;
  display: flex;
  width: 75px;
  height: 100px;
  margin: 2px;
  border: 1px solid black;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  cursor: -webkit-grab;
  cursor: -moz-grab;
  cursor: grab;
}

#deck-cards img:nth-child(2n+1){
  rotate: 5deg;
}
#deck-cards img:nth-child(3n+5){
  rotate: 10deg;
}

#your-cards img {
  width: 100px;
  height: 125px;
  margin: 2px;
}

#warningLabel {
  color: red;
  font-size: 1.2rem;
  text-align: center;
  margin-top: 1rem;
  width: 200px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f4;
}

/* Floating Popup */
.floating-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: white;
  padding: 14px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  max-width: 90%;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.150s ease-in;
}
.floating-prompt {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  color: white;
  padding: 14px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  max-width: 90%;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.150s ease-in;
}

.floating-popup.show,
.floating-prompt.show {
  opacity: 1;
}

/* Close Button */
.close-btn,
.close-prompt,
.accept-prompt {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.accept-prompt {
  color: #4CAF50;
  margin-left: 10px;
}
.close-prompt {
  margin-left: 5px;
  color: #f44336;
}

/* Page Content (for demo) */
.content {
  padding: 40px;
}

/* Responsive (mobile-friendly) */
@media (max-width: 480px) {
  .floating-popup {
    font-size: 14px;
    padding: 12px 16px;
  }
  .floating-prompt {
    font-size: 14px;
    padding: 12px 16px;
  }

  .close-btn {
    font-size: 18px;
  }
}