/* -- Asas & Latar -- */
* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; color: white; margin: 0; padding: 0; background-image: url('assets/images/restaurant_cartoon.jpg'); background-size: cover; background-position: center center; background-attachment: fixed; background-color: rgba(0, 0, 0, 0.75); background-blend-mode: darken; overflow-x: hidden; }

/* -- Header -- */
.header { background-color: rgba(0, 0, 0, 0.9); padding: 15px 20px; text-align: center; position: sticky; top: 0; z-index: 100; border-bottom: 3px solid #ffd700; box-shadow: 0 4px 15px rgba(0,0,0,0.6); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; }
#back-to-category-btn { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-family: 'Press Start 2P', cursive; font-size: 0.7em; background: linear-gradient(145deg, #1a1a3a, #0d0d1f); color: #fff; border: 2px solid #66b3ff; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; display: none; }
#back-to-category-btn:hover { background: linear-gradient(145deg, #33aaff, #1e88e5); border-color: #ffd700; transform: translateY(-50%) scale(1.05); }
#back-to-category-btn.show { display: block; }
.header h1, .header h2 { font-family: 'Press Start 2P', cursive; margin: 5px 0; font-size: clamp(1em, 2.5vw, 1.2em); color: #ffd700; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.header h2 { color: #00ff00; font-size: clamp(0.8em, 2vw, 1em); }
.header-title-wrapper { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 80px; }

/* -- Kontena Menu Utama -- */
.skill-tree-container { padding: 40px 20px; max-width: 1200px; margin: 0 auto; background-color: transparent; display: none; opacity: 0; transition: opacity 0.5s ease-in-out; }
.skill-tree-container.show { display: block; opacity: 1; }

/* -- Bahagian Pilih Kategori -- */
#category-selection { display: none; justify-content: center; align-items: center; gap: 30px; padding: 60px 20px; flex-wrap: wrap; }
.category-button { font-family: 'Press Start 2P', cursive; font-size: clamp(1em, 3vw, 1.3em); background: linear-gradient(145deg, #004098, #001a50); color: #ffd700; border: 4px solid #fff; padding: 25px 40px; border-radius: 15px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.2); min-width: 200px; text-align: center; }
.category-button:hover { background: linear-gradient(145deg, #33aaff, #1e88e5); border-color: #ffd700; transform: translateY(-5px); box-shadow: 0 12px 35px rgba(51, 170, 255, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.3); color: #fff; }

/* -- Bahagian Paparan Menu Kategori -- */
.category-title { font-family: 'Press Start 2P', cursive; color: #ffd700; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); border-bottom: 2px solid #ffd700; padding-bottom: 10px; margin-top: 40px; margin-bottom: 20px; display: none; }
.menu-category-grid { display: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* -- Style Node (Kotak Menu Item) -- */
.node { 
    background: linear-gradient(145deg, #004098 0%, #001a50 100%); 
    border: 4px solid #fff; 
    border-radius: 12px; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    position: relative; 
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.4); 
}
.node:hover { 
    transform: translateY(-3px); 
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 12px 35px rgba(0, 0, 0, 0.5); 
}

/* Gambar Menu Item */
.menu-item-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    margin-bottom: 15px;
    display: block;
}

/* Ikon Alternatif (bila tiada gambar) */
.skill-icon { 
    width: 100%;
    height: 140px;
    margin-bottom: 15px;
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Teks dalam Node */
.node h3 { 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.85em; 
    color: #fff; 
    margin: 0 0 12px 0; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); 
    line-height: 1.3;
}
.node p { 
    font-family: Arial, sans-serif; 
    color: #e0e0e0; 
    margin: 8px 0; 
    font-size: 0.9em; 
    line-height: 1.4; 
}
.node .node-xp { 
    color: #00ff88; 
    font-weight: bold; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); 
}
.node.boss { 
    border-color: #ff00ff; 
    animation: boss-pulse 1s infinite; 
}
@keyframes boss-pulse { 
    0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 255, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.3); } 
    50% { box-shadow: 0 0 40px rgba(255, 0, 255, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.4); } 
}

/* Container Butang (Order + Info) */
.node .node-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Push ke bawah */
    width: 100%;
}

/* Stail Umum Butang */
.node .node-buttons button {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.7em;
    font-family: 'Press Start 2P', cursive;
    border: 2px solid #66b3ff;
    cursor: pointer;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Butang ORDER */
.order-btn {
    background: linear-gradient(145deg, #1a1a3a, #0d0d1f);
    color: #fff;
}
.order-btn:hover {
    background: linear-gradient(145deg, #33aaff, #1e88e5);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(51, 170, 255, 0.4);
}

/* Butang INFO */
.info-btn {
    background-color: transparent;
    color: #66b3ff;
    border-color: rgba(102, 179, 255, 0.5);
}
.info-btn:hover {
    background-color: rgba(102, 179, 255, 0.2);
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-2px);
}

/* -- Notification -- */
.notification { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.95), rgba(255, 193, 7, 0.9)); 
    color: #111; 
    padding: 15px 25px; 
    border-radius: 10px; 
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3); 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.8em; 
    z-index: 1000; 
    animation: slideInUp 0.5s ease, fadeOut 3s 2.5s forwards; 
    border: 2px solid rgba(255,255,255,0.3); 
}
@keyframes slideInUp { 
    from { opacity: 0; transform: translateX(-50%) translateY(100px); } 
    to { opacity: 1; transform: translateX(-50%) translateY(0); } 
}
@keyframes fadeOut { 
    from { opacity: 1; } 
    to { opacity: 0; visibility: hidden; } 
}

/* -- Modal (Umum) -- */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.95); 
    z-index: 1000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    visibility: hidden; 
    opacity: 0; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    backdrop-filter: blur(5px); 
}
.modal-overlay.show { 
    visibility: visible; 
    opacity: 1; 
}

