/* style.css */
/* Mobile-first styling for PvE Solitaire */
html, body {
  user-select: none;
  -webkit-user-select: none; /* For older Safari/Chrome */
  -ms-user-select: none;     /* For older IE/Edge */
}

input, textarea {
  user-select: text; 
  -webkit-user-select: text;
  -ms-user-select: text;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #e5f0df; /* dark background */
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Background Video */
#background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
}

/* Header styling */

/* Header Rectangle */
#header-rectangle {
    position: relative;
    margin: 0 auto;  /* Center the footer horizontally */
  width: 600px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #333;
  z-index: 999;
}


#header-group {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px; /* 20px gap between elements */
}

#settings-btn,
#reset-game-btn {
  font-size: 14px;
  padding: 5px 10px;
  cursor: pointer;
}

#score-container,
#moves-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9em;
  min-width: 60px;
}

#timer {
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  width: 60px;
  text-align: center;
}


/* Footer Layout */
#footer-rectangle {
  position: fixed;
  bottom: 0;
  left: 50%;                        /* Anchor to center of screen */
  transform: translateX(-50%);      /* Pull back half of its own width */
  
  width: 600px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #333;
  z-index: 999;
}



/* Footer Container */
#footer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensures it stays within 600px */
    position: relative;
}

/* Player Name Container */
#player-name-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    color: white;
}

/* Footer Buttons */
#deck-collection-btn {
	background-color: #007BFF;
	color: white;
	padding: 8px 12px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	position: absolute;
	left: 10px;
}

#deck-collection-btn img {
    width: 40px; /* Adjust size as needed */
    height: 60px;
    border-radius: 5px;
    border: 1px solid white;
}

#deck-collection-btn span {
    font-size: 12px;
    color: white;
    margin-top: 5px;
}

/* Positioning the buttons */
#deck-collection-btn {
    position: relative;
    left: -140px;
}

#undo-btn {
    background-color: #007BFF;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    right: 10px;
}

/* #footer-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#player-name {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
} */

/* Main container uses flex to space out top and bottom sections */
#game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
  align-items: center; /* Center horizontally */
}

/* Top Section */
#top-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The board container for top row & tableau row */
#board-container {
  width: fit-content;
  margin: 0 auto;
}

/* The top row and the tableau each have 7 children. */
#top-row, #tableau {
  display: flex;
  justify-content: center;
  gap: 0px;
  margin-top: 10px;
  margin-bottom: 6px;
}

/* top-area & tableau-column share the same size for alignment */
.top-area, .tableau-column {
  width: clamp(38px, 12vw, 65px);
  height: clamp(48px, 16vw, 85px);
  position: relative;
  box-sizing: border-box;
  margin: 0 2px;
}

/* Hide Border from the Specific Empty Slot */
#empty-area {
    border: none !important;
}

/* If you want the foundation top-areas to differ, override them below 
.foundation {
  /* For example, foundation might be 70px tall */
  /*height: 75px; */
/*} */

/* Opponent Section */
#opponent-space {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.opponent-placeholder {
  width: 200px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Card styling */
.card {
  width: clamp(38px, 12vw, 65px);
  height: clamp(48px, 16vw, 85px);
  background-color: white;
  position: relative;
  border-radius: 4px;
  border: 2px solid #ebe8e8;
  overflow: hidden;
  pointer-events: auto;
}

/* front card design, upper left */
.card-top {
  font-size: clamp(10px, 2vw, 17px);
  position: absolute;
  top: 1.5px;
  left: 5px;
  font-size: 17px;
  font-weight: bold;
  line-height: 1;
}

/* front card design */
.card-center {
  font-size: clamp(24px, 5vw, 48px);
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  line-height: 1;
}

.card[data-suit="diamonds"] .big-suit,
.card[data-suit="hearts"] .big-suit {
  color: red;
}
.card[data-suit="clubs"] .big-suit,
.card[data-suit="spades"] .big-suit {
  color: black;
}

/* Face-down cards styling */
.card[data-face-up="false"] {
/*  background-image: url('Assets/Images/cardStyles/cardStyleDefault.png'); */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 120%;
  color: transparent !important;
  border: 2px solid #000;
}

/* Stock & Waste: force stacking at (0,0) for each card */
#stock .card,
#waste .card {
  position: absolute;
  top: 0;
  left: 0;
}

/* Base modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  max-width: 500 px;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fefefe;
  padding: 0;
  border: 1px solid #888;
  width: 80%;
  max-width: 580px;
  border-radius: 8px;
  overflow: hidden; /* if content overflows */
}

@keyframes suit-pop {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  50% {
    transform: scale(2.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.suit-animation {
  font-size: 24px; /* Base size; the keyframes will scale it */
  font-weight: bold;
  pointer-events: none;
  animation: suit-pop 1s ease-out forwards;
}

label {
  color: black;
}

.accept-button {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;  /* Increase button padding */
  margin-right: 1px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accept-button:hover {
  background-color: #0056b3;
}

/* If you want to make the No button a different color */
.decline-button {
  font-size: 16px;  /* Make text larger */
  padding: 10px 20px;  /* Increase button padding */
  margin-left: 1px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #1B2A49;  /* Default blue color */
  color: white;
  transition: background-color 0.2s ease-in-out;
}

.decline-button:hover {
  background-color: #0F1A30;  /* Darker red on hover */
}

/* Stats Button - Matches Footer Button Style and Positioned Next to Undo */
#stats-btn {
  background-color: #007BFF;     /* Same blue as Undo */
  color: white;                  /* White text */
  padding: 8px 12px;             /* Same padding as Undo */
  border: none;                  /* No border */
  border-radius: 5px;            /* Rounded corners */
  cursor: pointer;               /* Pointer cursor on hover */
  position: absolute;            /* Absolute position within #footer-container */
  right: 70px;                   /* 10px left of #undo-btn (which is right: 10px) */
}

.stats-content {
  font-size: 16px;
  color: #444;
  padding: 1em;
  line-height: 1.5;

}

.stats-content p {
  margin-bottom: 0.5em;
}

/* Foundation area */
.foundation {
  position: relative;
  width: 80px; /* adjust based on your card size */
  height: 120px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  z-index: 1;
}

.foundation {
  position: relative;
  width: 65px;
  height: 85px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.foundation-bg {
  position: absolute;
  width: clamp(34px, 11vw, 60px);
  height: clamp(44px, 14vw, 80px);
  overflow: hidden;
  pointer-events: none;
  margin-top: 2.5px;
  margin-left: 2.5px;
  z-index: 0;
  opacity: 0.4;
}

#board-container {
  width: 100%;
  max-width: 600px; /* or 90vw if you want full responsiveness */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 2px;
}

@media (min-width: 600px) {
  .modal-content {
    padding: 0 !important;
  }
}

#intro-title {
  color: white;
}

.mini-suit, .big-suit {
  position: relative;
  display: inline-block; /* ensures container has size */
}

/* ===================== Joker Card ===================== */
.card.face-joker {
  background-image: url("Assets/Images/NPCs/joker_facecard.jpg");
  background-size: cover;
  background-position: center;
  background-color: white;
}
