/* ================= RESET & BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #FFE4E8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Tránh tràn ngang */
    background-image:
        radial-gradient(circle at 15% 85%, #ffb3c1 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, #ff8fa3 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #fff0f3 0%, transparent 60%);
    background-attachment: fixed;
}

/* ================= FLOATING HEARTS ANIMATION ================= */
.hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hearts-bg::before,
.hearts-bg::after {
    content: "💕 💗 💖 💝 💓";
    position: absolute;
    top: 100%;
    font-size: 2rem;
    opacity: 0.15;
    white-space: nowrap;
    animation: floatHearts 12s linear infinite;
}

.hearts-bg::before { left: 10%; }
.hearts-bg::after  { left: 60%; animation-delay: 6s; }

@keyframes floatHearts {
    from { transform: translateY(0); opacity: 0.15; }
    to   { transform: translateY(-115vh); opacity: 0; }
}

/* ================= CONTAINER ================= */
.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 1100px;
}

/* ================= HEADINGS ================= */
h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #d63384;
    margin-bottom: 25px;
    text-shadow: 2px 2px 0 rgba(214, 51, 132, 0.15);
}

/* ================= BUTTONS (YES / NO) ================= */

.buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

#yes-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 16px 40px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(76,175,80,0.4);
    transition: 0.2s ease;
}

#yes-btn:hover {
    transform: scale(1.05);
}

#no-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 16px 40px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(231,76,60,0.4);
}

/* ================= COMMON GRID STYLE (ĐÃ FIX TO THẬT SỰ) ================= */

.food-grid, .after-grid, .options {
    display: grid;
    /* CHỈ ĐỂ 3 CỘT: Đây là chìa khóa để card có không gian to ra */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    margin-top: 30px;
    justify-items: center;
    width: 100%;
    /* Nới rộng container tổng để card có chỗ "phình" ra */
    max-width: 1200px !important; 
    margin: 0 auto;
}

.food-card, .option {
    background: white;
    border-radius: 20px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 22px rgba(255,105,180,0.2);
    
    /* Tăng kích thước này lên để nó chiếm không gian */
    width: 100%;
    max-width: 300px; /* Số cũ là 180px, 300px là gần gấp đôi rồi đó ba */
}

.food-card img, .option img {
    width: 100%;
    /* Khống chế chiều cao ảnh theo màn hình để không phải scroll quá dài */
    max-height: 28vh; 
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.food-card p, .option p {
    margin-top: 15px;
    font-weight: 900;
    font-size: 1.3rem; /* Chữ cũng phải to cho tương xứng */
    color: #d63384;
    text-align: center;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
    .food-grid, .after-grid, .options {
        grid-template-columns: repeat(2, 1fr); /* Tablet hiện 2 cái to đùng */
    }
}

@media (max-width: 500px) {
    .food-grid, .after-grid, .options {
        grid-template-columns: repeat(2, 1fr); /* Mobile giữ 2 cột nhưng thu nhỏ xíu cho vừa máy */
        gap: 12px;
    }
    .food-card, .option {
        max-width: 160px; 
    }
    h1 { font-size: 1.6rem; }
}
/* ================= CONTINUE BUTTON ================= */
.continue-btn {
    margin-top: 35px;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 800;
    border: none;
    border-radius: 50px; /* Bo tròn kiểu viên thuốc */
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.4);
}

.continue-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 20, 147, 0.5);
}

/* ================= MESSAGES & TEXT ================= */
.yes-message, #dinner-message, #after-message {
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #ff1493;
    transition: opacity 0.4s ease;
}

/* ================= MUSIC BUTTON ================= */
#music-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    font-size: 1.4rem;
    background: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: 0.3s;
}

#music-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 850px) {
    .food-grid, .after-grid, .options {
        grid-template-columns: repeat(3, 1fr); /* Màn hình vừa hiện 3 cột */
        gap: 15px;
    }
    h1 { font-size: 1.8rem; }
}

@media (max-width: 550px) {
    .food-grid, .after-grid, .options {
        grid-template-columns: repeat(2, 1fr); /* Mobile hiện 2 cột để không phải cuộn nhiều */
        gap: 12px;
    }
    .btn { padding: 12px 25px; font-size: 1.1rem; }
    .container { padding-top: 40px; }
}

/* Trạng thái ẩn cho các phần chưa kích hoạt */
.hidden {
    display: none !important;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
/* ===== FINAL 4 FLOATING PHOTOS ===== */

.floating-photos {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.float-img {
    position: absolute;
    bottom: -200px;
    opacity: 0;
}

.float-img img {
    width: 170px;
    height: 220px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

/* Cân bằng quanh dòng chữ */
.img1 { left: 8%; }
.img2 { left: 28%; }
.img3 { right: 28%; }
.img4 { right: 8%; }

/* Animation */
@keyframes finalFloatUp {
    0% {
        bottom: -200px;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    65% {
        bottom: 45%;
        opacity: 1;
    }
    100% {
        bottom: 60%;
        opacity: 0;
    }
}

.floating-photos.show .float-img {
    animation: finalFloatUp 8s ease-in-out forwards;
}