/* Modal Content (Base) */
.modal-content { 
    background: linear-gradient(145deg, #004098 0%, #001a50 100%); 
    border: 4px solid #fff; 
    border-radius: 12px; 
    padding: 30px; 
    width: 90%; 
    max-width: 500px; 
    max-height: 90vh; 
    overflow-y: auto; 
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 40px rgba(0, 0, 0, 0.8); 
    font-family: 'Press Start 2P', cursive; 
    color: white; 
    transform: scale(0.8); 
    transition: transform 0.3s ease; 
    position: relative; 
}
.modal-overlay.show .modal-content { 
    transform: scale(1); 
}

/* Modal Title */
.modal-title { 
    font-size: 1.1em; 
    text-align: center; 
    color: #ffd700; 
    margin: 0 0 20px 0; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); 
}

/* -- Modal Info (Spesifik) -- */
.info-modal-content {
    text-align: center;
    max-width: 400px;
    padding-bottom: 20px; /* Extra space untuk NPC */
}

/* Pastikan h2 "Info Item" dalam modal ada spacing */
.info-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* Butang Tutup (X) */
#info-close-btn { 
    position: absolute;
    top: 15px;
    right: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    background: linear-gradient(145deg, #ff4757, #ff3838);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
#info-close-btn:hover {
    background: linear-gradient(145deg, #ff6b7a, #ff5252);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255,71,87,0.4);
}

/* Gambar/Ikon dalam Modal Info */
#info-modal-image {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px 0;
    min-height: 150px; /* Reserve space */
}

#info-modal-image .menu-item-image,
#info-modal-image .skill-icon {
    width: 150px; 
    height: 150px;
    border-radius: 10px;
    border: 3px solid #ffd700;
    object-fit: cover;
    background: rgba(0,0,0,0.3);
}

#info-modal-image .skill-icon {
    font-size: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
}

/* Tajuk Item dalam Modal */
#info-modal-title {
    color: #ffd700;
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-family: 'Press Start 2P', cursive;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    line-height: 1.4;
}

/* Deskripsi Item dalam Modal */
#info-modal-description {
    margin-bottom: 20px;
    min-height: 40px; 
    font-size: 1em;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    color: #e0e0e0;
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

/* NPC dalam Modal - PENTING: Pastikan visible! */
#info-modal-npc {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed rgba(255, 215, 0, 0.5);
    text-align: center;
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visible */
    opacity: 1 !important; /* Force opacity */
    min-height: 100px; /* Reserve space */
}

#info-modal-npc .npc-sprite {
    width: 120px;
    height: auto;
    max-width: 100%;
    transform: scaleX(-1); /* Flip horizontal */
    image-rendering: pixelated; 
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    display: inline-block !important; /* Force display */
    margin: 0 auto;
    vertical-align: middle;
}

/* -- Dialogue System (Welcome) -- */
.dialogue-overlay { 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    right: 20px; 
    z-index: 1001; 
    visibility: hidden; 
    opacity: 0; 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}
