:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --accent: #fbc531;
    --bg: #f7f9fc;
    --text: #2f3640;
}

body {
    background: var(--bg);
    font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    color: var(--text);
    margin: 0;
}

.app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.main-btn {
    background: linear-gradient(135deg, var(--primary), #ff4757);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: 0.3s;
}

.main-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4); 
}

.filter-nav { margin-bottom: 30px; }

.search-box input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 1rem;
    box-sizing: border-box;
}

.category-tags {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: white;
    cursor: pointer;
    transition: 0.2s;
}

.tag.active { background: var(--text); color: white; }

/* 菜单网格 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.recipe-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    border: 1px solid #edf2f7;
}

.recipe-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
}

.card-img {
    height: 180px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.card-info { padding: 20px; }
.card-info h3 { margin: 0 0 10px 0; font-size: 1.25rem; }

.fav-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active { display: flex; }

.modal-card {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 30px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.res-icon { 
    font-size: 80px; 
    text-align: center; 
    margin: 20px 0; 
    animation: float 3s ease-in-out infinite; 
}

#res-name { text-align: center; margin: 10px 0; }

.res-ingredients { 
    background: #f8f9fa; 
    padding: 15px; 
    border-radius: 15px; 
    margin-top: 20px; 
}

.res-ingredients h4 { margin: 0 0 10px 0; color: #7f8c8d; }

.modal-footer { display: flex; gap: 15px; margin-top: 30px; }

.btn-secondary { 
    flex: 1; padding: 12px; border-radius: 50px; 
    border: 1px solid #eee; background: #fff; cursor: pointer; 
}

.btn-primary { 
    flex: 1; padding: 12px; border-radius: 50px; 
    border: none; background: var(--primary); color: #fff; 
    cursor: pointer; font-weight: bold; 
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.close-btn { 
    position: absolute; top: 20px; right: 20px; 
    font-size: 1.5rem; border: none; background: none; cursor: pointer; 
}