@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
    --primary: #2fa5ad;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --black: #000000;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border: #dee2e6;
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
    --glow-color: rgba(245, 158, 11, 0.6);
    --shadow-color: rgba(0, 0, 0, 0.25);
    --button-size: 64px;
    --accent: #ffc107;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --modal-bg: rgba(255, 255, 255, 0.95);
}
/* Main Container */
.app-container {
    width: 100%;
    max-width: 480px; /* Mobile width simulation */
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 20px;
}
.menu-section {
    padding: 5px 5px 0px 0px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 10px;
}

/* Menu Item Styling */
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-3px);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* Specific Colors for Icons */
.bg-blue { background-color: #1e88e5; color: white; }
.bg-red { background-color: #e53935; color: white; }
.bg-green { background-color: #43a047; color: white; }
.bg-orange { background-color: #fb8c00; color: white; }
.bg-purple { background-color: #8e24aa; color: white; }
.bg-teal { background-color: #00897b; color: white; }
.bg-indigo { background-color: #3949ab; color: white; }
.bg-pink { background-color: #d81b60; color: white; }

.icon-wrapper i {
    font-size: 22px;
}

.menu-label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: #333;
}

/* Promo Banner Section (Optional Visual) */
.promo-section {
    padding: 0 16px 24px 16px;
}

.promo-card {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-icon {
    background: #ffca28;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.promo-text h4 {
    font-size: 14px;
    color: #5d4037;
    margin-bottom: 4px;
}

.promo-text p {
    font-size: 11px;
    color: #8d6e63;
}


/* Floating Button Container */
.floating-container {
    position: fixed;
    z-index: 1000;
    touch-action: none;
    user-select: none;
}

.floating-btn {
    width: var(--button-size);
    height: var(--button-size);
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    position: relative;
    box-shadow:
            0 8px 30px var(--glow-color),
            0 4px 15px var(--shadow-color),
            inset 0 2px 10px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
    animation: float-bounce 2s ease-in-out infinite;
}

.floating-btn:active {
    cursor: grabbing;
    transform: scale(0.9);
    animation: none;
}

.floating-btn.dragging {
    animation: none;
    transform: scale(1.05);
    box-shadow:
            0 15px 50px var(--glow-color),
            0 8px 25px var(--shadow-color);
}

.floating-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: icon-pulse 1.5s ease-in-out infinite;
}

/* Ripple Effect Ring */
.ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(245, 158, 11, 0.5);
    animation: ripple-expand 2s ease-out infinite;
    pointer-events: none;
}

.ripple-ring:nth-child(2) {
    animation-delay: 0.5s;
}

.ripple-ring:nth-child(3) {
    animation-delay: 1s;
}


/* Animations */
@keyframes float-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes ripple-expand {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
        border-width: 2px;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
        border-width: 0px;
    }
}

@keyframes badge-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes sparkle-fade {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-30px);
    }
}

@keyframes ripple-click {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.6;
    }
    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

/* Drag Boundary Visual */
.drag-boundary {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drag-boundary.visible {
    opacity: 1;
}


/* --- CSS 3D Gift Box --- */
.gift-box {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.box-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(238, 77, 45, 0.4);
    z-index: 2;
}

.box-base::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 100%;
    background: var(--accent);
    left: 50%;
    transform: translateX(-50%);
}

.box-base::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 20px;
    background: var(--accent);
    top: 50%;
    transform: translateY(-50%);
}

.box-lid {
    position: absolute;
    width: 110px;
    height: 110px;
    background: #ff6b4a;
    top: -10px;
    left: -5px;
    border-radius: 12px;
    z-index: 3;
    transform-origin: top left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.box-lid::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 100%;
    background: var(--accent);
    left: 50%;
    transform: translateX(-50%);
}

.box-lid::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 20px;
    background: var(--accent);
    top: 50%;
    transform: translateY(-50%);
}

/* Bow Tie */
.bow {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    z-index: 4;
}

.bow::before, .bow::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid var(--accent);
    border-radius: 50% 50% 0 50%;
    transform: rotate(45deg);
    top: 0;
}

.bow::before { left: 0; border-right: none; border-bottom: none; }
.bow::after { right: 0; border-left: none; border-top: none; }

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.gift-trigger-container.shaking .gift-box {
    animation: shake 0.5s ease-in-out infinite;
}

/* Open State */
.gift-trigger-container.opened .box-lid {
    transform: rotate(-110deg) translate(-20px, -20px);
    opacity: 0;
}

.gift-trigger-container.opened .box-base {
    transform: scale(0.8);
    opacity: 0;
    transition: 0.3s;
}

.gift-trigger-container.opened .bow {
    opacity: 0;
    transition: 0.3s;
}

/* --- Prize Modal --- */
.prize-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Bottom sheet style on mobile */
    z-index: 10000000000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.prize-modal.active {
    opacity: 1;
    pointer-events: all;
}

.prize-card {
    background: var(--modal-bg);
    width: 100%;
    max-width: 400px;
    border-radius: 24px 24px 0 0;
    padding: 30px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

@media (min-width: 480px) {
    .prize-modal {
        align-items: center;
    }
    .prize-card {
        border-radius: 24px;
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    .prize-modal.active .prize-card {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.prize-modal.active .prize-card {
    transform: translateY(0);
}

/* Decorative Background in Card */
.card-bg-shape {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(238, 77, 45, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.card-bg-shape.two {
    top: auto;
    bottom: -30px;
    left: auto;
    right: -30px;
    background: rgba(255, 193, 7, 0.1);
}

.prize-content {
    position: relative;
    z-index: 1;
}

.prize-icon {
    font-size: 60px;
    margin-bottom: 15px;
    display: inline-block;
    animation: popIn 0.5s 0.3s backwards;
}

.prize-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    animation: slideUp 0.5s 0.4s backwards;
}

.prize-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    animation: slideUp 0.5s 0.5s backwards;
}

.btn-claim {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.3);
    transition: transform 0.2s, background 0.2s;
    animation: slideUp 0.5s 0.6s backwards;
}

.btn-claim:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-claim:active {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

/* Keyframes for Modal Content */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 350px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
