* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
    background: #FFF5F7;
    color: #333;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#app {
    min-height: 100vh;
}

/* 主题色 */
:root {
    --primary: #FFB6C1;
    --primary-light: #FFDDE1;
    --primary-dark: #FF8C94;
    --bg: #FFF5F7;
    --text: #333;
    --text-light: #999;
    --border: #E5E5E5;
    --success: #6CC4A1;
    --warning: #F5B041;
    --danger: #FF6B6B;
}

/* 通用样式 */
.page {
    padding: 16px;
    padding-bottom: 80px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 12px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-primary:disabled {
    background: #CCC;
}

.input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 16px;
    outline: none;
}

.input:focus {
    border-color: var(--primary);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    cursor: pointer;
}

.bottom-nav .nav-item.active {
    color: var(--primary-dark);
}

.bottom-nav .nav-item .icon {
    font-size: 24px;
    margin-bottom: 2px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}

.tag-pink {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.tag-green {
    background: #D4F1E8;
    color: #6CC4A1;
}

.tag-yellow {
    background: #FFF3D6;
    color: #F5B041;
}

/* 安全等级 */
.safety-recommended { color: #6CC4A1; }
.safety-moderate { color: #F5B041; }
.safety-caution { color: #FF9500; }
.safety-avoid { color: #FF6B6B; }

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty .icon {
    font-size: 60px;
    margin-bottom: 16px;
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFDDE1 100%);
}

.login-box {
    background: white;
    border-radius: 24px;
    padding: 40px 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(255, 182, 193, 0.3);
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFB6C1, #FF8C94);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 16px;
}

.title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 32px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.code-group {
    display: flex;
    gap: 10px;
}

.code-input {
    flex: 1;
}

.send-btn {
    height: 48px;
    padding: 0 16px;
    background: #FFF5F7;
    color: #FF8C94;
    border: 1px solid #FFDDE1;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.send-btn:disabled {
    background: #F5F5F5;
    color: #CCC;
    border-color: #E5E5E5;
}

.login-btn {
    height: 48px;
    background: linear-gradient(135deg, #FFB6C1, #FF8C94);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

.login-btn:disabled {
    background: #CCC;
}

.agreement {
    font-size: 12px;
    color: #999;
    text-align: center;
}

.agreement a {
    color: #FF8C94;
    text-decoration: none;
}

/* 首页 */
.header {
    text-align: center;
    padding: 20px 0;
}

.header h1 {
    font-size: 28px;
    color: var(--primary-dark);
}

.quick-actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
}

.action-item .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 16px;
    margin-bottom: 12px;
}

.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cuisine-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    cursor: pointer;
}

.cuisine-item .cuisine-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 12px;
    cursor: pointer;
}

.recipe-info {
    flex: 1;
}

.recipe-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.recipe-meta {
    display: flex;
    gap: 6px;
}

.arrow {
    font-size: 20px;
    color: var(--text-light);
}

/* 搜索 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-select {
    flex: 1;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    background: white;
}

/* 菜谱列表 */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.recipe-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
}

.recipe-image {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-placeholder {
    font-size: 48px;
}

.recipe-body {
    padding: 12px;
}

.recipe-body h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.recipe-cuisine {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.recipe-time {
    font-size: 12px;
    color: var(--text-light);
}

/* 菜谱详情 */
.recipe-detail {
    padding: 0;
    padding-bottom: 100px;
}

.recipe-header {
    position: relative;
}

.recipe-hero {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-hero-icon {
    font-size: 80px;
}

.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}

.recipe-name {
    font-size: 22px;
    margin-bottom: 12px;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.recipe-info-row {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-light);
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.nutrition-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg);
    border-radius: 10px;
}

.nutrition-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-dark);
}

.nutrition-label {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.safety-card {
    background: linear-gradient(135deg, #F4FBF8, #FFF5F7);
}

.safety-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: white;
}

.safety-icon {
    font-size: 32px;
}

.safety-text strong {
    display: block;
    margin-bottom: 4px;
}

.safety-text p {
    font-size: 13px;
    color: var(--text-light);
}

.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: var(--bg);
    border-radius: 10px;
}

.ingredient-name {
    flex: 1;
    font-size: 14px;
}

.ingredient-qty {
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 500;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    gap: 12px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    padding-top: 3px;
}

.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: white;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

/* 菜单页 */
.page-title {
    font-size: 20px;
    margin-bottom: 16px;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
}

.order-item-info {
    flex: 1;
}

.order-item-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.order-item-info p {
    font-size: 12px;
    color: var(--text-light);
}

.remove-btn {
    width: 28px;
    height: 28px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
}

.nutrition-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
}

.nutrition-row .value {
    font-weight: 500;
    color: var(--primary-dark);
}

.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.shopping-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
}

.shopping-item .qty {
    color: var(--primary-dark);
    font-weight: 500;
}

.copy-btn {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

.submit-section {
    margin-top: 20px;
}

.submit-order-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

.go-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

/* 我的 */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nickname {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 4px;
}

.role {
    font-size: 14px;
    color: var(--text-light);
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    cursor: pointer;
}

.menu-item .icon {
    font-size: 20px;
    margin-right: 12px;
}

.menu-item span:nth-child(2) {
    flex: 1;
    font-size: 15px;
}

.menu-item .arrow {
    font-size: 20px;
    color: var(--text-light);
}

.menu-item.logout {
    margin-top: 20px;
    color: var(--danger);
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 20px;
}

.load-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

.load-btn:disabled {
    color: var(--text-light);
}