.dialogue-overlay.show { 
    visibility: visible; 
    opacity: 1; 
}
.dialogue-name { 
    background: linear-gradient(145deg, #004098 0%, #001a50 100%); 
    border: 3px solid #fff; 
    border-bottom: none; 
    border-radius: 12px 12px 0 0; 
    padding: 12px 18px; 
    display: inline-block; 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.85em; 
    color: #ffd700; 
    margin-left: 280px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); 
}
.dialogue-content { 
    background: linear-gradient(145deg, #004098 0%, #001a50 100%); 
    border: 4px solid #fff; 
    border-radius: 12px; 
    border-top-left-radius: 0; 
    padding: 25px; 
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.5); 
    color: #f0f0f0; 
    font-family: 'Georgia', serif; 
    font-size: clamp(1.1em, 3vw, 1.3em); 
    line-height: 1.6; 
    margin-left: 280px; 
    position: relative; 
    min-height: 80px; 
}
#dialogue-text { 
    margin: 0 0 20px 0; 
    min-height: 60px; 
    position: relative; 
}
.typewriter { 
    overflow: hidden; 
    border-right: 2px solid #ffd700; 
    white-space: nowrap; 
    animation: blink-caret 1s infinite; 
}
@keyframes blink-caret { 
    0%, 50% { border-color: transparent; } 
    51%, 100% { border-color: #ffd700; } 
}
#dialogue-next { 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.8em; 
    background: linear-gradient(145deg, #1a1a3a, #0d0d1f); 
    color: #fff; 
    border: 2px solid #66b3ff; 
    padding: 12px 20px; 
    border-radius: 8px; 
    cursor: pointer; 
    display: block; 
    margin-left: auto; 
    transition: all 0.3s ease; 
    text-transform: uppercase; 
}
#dialogue-next:hover { 
    background: linear-gradient(145deg, #33aaff, #1e88e5); 
    border-color: #ffd700; 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(51, 170, 255, 0.4); 
}
#welcome-npc { 
    position: absolute; 
    bottom: 0; 
    left: 20px; 
    width: 280px; 
    height: auto; 
    z-index: 1002; 
    transform: translateX(-150%); 
    opacity: 0; 
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
    transition-delay: 0.2s; 
}
.dialogue-overlay.show #welcome-npc { 
    transform: translateX(0); 
    opacity: 1; 
}

/* -- Cart System -- */
.cart-fab { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    width: 65px; 
    height: 65px; 
    background: linear-gradient(145deg, #ffd700, #ffed4e); 
    border: 4px solid #fff; 
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 998; 
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.3); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}
.cart-fab:hover { 
    transform: scale(1.1) rotate(5deg); 
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6), inset 0 2px 4px rgba(255,255,255,0.4); 
}
.cart-icon { 
    font-size: 26px; 
    color: #333; 
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5); 
}
.cart-counter { 
    position: absolute; 
    top: -8px; 
    right: -8px; 
    background: linear-gradient(145deg, #ff4757, #ff3838); 
    color: white; 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.7em; 
    padding: 6px 8px; 
    border-radius: 50%; 
    border: 3px solid white; 
    min-width: 24px; 
    height: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 12px rgba(255,71,87,0.5); 
}

/* Cart Items List */
#cart-items-list { 
    min-height: 200px; 
    max-height: 300px; 
    overflow-y: auto; 
    background: rgba(0,0,0,0.3); 
    border-radius: 10px; 
    padding: 15px; 
    margin-bottom: 20px; 
    border: 2px solid rgba(255,255,255,0.1); 
}
#cart-items-list p { 
    font-family: Arial, sans-serif; 
    color: #aaa; 
    text-align: center; 
    margin: 40px 0 20px; 
    font-size: 1.1em; 
}

/* Cart Item */
.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-family: Arial, sans-serif; 
    font-size: 1.1em; 
    padding: 15px; 
    border-bottom: 1px dashed rgba(255,255,255,0.1); 
    background: rgba(255,255,255,0.05); 
    border-radius: 8px; 
    margin-bottom: 10px; 
    transition: all 0.3s ease; 
}
.cart-item:hover { 
    background: rgba(255,255,255,0.1); 
    transform: translateX(5px); 
}
.cart-item:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
}
.cart-item-name { 
    color: #fff; 
    font-weight: 500; 
    flex-grow: 1; 
    margin-right: 10px; 
}
.cart-item-price { 
    color: #00ff88; 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.9em; 
    font-weight: bold; 
    margin-right: 15px; 
}
.remove-item-btn { 
    background: none; 
    border: none; 
    color: #ff4757; 
    font-size: 1.2em; 
    cursor: pointer; 
    padding: 0 5px; 
    transition: transform 0.2s ease; 
    line-height: 1; 
}
.remove-item-btn:hover { 
    transform: scale(1.2); 
    color: #ff6b7a; 
}

