/* ==========================================================================
   냉장고 페이지 전용 스타일 (fridge.css)
   ========================================================================== */

body {
    background-color: #fff;
}

.main-container {
    margin-top: 30px;
    margin-bottom: 50px;
}

/* 냉장고 외부 감싸는 박스 */
.fridge-wrapper {
    background-color: #f8fafc; 
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.fridge-title-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.user-title {
    background-color: #fff;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

/* 재료추가 버튼 메인 초록색 테마 적용 */
.add-btn {
    background-color: #5a7e4d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 25px;
    transition: background 0.2s;
}

.add-btn:hover {
    background-color: #4a663f;
}

/* 냉장고 내부 판넬 */
.fridge-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 35px 20px;
    display: flex; 
    min-height: 500px;
    border: 1px solid #edf2f7;
}

.fridge-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.divider {
    width: 1px;
    background-color: #e2e8f0;
    margin: 0 25px;
}

.side-title {
    font-weight: 700;
    font-size: 16px;
    color: #334155;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 8px;
}

/* 타이틀 밑줄 포인트 컬라 변경 */
.freezer-side .side-title::after {
    content: ''; position: absolute; bottom: 0; left: 10%; width: 80%; height: 2px; background-color: #38bdf8;
}
.total-fridge-side .side-title::after {
    content: ''; position: absolute; bottom: 0; left: 10%; width: 80%; height: 2px; background-color: #4ade80;
}

.item-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    justify-content: flex-start;
}

/* 재료 카드 스타일 */
.ingredient-card {
    position: relative;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    width: 105px;
    height: 105px;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.ingredient-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
    border-color: #cbd5e0;
}

.ing-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    text-align: center;
}

.ing-qty {
    font-size: 11px !important;
    color: #64748b !important;
    background-color: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 호버 시 나타나는 유통기한 및 관리 영역 */
.expire-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.95); /* 부드러운 다크 그레이 */
    color: #fff;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: auto; /* 마우스 이벤트 정상 작동하도록 변경 */
}

.expire-hover span {
    color: #94a3b8;
    font-size: 10px;
    margin-bottom: 2px;
}

.expire-hover strong {
    color: #fcd34d; /* 주황빛 도는 노란색 강조 */
    font-size: 11px;
    margin-bottom: 8px;
}

.ingredient-card:hover .expire-hover {
    opacity: 1;
}

/* 수정/삭제 버튼 레이아웃 */
.card-actions {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.card-actions input[type="button"] {
    background: #475569;
    border: none;
    color: #fff;
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.card-actions input[type="button"]:hover {
    background: #8d7b71; /* 호버 시 챗봇 브라운 컬러로 변경 */
}

/* ==========================================================================
   레시피 추천 버튼 스타일 추가
   ========================================================================== */
.main-container > input[type="button"] {
    display: block;
    width: 200px;           /* 버튼 너비 */
    margin: 30px auto 0;    /* 냉장고 박스 밑에 중앙 정렬 */
    background-color: #5a7e4d; /* 재료 추가 버튼과 맞춘 메인 초록색 */
    color: #fff;
    border: none;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 30px;    /* 둥글둥글한 디자인 */
    box-shadow: 0 4px 12px rgba(90, 126, 77, 0.2); /* 은은한 그림자 */
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.main-container > input[type="button"]:hover {
    background-color: #4a663f; /* 호버 시 더 짙은 초록색 */
    transform: translateY(-2px); /* 호버 시 살짝 위로 뜨는 효과 */
    box-shadow: 0 6px 16px rgba(90, 126, 77, 0.3);
}

.main-container > input[type="button"]:active {
    transform: translateY(0); /* 클릭했을 때 눌리는 느낌 */
}