/* All rules scoped to .menu-page wrapper added in player_menu.rs and admin_menu.rs.
   Plain element selectors (input[type="range"]) are also scoped — they would otherwise
   leak to every page that has a range input. @keyframes growLine stays global. */

.menu-page .container {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    position: relative;
}

.menu-page .menu-panel {
    background: #EAEAEA;
    border-radius: 16px;
    padding: 32px 28px;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    transition: all 0.35s ease;
}

.menu-page .menu-panel.centered {
    margin: 0 auto;
}

.menu-page .menu-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 28px;
    text-align: center;
}

.menu-page .menu-btn {
    width: 180px;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #fff;
    background: #4d49fc;
    margin-bottom: 10px;
    position: relative;
}

.menu-page .menu-btn:hover {
    background: #28209c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 73, 252, 0.35);
}

.menu-page .menu-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.menu-page .menu-btn.active {
    background: #28209c;
    box-shadow: 0 0 0 3px rgba(40, 32, 156, 0.25);
}

.menu-page .menu-btn .connector-area {
    display: flex;
    position: absolute;
    top: 50%;
    left: calc(100% + 18px);
    transform: translateY(-50%);
    width: var(--conn-width, 40px);
    z-index: 5;
    pointer-events: none;
    animation: growLine 0.25s ease-out forwards;
}

.menu-page .menu-btn .connector-area.no-anim {
    animation: none;
    width: var(--conn-width, 40px);
}

@keyframes growLine {
    from {
        width: 0px;
        opacity: 0;
    }

    to {
        width: var(--conn-width, 40px);
        opacity: 1;
    }
}

.menu-page .connector-line {
    width: 100%;
    height: 2px;
    background: #28209c;
    border-radius: 2px;
    position: relative;
}

.menu-page .connector-line::before,
.menu-page .connector-line::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #28209c;
    border-radius: 50%;
}

.menu-page .connector-line::before {
    left: -3px;
}

.menu-page .connector-line::after {
    right: -3px;
}

.menu-page .content-panel {
    background: #EAEAEA;
    border-radius: 16px;
    padding: 32px 28px;
    flex: 1;
    display: none;
    z-index: 1;
    margin-left: 20px;
}

.menu-page .content-panel.visible {
    display: block;
    animation: slideIn 0.35s ease-out;
}

.menu-page .content-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.menu-page .field-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.menu-page .field-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.menu-page .select-field {
    padding: 6px 12px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #fff;
    min-width: 160px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.menu-page .select-field:focus {
    border-color: #4d49fc;
}

.menu-page .list-box {
    border: 1.5px solid #c5c5e0;
    border-radius: 10px;
    margin-bottom: 20px;
    max-height: 220px;
    overflow-y: auto;
}

/* Custom scrollbar for list-box */
.menu-page .list-box::-webkit-scrollbar {
    width: 6px;
}

.menu-page .list-box::-webkit-scrollbar-track {
    background: #f0f0f5;
    border-radius: 10px;
}

.menu-page .list-box::-webkit-scrollbar-thumb {
    background: #c5c5e0;
    border-radius: 10px;
    transition: background 0.2s;
}

.menu-page .list-box::-webkit-scrollbar-thumb:hover {
    background: #4d49fc;
}

.menu-page .list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8ec;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.menu-page .list-item:last-child {
    border-bottom: none;
}

.menu-page .list-item:hover {
    background: #f0eeff;
}

.menu-page .list-item.selected {
    background: #ebe8ff;
}

.menu-page .list-item .icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #333;
}

.menu-page .action-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}



.menu-page .settings-grid {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 16px 12px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.menu-page .settings-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: right;
}

.menu-page input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 160px;
    height: 4px;
    background: #28209c;
    border-radius: 2px;
    outline: none;
}

.menu-page input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 18px;
    background: #28209c;
    border-radius: 2px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.menu-page input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px rgba(40, 32, 156, 0.15);
}

.menu-page .volume-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 28px;
    text-align: center;
}

.menu-page .sound-toggle {
    width: 36px;
    height: 36px;
    background: none;
    border: 2px solid #4d49fc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4d49fc;
    transition: all 0.25s;
}

.menu-page .sound-toggle:hover {
    background: rgba(77, 73, 252, 0.08);
}

.menu-page .sound-toggle.muted {
    color: #ccc;
    border-color: #ccc;
}

.menu-page .sound-toggle svg {
    width: 20px;
    height: 20px;
}

.menu-page .section-divider {
    margin: 24px 0 20px;
}

.menu-page .section-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.menu-page .menu-divider {
    width: 140px;
    height: 1px;
    background: #c5c5e0;
    margin: 10px auto 14px;
}

.menu-page .menu-btn-secondary {
    background: transparent;
    color: #4d49fc;
    border: 1.5px solid #4d49fc;
    font-size: 13px;
    padding: 9px 0;
}

.menu-page .menu-btn-secondary:hover {
    background: rgba(77, 73, 252, 0.08);
    color: #28209c;
    border-color: #28209c;
    box-shadow: none;
    transform: none;
}

.menu-page .menu-btn-secondary:active {
    transform: none;
    box-shadow: none;
}