/* Cart Buttons */
.cart-close-btn { 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.7em; 
    background: linear-gradient(145deg, #ff4757, #ff3838); 
    color: #fff; 
    border: 2px solid #fff; 
    padding: 8px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.cart-close-btn:hover { 
    background: linear-gradient(145deg, #ff6b7a, #ff5252); 
    transform: scale(1.1); 
    box-shadow: 0 4px 12px rgba(255,71,87,0.4); 
}
.cart-confirm-btn { 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.8em; 
    background: linear-gradient(145deg, #27ae60, #2ecc71); 
    color: #fff; 
    border: 2px solid #fff; 
    padding: 12px 25px; 
    border-radius: 8px; 
    cursor: pointer; 
    float: right; 
    transition: all 0.3s ease; 
    text-transform: uppercase; 
    font-weight: bold; 
}
.cart-confirm-btn:hover { 
    background: linear-gradient(145deg, #2ecc71, #27ae60); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(46,204,113,0.4); 
}

/* -- Karakter NPC Statik & Dialog -- */
#static-npc-area { 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    width: 300px; 
    z-index: 99; 
    opacity: 0; 
    transform: translateX(-100%); 
    transition: all 0.5s ease-out; 
}
.skill-tree-container.show ~ #static-npc-area:not(.hidden-by-logic) { 
    opacity: 1; 
    transform: translateX(0); 
    transition-delay: 0.3s; 
}
.skill-tree-container.show ~ #static-npc-area.hide:not(.hidden-by-logic) { 
    opacity: 0; 
    transform: translateX(-100%); 
    transition-delay: 0s !important; 
}
#static-npc-area #menu-npc { 
    width: 240px; 
    height: auto; 
    display: block; 
    margin-top: -10px; 
}
.static-dialogue-box { 
    background: linear-gradient(145deg, #004098 0%, #001a50 100%); 
    border: 3px solid #fff; 
    border-radius: 12px; 
    padding: 15px 20px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); 
    color: #f0f0f0; 
    font-family: 'Georgia', serif; 
    font-size: 1.1em; 
    line-height: 1.5; 
    position: relative; 
    z-index: 100; 
}
.static-dialogue-box p { 
    margin: 0; 
}
.hidden-by-logic { 
    opacity: 0 !important; 
    transform: translateX(-100%) !important; 
    transition: none !important; 
}

/* -- Media Query (Tablet) -- */
@media (max-width: 768px) {
    .header { 
        padding: 12px 15px;
        grid-template-columns: auto 1fr auto; /* Adjust columns for smaller screens */
        gap: 10px;
        min-height: 65px;
    }
    #back-to-category-btn { 
        padding: 7px 10px; 
        font-size: 0.6em;
    }
    .header-title-wrapper { 
        padding: 0 10px; /* Small horizontal padding */
    }
    .header h1 {
        font-size: clamp(0.85em, 2.5vw, 1em);
    }
    .header h2 {
        font-size: clamp(0.7em, 2vw, 0.85em);
    }
    .skill-tree-container { 
        padding: 20px 15px; /* Reduced top padding */
        padding-top: 30px; /* Extra space below sticky header */
    }

    /* Kategori Selection */
    #category-selection { 
        flex-direction: column; 
        gap: 20px; 
        padding: 40px 20px;
        min-height: 50vh; /* Ensure enough space */
    }
    .category-button { 
        width: 100%; 
        max-width: 300px; 
        padding: 20px;
        min-height: 60px; /* Bigger touch target */
        touch-action: manipulation; /* Better touch handling */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3); /* Visual feedback */
    }

    /* Menu Grid & Node */
    .menu-category-grid { 
        grid-template-columns: 1fr; 
    }
    .node { 
        min-width: 100%; 
        padding: 18px; 
    }
    
    /* Gambar & Ikon lebih kecil */
    .menu-item-image, 
    .skill-icon { 
        height: 120px; 
    }
    .skill-icon { 
        font-size: 40px; 
    }
    
    /* Butang Node */
    .node .node-buttons {
        gap: 8px;
    }
    .node .node-buttons button { 
        font-size: 0.65em; 
        padding: 10px 5px; 
        letter-spacing: 0;
    }

    /* Dialogue */
    .dialogue-overlay { 
        left: 15px; 
        right: 15px; 
        bottom: 15px; 
    }
    #welcome-npc { 
        width: 140px; 
        left: 5px; 
    }
    .dialogue-name, 
    .dialogue-content { 
        margin-left: 140px; 
    }
    .dialogue-content { 
        font-size: 1.1em; 
        padding: 20px; 
    }

    /* Cart */
    .cart-fab { 
        width: 55px; 
        height: 55px; 
        bottom: 20px; 
        right: 20px; 
    }
    .cart-icon { 
        font-size: 22px; 
    }

    /* Static NPC */
    #static-npc-area { 
        width: 160px; 
        bottom: 15px; 
        left: 15px; 
    }
    #static-npc-area #menu-npc { 
        width: 140px; 
        margin-top: -5px; 
    }
    .static-dialogue-box { 
        font-size: 0.8em; 
        padding: 8px 12px; 
        border-radius: 8px; 
    }
    .remove-item-btn { 
        font-size: 1em; 
    }

    /* Modal Info */
    .info-modal-content { 
        padding: 25px 25px 30px 25px; /* Extra bottom padding */
    }
    #info-close-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
        top: 10px;
        right: 10px;
    }
    #info-modal-image {
        min-height: 120px;
    }
    #info-modal-image .menu-item-image,
    #info-modal-image .skill-icon {
        width: 120px;
        height: 120px;
    }
    #info-modal-image .skill-icon {
        font-size: 55px;
    }
    #info-modal-title {
        font-size: 1.1em;
    }
    #info-modal-description {
        font-size: 0.9em;
        padding: 12px;
        max-height: 150px;
    }
    #info-modal-npc {
        margin-top: 15px;
        padding-top: 15px;
        min-height: 80px; /* Reserve space untuk mobile */
    }
    #info-modal-npc .npc-sprite {
        width: 100px;
    }
}

