/* 新增样式 */
.food-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 8px;
}

.food-in-pot {
    position: absolute;
    font-size: 30px;
    animation: dropIn 0.5s forwards;
    pointer-events: none;
}

/* 调整食材项布局 */
.food-item {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 调整新增食材区域 */
.add-food {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.add-food select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    /* display: flex; */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 95%;
    /* max-width: 800px; */
}

.html-title {
    padding: auto;
}

#html-info {
    text-align: center;
    padding: 10px;
    font-size: 0.8em;
    color: #888;
}

.pot {
    width: 75vw;
    height: 30vh;
    /* background-color: #8B4513; */
    /* background-color: #F11A0A; */
    /* 边框颜色 */
    border: 5px solid #F11A0A;
    /* 透明度 */
    opacity: 0.3;
    border-radius: 5px;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    animation: boil 2s infinite;
}

.pot img {
    width: 30%;
    min-width: 160px;
    height: auto;
    object-fit: contain;
}

@keyframes boil {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.food-selector {
    margin: 20px 0;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20vw, 1fr));
    gap: 15px;
    padding: 10px;
}

.food-item {
    cursor: pointer;
    transition: transform 0.3s;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.food-item:hover {
    transform: translateY(-5px);
}

.food-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
}

.food-info {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.timers {
    margin-top: 20px;
}

.timer {
    background-color: #ffcc00;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.5s ease-out;
    position: relative;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #bb2d3b;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.add-food {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.add-food input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 150px;
}

.add-food button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 动画效果 */
@keyframes dropIn {
    0% { transform: translateY(-100px) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes floatUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}

.food-in-pot {
    position: absolute;
    width: 40px;
    height: 40px;
    animation: dropIn 0.5s forwards;
}

.timer.completed {
    background-color: #dc3545;
}

/* 新增提示条样式 */
.notification-bar {
    border-radius: 5px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease-out;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.notification-bar.error {
    background: #dc3545;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

/* 新增动画效果 */
@keyframes pulseCompleted {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.timer.completed {
    animation: pulseCompleted 0.5s 3;
    background-color: #dc3545;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.notification-bar:nth-child(2) {
    top: 60px;
}
.notification-bar:nth-child(3) {
    top: 120px;
}


.category-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-tab.active {
    background-color: #007bff;
    color: white;
    transform: scale(1.05);
}