/* === 기본 설정 === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #fffaf5, #ffe8e8);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.intro {
    text-align: center;
    background: #ff6b6b;
    color: white;
    padding: 2rem 1rem;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-title {
    font-size: 2rem;
    margin: 0;
}

/* === 카테고리 섹션 === */
.category-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 한 줄에 5개 고정 */
    gap: 0.75rem;
    padding: 2rem;
    max-width: 1000px;
    margin: auto;
}

.category {
    background: white;
    border-radius: 1rem;
    text-align: center;
    padding: 0.75rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.category img {
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.category:hover img {
    transform: scale(1.1);
}

.category p {
    margin-top: 0.5rem;
    font-weight: bold;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* === 버튼 컨테이너 및 버튼 === */
.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem;
}

button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: #e25555;
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* === 뽑기 결과 강조 (고정 크기) === */
.random-user-food-result p {
    min-width: 120px;
    text-align: center;
    background: #fff6f0;
    color: #d33;
    padding: 0.8rem 1.2rem;
    border-radius: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    transition: transform 0.3s ease;
    animation: popUp 0.4s ease;
}

/* === 하단 폼 === */
.food-bottom-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding: 2rem;
}

.food-bottom-box {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    width: 300px;
}

.food-form label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: bold;
}

.food-form input,
.food-form select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.3s;
}

.food-form input:focus,
.food-form select:focus {
    border-color: #ff6b6b;
    outline: none;
}

.food-form .button-container {
    justify-content: space-between;
    flex-wrap: wrap;
}

/* === 반응형 === */
@media (max-width: 1024px) {
    .category-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .category-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-title {
        font-size: 1.5rem;
    }

    .food-bottom-container {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .food-bottom-box {
        width: 100%;
        max-width: 90%;
    }
}

/* === 애니메이션 === */
@keyframes popUp {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