/* -- Media Query (Mobile) -- */
@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
        min-height: 60px;
        grid-template-columns: auto 1fr auto; /* Maintain 3-column grid */
        gap: 8px;
    }
    #back-to-category-btn { 
        padding: 6px 8px;
        font-size: 0.55em;
    }
    .header-title-wrapper {
        padding: 0 5px;
    }
    .header-title-wrapper h1 { 
        font-size: clamp(0.75em, 3vw, 0.9em);
        margin: 3px 0;
    }
    .header-title-wrapper h2 { 
        font-size: clamp(0.65em, 2.5vw, 0.75em);
        margin: 3px 0;
    }
    
    /* Category Buttons - Bigger touch targets */
    #category-selection {
        padding: 30px 15px;
        gap: 25px; /* More space between buttons */
    }
    .category-button { 
        font-size: 0.95em; 
        padding: 22px 30px; /* Bigger for easier tapping */
        min-height: 65px; /* Larger touch target */
        max-width: 100%; /* Full width on small screens */
    }

    /* Node */
    .node {
        padding: 15px;
    }
    .menu-item-image,
    .skill-icon {
        height: 100px;
    }
    .skill-icon {
        font-size: 35px;
    }
    .node h3 {
        font-size: 0.75em;
    }
    .node p {
        font-size: 0.85em;
    }
    .node .node-buttons button {
        font-size: 0.6em;
        padding: 8px 4px;
    }

    /* Dialogue */
    #welcome-npc { 
        width: 120px; 
    }
    .dialogue-name, 
    .dialogue-content { 
        margin-left: 120px; 
    }
    .dialogue-name { 
        padding: 10px 12px; 
        font-size: 0.75em; 
    }
    .dialogue-content {
        padding: 18px;
        font-size: 1em;
    }

    /* Static NPC */
    #static-npc-area { 
        width: 130px; 
    }
    #static-npc-area #menu-npc { 
        width: 110px; 
    }
    .static-dialogue-box { 
        font-size: 0.75em; 
        padding: 6px 10px; 
    }

    /* Cart */
    .cart-fab {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    .cart-icon {
        font-size: 20px;
    }
    .cart-counter {
        font-size: 0.6em;
        min-width: 20px;
        height: 20px;
    }

    /* Modal Info */
    .modal-content {
        padding: 20px 20px 25px 20px; /* Extra bottom padding */
    }
    .info-modal-content {
        padding: 20px 20px 25px 20px;
    }
    #info-close-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85em;
        top: 8px;
        right: 8px;
    }
    #info-modal-image {
        min-height: 100px;
    }
    #info-modal-image .menu-item-image,
    #info-modal-image .skill-icon {
        width: 100px;
        height: 100px;
    }
    #info-modal-image .skill-icon {
        font-size: 45px;
    }
    #info-modal-title {
        font-size: 1em;
        margin-bottom: 12px;
    }
    #info-modal-description {
        font-size: 0.85em;
        padding: 10px;
        max-height: 120px;
    }
    #info-modal-npc {
        margin-top: 12px;
        padding-top: 12px;
        min-height: 70px; /* Reserve space */
    }
    #info-modal-npc .npc-sprite {
        width: 80px;
    }
}