@import url('https://fonts.googleapis.com/css2?family=Marcellus&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100dvh; overflow: hidden; overscroll-behavior-y: none; -webkit-user-select: none; user-select: none; }
body { display: flex; justify-content: center; background-color: #333; font-family: 'Marcellus', serif; }

.mobile-app {
    position: relative; width: 100%; height: 100dvh;
    background: linear-gradient(180deg, #F5F0E8);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: none;
}

/* --- ZASLON 1: DOBRODOŠLICA --- */
#splash-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center;
    padding-top: calc(80px + env(safe-area-inset-top)); z-index: 10;
    background: linear-gradient(180deg, #EAD7C3 0%, #D8B794 100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
#splash-screen.hidden { opacity: 0; transform: translateY(-20px); pointer-events: none; z-index: -1; visibility: hidden; }

.subtitle { color: #004B23; font-size: 1rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; opacity: 0.8; }

/* NOVO: Omotač za palmu i naslov na 1. zaslonu */
.splash-title-container { position: relative; display: inline-block; margin-bottom: 6vh; text-align: center; }
.splash-palm { position: absolute; left: -50px; top: -30px; width: 100px; z-index: 1; opacity: 0.95; filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.2)); }
.title { color: #004B23; font-size: 2.8rem; text-align: center; line-height: 1.1; letter-spacing: 2px; position: relative; z-index: 2; }

.vodice-text {
    font-size: 1.4rem;
    font-weight: normal;
}

.drinks-btn-wrapper { display: flex; flex-direction: column; align-items: center; cursor: pointer; margin-top: 3vh; z-index: 20; }
.circle-btn {
    width: 100px; height: 100px; background-color: #9B6B32; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 8px 16px rgba(155, 107, 50, 0.4); animation: pulse 2s infinite; transition: transform 0.15s ease;
}
.circle-btn:active { transform: scale(0.9); }
.circle-btn svg { width: 45px; height: 45px; fill: #F5F5DC; }
.btn-text { color: #004B23; font-size: 0.95rem; margin-top: 12px; letter-spacing: 1px; font-weight: bold; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(155, 107, 50, 0.7); } 70% { box-shadow: 0 0 0 25px rgba(155, 107, 50, 0); } 100% { box-shadow: 0 0 0 0 rgba(155, 107, 50, 0); } }

.waves-container { position: absolute; bottom: 0; left: 0; width: 100%; z-index: 15; padding-bottom: env(safe-area-inset-bottom); }
.waves { position: relative; width: 100%; height: 140px; margin-bottom: -10px; }
.parallax > use { animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite; }
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }
@keyframes move-forever { 0% { transform: translate3d(-90px, 0, 0); } 100% { transform: translate3d(85px, 0, 0); } }

/* DOLPHINS & ISLANDS */
.island { position: absolute; bottom: 80px; }
.island-palm { width: 40px; height: 50px; }
.dolphin { position: absolute; animation: dolphin-jump 3s infinite ease-in-out; }
.dolphin-left { bottom: 95px; left: 20%; animation-delay: 0s; }
.dolphin-right { bottom: 100px; right: 15%; animation-delay: 1.5s; }
@keyframes dolphin-jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* --- ZASLON 2: ODABIR KATEGORIJA --- */
#menu-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100dvh;
    background: #F5F0E8;
    display: flex; flex-direction: column;
    z-index: 5; opacity: 0; transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 30px;
}
#menu-screen.active { opacity: 1; transform: translateY(0); z-index: 20; }
#menu-screen.slide-left { transform: translateX(-100%); opacity: 0; pointer-events: none; }

.back-btn {
    background: none; border: none; color: #004B23; font-size: 0.9rem; cursor: pointer;
    display: flex; align-items: center; font-family: inherit;
    padding: calc(12px + env(safe-area-inset-top)) 15px 8px 15px; z-index: 30;
    min-height: 44px;
}
.back-btn svg { width: 18px; height: 18px; margin-right: 4px; fill: #004B23; }

/* NOVO: Dizajn za palmu i naslov na 2. zaslonu */
.alt-header { display: flex; justify-content: center; padding: 40px 0 20px 0; }
.alt-title-container { position: relative; display: inline-block; }
.alt-palm { display: none; }
.alt-title { font-size: 2.2rem; color: #004B23; z-index: 2; position: relative; letter-spacing: 3px; }

.alt-divider { height: 2px; background-color: #E8D4B8; margin: 8px 0; }

.category-row { display: flex; align-items: center; margin-bottom: 25px; padding: 0 30px; cursor: pointer; transition: transform 0.2s ease; }
.category-row:active { transform: scale(0.95); }

.category-img {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
}
.category-img img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}
.category-row:hover .category-img img {
    transform: scale(1.05);
}

.category-name { font-size: 1.4rem; color: #111; letter-spacing: 2px; flex-grow: 1; line-height: 1.2; font-weight: bold; }

/* CATEGORY ITEMS SCROLL */
.category-items-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 15px 30px 15px; flex-grow: 1; }
.category-items-scroll::-webkit-scrollbar { width: 4px; }
.category-items-scroll::-webkit-scrollbar-thumb { background-color: #999999; border-radius: 2px; }
.category-group { display: none; }
.category-group.active { display: block; animation: fadeIn 0.4s ease; }

/* --- ZASLON 3: DETALJI S CIJENAMA --- */
#details-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100dvh;
    background: #F5F0E8;
    z-index: 25; transform: translateX(100%);
    transition: transform 0.4s ease; display: flex; flex-direction: column;
}
#details-screen.active { transform: translateX(0); }

.details-header {
    display: flex; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 15px 12px 15px;
    background: #F5F0E8;
    border-bottom: 1px solid #D4C5A9;
    position: sticky; top: 0; z-index: 30;
    min-height: 44px;
}

/* NOVO: Omotač za centriranje male palme i naslova na 3. zaslonu */
.details-header-center { display: flex; justify-content: center; flex-grow: 1; margin-right: 0; }
.details-title-container { position: relative; display: inline-block; }
.details-palm { display: none; }
.details-title { color: #0A5F6F; font-size: 1.1rem; letter-spacing: 0.5px; text-transform: uppercase; font-weight: bold; position: relative; z-index: 2; padding-left: 0; }


/* CATEGORY TABS NAVIGATION */
.category-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 20px 12px 10px 12px; background: #F5F0E8; border-bottom: 1px solid #D4C5A9; }
.category-tab { padding: 7px 8px; background-color: #F5F0E8; color: #004B23; border: 2px solid #D4C5A9; border-radius: 12px; font-size: 0.7rem; font-weight: 600; white-space: normal; text-align: center; cursor: pointer; transition: all 0.2s ease; letter-spacing: 0; line-height: 1.2; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.category-tab:active { transform: scale(0.93); }
.category-tab.active { background-color: #004B23; color: #F5F5DC; border-color: #004B23; box-shadow: 0 2px 6px rgba(0, 75, 35, 0.3); }

/* SUBCATEGORY TABS */
.subcategory-tabs { display: flex; gap: 6px; padding: 10px 0 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom: 1px solid #D4C5A9; }
.subcategory-tabs::-webkit-scrollbar { height: 2px; }
.subcategory-tabs::-webkit-scrollbar-thumb { background-color: #999999; border-radius: 2px; }
.subcategory-tab { padding: 6px 11px; background-color: #F5F0E8; color: #004B23; border: 1px solid #D4C5A9; border-radius: 12px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all 0.2s ease; min-height: 34px; display: flex; align-items: center; }
.subcategory-tab:active { transform: scale(0.92); }
.subcategory-tab.active { background-color: #004B23; color: #F5F5DC; border-color: #004B23; }
.subcategory-content { display: none; }
.subcategory-content.active { display: block; animation: fadeIn 0.2s ease; }

.items-container { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 15px 15px 40px 15px; flex-grow: 1; }
.items-container::-webkit-scrollbar { width: 4px; }
.items-container::-webkit-scrollbar-thumb { background-color: #999999; border-radius: 2px; }

.drink-list { display: none; }
.drink-list.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.subcategory-title {
    font-size: 0.9rem; color: #004B23; margin: 20px 0 12px 0;
    border-bottom: 1px solid #D4C5A9; padding-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.subcategory-title:first-child { margin-top: 0; }

.menu-item { display: flex; justify-content: space-between; margin-bottom: 16px; background: transparent; padding: 12px 0; border-bottom: 1px dashed #D4C5A9; min-height: 44px; align-items: center; }
.item-details { flex-grow: 1; padding-right: 12px; }
.item-name { font-size: 0.95rem; color: #004B23; font-weight: bold; line-height: 1.3; }
.item-desc { font-size: 0.75rem; color: #004B23; margin-top: 3px; font-family: sans-serif; line-height: 1.2; }
.item-price { font-size: 1rem; color: #C89456; font-weight: bold; white-space: nowrap; margin-top: 0; padding-left: 8px; }

/* HOUSE COCKTAILS CARD GRID */
.cocktail-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.cocktail-card {
    background: linear-gradient(135deg, #0A5F6F 0%, #157487 50%, #1B8AA0 100%);
    border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(10, 95, 111, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; flex-direction: column; height: 100%; min-height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cocktail-card:active { transform: scale(0.93); }
.cocktail-card-image { width: 100%; height: 130px; background: linear-gradient(135deg, #B8D8E8 0%, #E8D4B8 100%); display: flex; align-items: center; justify-content: center; color: #999; font-size: 0.8rem; overflow: hidden; }
.cocktail-card-image img { width: 100%; height: 100%; object-fit: cover; }
.cocktail-card-content { padding: 12px; display: flex; flex-direction: column; flex-grow: 1; background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(232,244,248,0.9) 100%); }
.cocktail-card-name { font-size: 0.9rem; color: #004B23; font-weight: bold; margin-bottom: 6px; letter-spacing: 0.5px; }
.cocktail-card-ingredients { font-size: 0.7rem; color: #004B23; margin-bottom: 8px; line-height: 1.3; flex-grow: 1; }
.cocktail-card-price { font-size: 1.1rem; color: #C89456; font-weight: bold; border-top: 1px solid #D4C5A9; padding-top: 8px; }
