.filters * {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
}
.filters input, .filters select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #444;
    color: #f5f5f5;
}
.bottom-bar {
    position: relative;
}

input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.filters button {
    font-family: 'Roboto', sans-serif;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #28a745;
    color: white;
    cursor: pointer;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}
.card {
    position: relative;
    cursor: pointer;
    background-color: #1f1f1f;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}
.card:hover {
    transform: scale(1.05);
}
.card img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.card p {
    margin-top: 10px;
    font-size: 16px;
}
.card-details {
	font-family: 'Roboto', sans-serif;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 8px;
    z-index: 10;
    width: 80%;
    max-width: 800px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.card-details.show {
    display: flex;
    opacity: 1;
}
.card-content {
    display: flex;
    align-items: flex-start;
}
.card-details img {
    width: 300px;
    height: auto;
    margin-right: 20px;
    border: 1px solid #ccc;
}
.card-details .details * {
    flex-grow: 1;
    text-align: left;
    margin: 8px;
}
#detailNotes {
    background-color: #ffffe0; /* Light yellow background */
    border: 1px solid #cccc00; /* Yellow border */
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    color: brown; /* Brown text */
}
#detailText {
    background-color: #f0f0f0; /* Light gray background */
    border: 1px solid #ccc;   /* Light gray border */
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: "Californian FB", serif; /* Californian FB font with serif fallback */
	font-size: 18px;
	text-align: center;
    color: #333; /* Dark gray text */
    white-space: pre-wrap; /* Preserve newline characters */
	
}

#detailText strong {
    margin: 0;
    padding: 0;
}

.close-btn {
    position: absolute;
    background-color: #444;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.card-details .button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.close-btn:hover{
    background-color: #666;
}
.close-btn {
    top: 10px;
    right: 10px;
}
.add-to-deck-btn {
    background-color: #007BFF; /* Blue color */
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}
.keyword-popup {
    position: absolute;
    background-color: tan; /* Tan background */
    color: brown;          /* Brown text */
    font-family: "Californian FB", serif; /* Californian FB font */
    border: 1px solid brown; /* Brown border */
    padding: 10px;
    border-radius: 5px;
    z-index: 100; /* Ensure it appears above other elements */
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
}

/* Style for the close button inside the popup */
.popup-close-btn {
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    float: right;
    color: brown; /* Match text color */
}

/* Style for the keyword elements */
strong.keyword {
    cursor: pointer;
    text-decoration: none;
}

/* Underline on hover */
strong.keyword:hover {
    text-decoration: underline;
}

/* Custom popup styling for keyword reminders */
.keyword-popup {
    position: fixed; /* Fixed so it opens over all other elements */
    background-color: tan; /* Tan background */
    color: brown;          /* Brown text */
    font-family: "Californian FB", serif; /* Californian FB font */
    border: 1px solid brown;
    padding: 10px;
    border-radius: 5px;
    z-index: 9999; /* Very high z-index to appear on top */
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
    max-height: 50vh; /* Constrain height so content can scroll if needed */
    overflow-y: auto;
}

@media only screen and (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-details {
    position: fixed;
    top: calc(50% + 20px);  /* Lower the container by 20px */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-height: 90vh;
    box-sizing: border-box;
    padding: 20px;
    flex-direction: column;
    overflow-y: auto;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.9);
  }

  .card-content {
    flex-direction: column;
    align-items: center;
  }

  .card-details img {
    width: 75%;
    height: auto;
    margin: 0 0 15px 0;
    border: 1px solid #ccc;
  }

  .card-details .details {
    width: 100%;
  }

  .close-btn {
    top: 5px;
    right: 5px;
  }
  .keyword-popup {
    position: fixed;  /* Ensure fixed positioning on mobile */
    z-index: 100000;  /* Make sure it appears on top of everything */
    /* You can include any additional styling you need for mobile here */
  }
  .button-group {
  display: flex;
  align-items: center;  /* Vertically center items */
  gap: 10px;            /* Space between elements */
  margin-top: 15px;     /* Optional spacing above the group */
}

.card-quantity-input {
  width: 80px;     /* Make it wider */
  height: 40px;    /* Make it taller */
  font-size: 18px; /* Larger text */
  text-align: center;
}

.add-to-deck-btn {
  width: 50%;      /* Approximately half width */
  min-width: 100px;/* Ensure it doesn’t shrink too small on narrow screens */
}

@media (max-width: 768px) {
  .container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  /* Put the card list on top (order: 1) */
  .card-grid-container {
    order: 1;
    width: 100% !important;
    margin: 0;
  }

  /* Then the deck form second (order: 2) */
  .form-container {
    order: 2;
    width: 100% !important;
    margin: 0;
  }

  /* Force two columns of cards on mobile */
  .card-list {
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100%;
  }
}

.filters.horizontal-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px; /* spacing below the filters */
}

.filters.horizontal-filters select,
.filters.horizontal-filters label {
  background-color: #444;
  color: #f5f5f5;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.filters.horizontal-filters label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-grid-container.collapsed {
  display: none;
}



}

