:root {
    --safe-space: clamp(20px, 2vw, 32px);
    --viewport-safe-width: calc(100vw - (var(--safe-space) * 2));
    --viewport-safe-height: calc(100vh - (var(--safe-space) * 2));
    --kiosk-stage-width: min(var(--viewport-safe-width), calc(var(--viewport-safe-height) * 0.5625));
    --kiosk-stage-height: min(var(--viewport-safe-height), calc(var(--viewport-safe-width) * 1.777777778));
}

.categoria-l1 {
    background-color: #004a99;
    color: white;
}

.categoria-l2 {
    background-color: #0056b3;
    color: rgb(0, 0, 0);
    margin-left: 20px;
}

.item-final {
    background-color: #daf8d7;
    color: #333;
    font-weight: normal;
    margin-left: 40px;
}

.item-final.activo {
    border-color: #007bff;
    border-width: 3px;
    font-weight: bold;
}

.submenu {
    display: none;
    transition: 0.3s all ease-in-out;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 30%),
        linear-gradient(180deg, #081225, #0f172a);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0;
    touch-action: manipulation;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.main-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.menu-container {
    flex: 0 0 38%;
    overflow-y: auto;
    background-color: #fff;
    padding: calc(var(--safe-space) + 60px) var(--safe-space) var(--safe-space);
    box-sizing: border-box;
    min-height: 0;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.imagen-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: transparent;
    padding: 0;
    box-sizing: border-box;
    min-height: 0;
}

#imagen-display {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: 0;
}

.categoria-l1,
.categoria-l2,
.item-final {
    padding: 16px 18px;
    margin: 6px 0;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #ddd;
    font-size: 1.35em;
    touch-action: manipulation;
}

.categoria-l1 {
    background-color: #004a99;
    color: white;
    font-weight: bold;
}

.categoria-l2 {
    background-color: #e9ecef;
    margin-left: 20px;
}

.item-final {
    background-color: #f8f9fa;
    margin-left: 40px;
}

.item-final.activo {
    border-color: #007bff;
    border-width: 2px;
    font-weight: bold;
}

.back-to-menu-btn {
    position: absolute;
    top: var(--safe-space);
    right: var(--safe-space);
    z-index: 100;
    min-height: 52px;
    padding: 12px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    touch-action: manipulation;
}

.back-to-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.categoria-l1.activo,
.categoria-l2.activo,
.item-final.activo {
    border-color: #007bff;
    border-width: 3px;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    background-color: #c9ffcc;
}

.logo-overlay {
    position: absolute;
    bottom: clamp(8px, 1.4vh, 16px);
    left: clamp(8px, 1.6vw, 16px);
    z-index: 10;
    pointer-events: none;
}

.logo-overlay img {
    width: clamp(90px, 9vw, 140px);
    height: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}
