:root {
    --primary-color: #ff6b6b;
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #ced4da;
}

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 600px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

header { text-align: center; margin-bottom: 20px; }

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}
.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}
.main-nav a:hover {
    background-color: #e9ecef;
}
.main-nav a.active {
    color: var(--primary-color);
    background-color: #ffe3e3;
}

.page-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}
.contact-info a {
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #888;
}
footer a {
    color: #888;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

.search-box { display: flex; gap: 10px; margin-bottom: 15px; }
.search-box input { flex: 1; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; }
.search-box button, .cta-btn, .action-btn { background-color: var(--primary-color); color: white; border: none; padding: 12px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }

/* 카테고리 탭 스타일 */
.category-tabs { display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.tab-btn { background: none; border: none; color: #888; font-weight: bold; cursor: pointer; padding: 5px 10px; }
.tab-btn.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); margin-bottom: -12px; }

.quick-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; min-height: 35px; }
.chip-btn { background-color: #e9ecef; border: none; padding: 8px 15px; border-radius: 20px; cursor: pointer; transition: 0.2s; }
.chip-btn:hover { background-color: #dee2e6; }

.basket { min-height: 50px; border: 2px dashed var(--border-color); border-radius: 8px; padding: 15px; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.ingredient-tag { background-color: var(--primary-color); color: white; padding: 6px 12px; border-radius: 15px; display: flex; align-items: center; gap: 8px; font-size: 0.9em; }
.ingredient-tag span { cursor: pointer; font-weight: bold; }
.empty-msg { color: #aaa; margin: auto; }

/* 옵션 필터 스타일 */
.options-section { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 0.9em; font-weight: bold; color: #555; }
.filter-group select { padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); }
.cta-btn { grid-column: 1 / -1; margin-top: 10px; padding: 15px; font-size: 1.1em; }

/* 로딩 애니메이션 */
.loading-box { text-align: center; padding: 30px; }
.pot-animation { font-size: 3em; display: inline-block; animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-15px); } }

/* 레시피 카드 */
.recipe-card { border: 1px solid #eee; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.match-rate { display: inline-block; background: #e3f2fd; color: #1976d2; padding: 4px 8px; border-radius: 4px; font-size: 0.8em; margin-bottom: 10px; font-weight: bold; }
.detail-btn { background: #f1f3f5; border: none; padding: 8px 15px; border-radius: 6px; cursor: pointer; width: 100%; margin-top: 10px; }

/* 모달창 스타일 */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; }
.modal-content { background: white; padding: 30px; border-radius: 15px; width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5em; cursor: pointer; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.action-btn { flex: 1; background: #4dabf7; }
.hidden { display: none !important; }

/* 사진 업로드 영역 스타일 */
.image-upload-wrapper { margin-bottom: 20px; text-align: center; }
.upload-btn { 
    display: block; 
    background-color: #fff; 
    color: var(--primary-color); 
    padding: 15px; 
    border-radius: 8px; 
    cursor: pointer; 
    border: 2px dashed var(--primary-color); 
    font-weight: bold; 
    transition: 0.2s; 
}
.upload-btn:hover { background-color: #ffe3e3; }

#imagePreview { margin-top: 15px; position: relative; display: inline-block; }
#previewImg { max-width: 100%; max-height: 200px; border-radius: 8px; border: 1px solid var(--border-color); object-fit: cover; }
.remove-btn { 
    position: absolute; top: -10px; right: -10px; 
    background: #343a40; color: white; border: none; 
    border-radius: 50%; width: 28px; height: 28px; 
    cursor: pointer; font-weight: bold; font-size: 1.2em;
}