@font-face {
    font-family: 'Diphylleia';
    src: url('./기타 자료/Diphylleia/Diphylleia-Regular.ttf') format('truetype');
}

body {
    font-family: 'Diphylleia', serif;
    background-color: #f5f1e8; /* 오래된 종이 느낌의 배경색 */
    color: #4a4a4a;
    margin: 0;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
}

header h1 {
    color: #8a6d3b; /* 브론즈 색상 */
    text-align: center;
    margin-bottom: 20px;
    font-weight: normal;
}

/* Preset Button Styles */
.preset-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

#preset-main-button {
    background-color: #8a6d3b;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Diphylleia', serif;
    font-size: 1rem;
}

.preset-options {
    display: none; /* Hidden by default */
    position: absolute;
    right: 0;
    top: 45px;
    background-color: #f9f9f9;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
}

.preset-option-button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Diphylleia', serif;
}

.preset-option-button:hover {background-color: #f1f1f1;}

#item-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px;
    padding-right: 5px;
    margin-bottom: 15px;
    border-radius: 3px;
    font-size: 1.1rem;
    width: 48%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.item.no span {
    color: #333;
}

.item span {
    color: #888;
}

.item.no .toggle-button {
    background-color: #e57373; /* 톤 다운된 빨간색 */
    color: #fff;
    border-color: #e57373;
}

.item .toggle-button {
    background-color: #81c784; /* 톤 다운된 초록색 */
    color: #fff;
    border-color: #81c784;
}

.toggle-button {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1rem;
    min-width: 60px;
    text-align: center;
    transition: background-color 0.3s;
}

.add-item-container {
    display: flex;
    margin-top: 20px;
}

#new-item-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1rem;
}

#add-item-button {
    padding: 12px 18px;
    background-color: #8a6d3b; /* 브론즈 색상 */
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1rem;
}

.item > div {
    display: flex;
    gap: 5px; /* 버튼 사이 간격 */
    align-items: center;
}

.delete-button {
    background-color: #ccc; /* 회색 배경 */
    color: #333; /* 어두운 글자색 */
    border: 1px solid #bbb;
    padding: 3px 6px; /* 패딩 줄여서 크기 축소 */
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem; /* 폰트 크기 축소 */
    min-width: 25px; /* 최소 너비 축소 */
    text-align: center;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #e0e0e0;
}

/* 모바일 화면 대응 */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .item {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .toggle-button,
    .delete-button {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    #new-item-input,
    #add-item-button {
        padding: 10px;
        font-size: 0.9rem;
    }
}

.description {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px; /* Increased padding */
    border-top: 1px solid #d5d5d5;
    color: #555; /* Darker text */
    font-size: 1.1rem; /* Increased font size */
}

footer a {
    color: #8a6d3b;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1); /* Added text shadow */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    text-align: center;
    position: relative;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 15px;
}

.modal-content p {
    color: #555;
    font-size: 1rem;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}
