body {
    background-image: url('Imagen/KidFondo_img.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

:root{
    --menu-left: 20px;
    --menu-button-width: 180px;
    --line-gap: 12px;
    --line-width: 2px;
    --accent-border: #B0E0E6; /* azul claro realista */
    --line-solid: #0b4f8a;
}

.linea-horizontal {
    width: 100px;
    height: 2px;
    background-color: #89CFF0;
    margin: 20px auto;
}

.menu {
    position: fixed;
    top: 100px;
    left: var(--menu-left);
    right: auto;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.auth-top {
    position: fixed;
    top: 20px;
    left: calc(var(--menu-left) + var(--menu-button-width) + 44px);
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    z-index: 1200;
}

/* Horizontal line under the top auth buttons (matches the vertical line color) */
.auth-top::after {
    content: "";
    position: fixed;
    top: calc(20px + 48px + 8px); /* below the auth buttons */
    left: calc(var(--menu-left) + var(--menu-button-width) + var(--line-gap) + var(--line-width)); /* start after the vertical line */
    right: 0; /* extend to the right wall */
    height: var(--line-width);
    background: var(--line-solid);
    z-index: 900;
}

@media (max-width: 600px) {
    .auth-top::after { display: none; }
}

.auth-top .menu-button {
    height: 48px;
    font-size: 18px;
    width: 140px;
    padding: 6px 10px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.auth-button {
    background: rgba(255,255,255,0.95);
    border: 2px solid black;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Modal styles */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
}
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 320px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.modal-content h2 { margin: 0 0 6px 0; }
.modal-error { color: #b00020; font-weight: 700; text-align: center; margin-bottom: 6px; }
.modal-content input {
    height: 44px;
    padding: 8px 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}
.password-hint {
    font-size: 12px;
    color: rgba(0,0,0,0.65);
    margin-top: -4px;
    margin-bottom: 6px;
}
.modal-btn, .google-btn {
    height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}
.modal-btn { background: #112269; color: #fff; }
.google-btn { background: #fff; color: #111; border: 2px solid #ccc; }
.modal-or { text-align: center; color: #666; }
.modal-close { background: transparent; border: none; color: #666; cursor: pointer; }

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 8px;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    padding-right: 14px;
}

/* Vertical blue accent line beside the vertical menu buttons */
.menu-buttons::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: calc(var(--menu-left) + var(--menu-button-width) + var(--line-gap));
    width: var(--line-width);
    border-radius: 0;
    background: linear-gradient(180deg,#0b4f8a 0%, #06203a 100%), repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 4px);
    background-blend-mode: overlay;
    box-shadow: 0 4px 18px rgba(3,20,40,0.28), 0 0 0 1px var(--accent-border);
}

/* Right area from the blue line to the page edge */
.right-accent { display: none; }

/* Left fixed background area from left edge up to the blue line */
.left-accent {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(var(--menu-left) + var(--menu-button-width) + var(--line-gap) + var(--line-width));
    background: var(--line-solid);
    z-index: 800; /* behind the menu (menu z-index:1000) */
}

@media (max-width: 600px) {
    .menu-buttons::after { display: none; }
}

.menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.language-button {
    margin-bottom: 20px;
}
.language-button {
    position: fixed;
    top: 20px;
    right: 40px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid black;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    z-index: 1120;
}

.language-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #6b46c1; /* morado */
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(10, 33, 91, 0.2);
    z-index: 1130;
    min-width: 260px;
    max-width: 90%;
    /* mostrar hasta 'Roma' sin scroll; a partir de ahí aparece scrollbar */
    max-height: 340px;
    overflow-y: auto;
    color: #fff;
    scrollbar-color: #000 rgba(255,255,255,0.1);
    scrollbar-width: thin;
}

.language-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.95);
    text-align: center;
}

.lang-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    background: #ff8c00; /* naranja */
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    z-index: 1140;
    opacity: 0;
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    caret-color: transparent;
    outline: none;
    font-size: 24px;
    font-weight: 800;
    min-width: 180px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.hamburger-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 6px;
    border: 2px solid black;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
}
.hamburger-button .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #112269;
    border-radius: 2px;
}

.menu-buttons.mobile-open {
    display: flex !important;
    position: fixed;
    top: 70px;
    left: 20px;
    z-index: 1150;
}

@media (max-width: 600px) {
    .menu-buttons {
        display: none;
    }
    .left-accent { display: none; }
    .hamburger-button {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1200;
    }
    /* ensure language button stays at top-right */
    .language-button {
        top: 20px;
        right: 20px;
        left: auto;
    }
}


.language-button {
    width: 44px;
    height: 44px;
    padding: 0;
    margin-bottom: 12px;
    border: 2px solid black;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.language-logo {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    transition: opacity 0.2s;
    background: white;
}
.language-button.active,
.language-logo[style*="opacity: 1"] {
    /* disable blue active visual */
    box-shadow: none !important;
    border-color: black !important;
}
.language-menu {
    /* no extra margin needed when centered */
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.language-list {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.language-item {
    padding: 10px 12px;
    font-size: 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: #fff;
}
.language-item:hover {
    background: rgba(255,255,255,0.08);
}

/* Webkit scrollbar styling for the language menu */
.language-menu::-webkit-scrollbar {
    width: 10px;
}
.language-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}
.language-menu::-webkit-scrollbar-thumb {
    background: #000; /* thumb negro */
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.08);
}

/* Remove focus outline/caret and mobile tap highlight for buttons */
button:focus,
.language-item:focus,
.menu-button:focus,
.hamburger-button:focus,
.language-button:focus {
    outline: none;
    box-shadow: none;
}
button,
.language-item {
    -webkit-tap-highlight-color: transparent;
    caret-color: transparent;
    user-select: none;
}

/* extra rules to fully remove caret/focus visuals across browsers */
button::-moz-focus-inner {
    border: 0;
}
button:active,
button::-moz-focus-inner,
.language-item:active {
    outline: none !important;
    box-shadow: none !important;
}
.language-item,
.menu-button,
.hamburger-button,
.language-button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    caret-color: transparent;
}
.language-logo-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.language-logo {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    border: 2px solid black;
    transition: opacity 0.2s;
    background: white;
}
.language-select {
    width: 165px;
    height: 44px;
    font-size: 18px;
    font-family: inherit;
    border: 2px solid black;
    border-radius: 9px;
    background: rgba(255,255,255,0.8);
    color: #112269;
    outline: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}

.menu-button {
    width: 180px;
    height: 72px;
    background: rgba(10, 33, 91, 0.85); /* azul oscuro con transparencia */
    color: white;
    border: 2px solid var(--accent-border);
    border-radius: 12px;
    font-size: 24px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.09);
    transition: background 0.2s;
}
.menu-button:hover {
    background: rgba(10, 33, 120, 0.94);
}
