
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
  color: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

#backgroundCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

header {
  background-color: rgba(50, 50, 50, 0.8);
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 1.5rem;
  backdrop-filter: blur(5px);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.search-container {
  max-width: 300px;
  margin: 2rem auto 1rem;
  position: relative;
  z-index: 1;
  transition: max-width 0.5s ease;
}

.search-container.expanded {
  max-width: 600px;
}

#searchInput {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border-radius: 10px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#searchInput:focus {
  outline: none;
  box-shadow: 0 0 15px rgba(30, 144, 255, 0.5);
}

.suggestions {
  background: white;
  color: #000;
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
  border-radius: 5px;
  position: absolute;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.suggestions div {
    padding: 0.8rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
  }

.suggestions div:hover {
  background-color: #f0f0f0;
}

.suggestions img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
  
.suggestions .item-name {
flex-grow: 1;
}

.filter-toggle {
  text-align: center;
  margin: 0.5rem auto 1rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  background-color: rgba(30, 144, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease, background-color 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.filter-toggle:hover {
  background-color: rgba(30, 144, 255, 1);
}

.filter-toggle.active {
transform: rotate(180deg);
}

.filter-toggle svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.filters {
max-width: 1000px;
margin: 0 auto;
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
backdrop-filter: blur(6px);
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: space-between;
position: relative;
z-index: 1;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
overflow: hidden;
max-height: 0;
padding: 0 1rem;
opacity: 0;
transition: max-height 0.6s ease, opacity 0.4s ease, padding 0.6s ease;
}

.filters.active {
max-height: 100px;
opacity: 1;
padding: 1rem;
}

.filters select,
.filters input {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
}

#loading {
  display: none;
  text-align: center;
  font-size: 1.2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

#results {
  max-width: 1000px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.auction-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.auction-card:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.auction-card img {
  width: 64px;
  height: 64px;
  display: block;
  margin-bottom: 0.5rem;
}

.auction-card h4 {
  margin: 0.5rem 0;
  color: #ffd700;
}

.auction-card p {
  margin: 0.25rem 0;
}

.auction-card button {
  background: #1e90ff;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s ease;
}

.auction-card button:hover {
  background: #3399ff;
}

/* 모달 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(50, 50, 50, 0.8);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(30, 40, 50, 0.95);
  border-radius: 15px;
  max-width: 90%;
  width: 90%;
  max-height: 85vh; 
  overflow-y: auto; 
  padding: 2rem;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-layout {
display: flex;
flex-wrap: wrap; 
gap: 2.5rem; 
}

.modal-left-column {
flex: 3; 
min-width: 300px;
order: 1;
}

.modal-right-column {
flex: 2;
min-width: 220px;
display: flex;
flex-direction: column;
order: 2;
}

.modal-left-column h2 { 
margin-top: 0;
margin-bottom: 1.5rem;
color: #ffd700;
font-size: 1.8rem;
word-break: break-word;
}


.modal-lore-content p { 
margin: 0 0 0.4em 0;
line-height: 1.5;
font-size: 1rem;
word-wrap: break-word; 

}


.modal-item-image {
width: 110px; 
height: 110px;
background: rgba(0, 0, 0, 0.25);
border-radius: 8px;
padding: 10px; 
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem; 
align-self: center; 
}

.modal-item-image img {
display: block;
width: 100%;
height: 100%;
object-fit: contain; 
}

.modal-details-content { 
width: 100%;
}

.modal-details-content p {
margin: 0.6rem 0;
font-size: 1rem;
line-height: 1.4;
word-break: break-word;
}

.modal-details-content p strong {
color: #bdc3c7; 
display: inline-block;
width: 80px; 
margin-right: 10px;
}

.modal-actions {
margin-top: 2rem;
width: 100%;
display: flex;
justify-content: center;
order: 3; 
}


@media (max-width: 768px) {
.modal-layout {
  flex-direction: column; 
  gap: 2rem;
}
.modal-right-column {
  order: 1; 
  align-items: center; 
}
.modal-left-column {
  order: 2; 
  text-align: center; 
}
.modal-left-column h2 {
  font-size: 1.5rem;
}
.modal-details-content {
    text-align: left; 
}
.modal-details-content p strong {
    display: block;
    width: auto;
    margin-bottom: 0.2em;
}
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-close svg {
  width: 15px;
  height: 15px;
  fill: white;
}

.modal-item-details {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.modal-item-image {
  width: 128px;
  height: 128px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-item-image img {
  width: 100px;
  height: 100px;
}

.modal-item-info h2 {
  margin-top: 0;
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.modal-item-info p {
  margin: 0.4rem 0;
  font-size: 1.1rem;
}

.modal-item-lore {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.modal-actions button {
  background: #1e90ff;
  border: none;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-actions button:hover {
  background: #3399ff;
  transform: translateY(-2px);
}

.modal-actions button.disabled {
  background: #666;
  cursor: not-allowed;
}
