@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

h1 {
    color: #0d6efd;
    margin-bottom: 10px;
}

p {
    color: #606770;
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#deck-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 16px;
}

#search-button {
    padding: 12px 20px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-button:hover {
    background-color: #0b5ed7;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.result-box h3 {
    margin: 0 0 10px 0;
}

.result-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading {
    font-style: italic;
    color: #888;
}

.error {
    color: #dc3545;
    font-weight: bold;
}

/* 결과 창 스타일 조정 */
#result h3 {
  margin-bottom: 8px; /* 제목 아래 여백 줄이기 */
}

#result p {
  margin-top: 4px;    /* 문단 위 여백 줄이기 */
  margin-bottom: 4px; /* 문단 아래 여백 줄이기 */
  line-height: 1.5;   /* 문단 내의 줄 높이 조정 */
}

/* 결과 카드들을 담는 컨테이너 */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* 개별 카드 아이템 */
.card-item {
    width: 180px;
    text-align: center;
}

.card-item img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* 위험도 높음 (빨간색 테두리) */
.risk-high {
    border: 4px solid #e74c3c;
    box-shadow: 0 0 15px #e74c3c;
}

/* 위험도 낮음 (노란색 테두리) */
.risk-low {
    border: 4px solid #f1c40f;
    box-shadow: 0 0 15px #f1c40f;
}

.card-item p {
    margin: 2px 0;
    font-size: 0.9em;
    font-weight: bold;
}