#search-bar {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #4CAF50;
    border-radius: 25px;
    font-size: 16px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.3s ease-in-out;
}

#search-bar:focus {
    border-color: #388E3C;
    box-shadow: 2px 2px 8px rgba(0, 128, 0, 0.3);
}

#search-bar::placeholder {
    color: #666;
    font-style: italic;
}

.container {
    background-color: #e8f5e9; /* 背景色をライトグリーンに */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px; /* 幅を調整 */
    margin: auto; /* 中央配置 */
    text-align: center;
}



body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
}

.calorie-section {
    background: linear-gradient(135deg, #ffcc80, #ffb74d);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: auto;
}

.calculator-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 8px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
}

button:hover {
    background-color: #218838;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    padding: 8px;
    background: #e9ecef;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul li button {
    font-size: 12px;
    padding: 5px 10px;
}

#suggestions {
    max-height: 150px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    margin-top: 5px;
    display: none;
    position: absolute;
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.suggestion {
    padding: 10px;
    cursor: pointer;
}

.suggestion:hover {
    background-color: #f0f0f0;
}

header {
    text-align: center;
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f8f8;
    border-bottom: 3px solid #ddd;
}

nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    text-decoration: none;
    color: #333;
    width: 150px;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

nav a:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

nav a img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

main {
    padding: 20px;
    background-color: #fafafa;
    background-image: url('image/back.webp'); /* 画像のパスを指定 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.category {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h2 {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

@media (max-width: 768px) {
    nav a {
        width: 120px;
    }
    nav a img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    nav a {
        width: 90px;
        font-size: 12px;
    }
    nav a img {
        width: 30px;
        height: 30px;
    }
    header {
        font-size: 18px;
        padding: 8px;
    }
}


