/* Start Menu Styles */
.startmenu {
    position: absolute;
    bottom: var(--taskbar-height);
    left: 0;
    width: 320px; /* Ancho aumentado para más contenido */
    background: #ECE9D8; /* Fondo gris claro de XP */
    border: 1px solid #000000; /* Borde negro */
    border-right: 1px solid #FFFFFF; /* Borde blanco a la derecha */
    border-bottom: 1px solid #FFFFFF; /* Borde blanco abajo */
    border-radius: 0; /* Sin redondeo */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Sombra para profundidad */
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.1s ease-out; /* Transición más rápida */
}

.startmenu.show {
    visibility: visible;
    opacity: 1;
}

/* Menu Top Bar */
.menutopbar {
    background: linear-gradient(to bottom, #316AC5 0%, #0054E3 100%); /* Degradado azul de XP */
    padding: 5px 10px; /* Padding ajustado */
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio ajustado */
    border-radius: 0; /* Sin redondeo */
}

.userpicture {
    width: 48px;
    height: 48px;
    border: 2px solid white;
    border-radius: 4px;
    background: white;
    padding: 2px;
}

.username {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Start Menu Middle Section */
.start-menu-middle {
    display: flex;
    background: #ECE9D8; /* Fondo gris claro */
    min-height: 350px; /* Altura aumentada para más contenido */
}

.middle-section {
    flex: 1;
}

.middle-left {
    background: #ECE9D8; /* Fondo gris claro */
    border-right: 1px solid #A0A0A0; /* Borde gris */
    display: flex;
    flex-direction: column;
}

.middle-right {
    background: #C7E2FF; /* Fondo azul más claro para coincidir */
    border-left: 1px solid #FFFFFF; /* Borde blanco a la izquierda */
}

/* Menu Items */
.menu-items {
    flex: 1;
    padding: 2px 0; /* Padding ajustado */
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio ajustado */
    padding: 4px 10px; /* Padding ajustado */
    cursor: pointer;
    transition: background 0.1s; /* Transición más rápida */
    position: relative;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.menu-item:hover:not(.disabled) {
    background: #316AC5; /* Azul de selección de XP */
    color: white;
}

.menu-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.menu-item img {
    width: 24px; /* Tamaño de icono ajustado */
    height: 24px;
}

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 11px;
    font-weight: normal;
}

.projects-bold {
    font-weight: bold;
}

.item-description {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
}

.menu-item:hover .item-description {
    opacity: 1;
}

/* Menu Divider */
.menu-divider {
    margin: 0;
    padding: 0;
}

.divider {
    border: none;
    border-top: 1px solid #A0A0A0; /* Borde gris */
    margin: 2px 5px; /* Margen ajustado */
}

.divider-darkblue {
    background: #C7E2FF;
}

.divider-darkblue .divider {
    border-color: #B5C5D7;
}

/* All Programs Button */
.all-programs-container {
    padding: 5px; /* Padding ajustado */
    border-top: 1px solid #A0A0A0; /* Borde gris */
}

.all-programs-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px; /* Padding ajustado */
    cursor: pointer;
    border-radius: 0; /* Sin redondeo */
    transition: background 0.1s; /* Transición más rápida */
}

.all-programs-button:hover {
    background: #316AC5; /* Azul de selección de XP */
    color: white;
}

.all-programs-button img {
    width: 16px;
    height: 16px;
}

/* Start Menu Footer */
.start-menu-footer {
    background: linear-gradient(to bottom, #316AC5 0%, #0054E3 100%); /* Degradado azul de XP */
    padding: 5px 10px; /* Padding ajustado */
    border-radius: 0; /* Sin redondeo */
}

.footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px; /* Espacio ajustado */
}

.footer-button {
    display: flex;
    align-items: center;
    gap: 4px; /* Espacio ajustado */
    padding: 4px 8px; /* Padding ajustado */
    cursor: pointer;
    border-radius: 0; /* Sin redondeo */
    transition: background 0.1s; /* Transición más rápida */
    color: white;
    font-size: 11px;
}

.footer-button:hover {
    background: rgba(255,255,255,0.2); /* Fondo blanco transparente en hover */
}

.footer-button img {
    width: 20px;
    height: 20px;
}


/* All Programs Menu */
.all-programs-menu {
    position: absolute;
    left: 100%;
    bottom: 0;
    width: 200px;
    background: #ECE9D8; /* Fondo gris claro */
    border: 1px solid #000000; /* Borde negro */
    border-right: 1px solid #FFFFFF; /* Borde blanco a la derecha */
    border-bottom: 1px solid #FFFFFF; /* Borde blanco abajo */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Sombra para profundidad */
    margin-left: 3px;
    display: none;
}

.all-programs-menu.show {
    display: block;
}

.all-programs-items {
    padding: 2px;
}

.all-programs-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 11px;
}

.all-programs-item:hover:not(.disabled) {
    background: #316AC5;
    color: white;
}

.all-programs-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.all-programs-item img {
    width: 20px;
    height: 20px;
}

.all-programs-separator {
    height: 1px;
    background: #A0A0A0; /* Borde gris */
    margin: 2px 5px;
}

/* Recently Used Menu */
.recently-used-menu {
    position: absolute;
    left: 100%;
    top: auto;
    width: 200px;
    background: #ECE9D8; /* Fondo gris claro */
    border: 1px solid #000000; /* Borde negro */
    border-right: 1px solid #FFFFFF; /* Borde blanco a la derecha */
    border-bottom: 1px solid #FFFFFF; /* Borde blanco abajo */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Sombra para profundidad */
    margin-left: 3px;
    display: none;
}

.recently-used-menu.show {
    display: block;
}

.recently-used-items {
    padding: 2px;
}

.recently-used-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 11px;
}

.recently-used-item:hover:not(.disabled) {
    background: #316AC5;
    color: white;
}

.recently-used-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.recently-used-item img {
    width: 20px;
    height: 20px;
}

/* Menu Arrow */
.mut-menu-arrow {
    color: #000;
    font-size: 10px;
    opacity: 0.6;
}

.menu-item:hover .mut-menu-arrow {
    color: white;
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .startmenu {
        width: 100%;
        max-width: 380px;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
    }
    
    .startmenu.show {
        transform: translateX(-50%) translateY(0);
    }
    
    .start-menu-middle {
        min-height: 300px;
    }
    
    .all-programs-menu,
    .recently-used-menu {
        position: fixed;
        left: 50%;
        bottom: calc(var(--taskbar-height) + 60px);
        transform: translateX(-50%);
        margin-left: 0;
    }
}

/* Animation for menu items */
@keyframes menuItemSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.startmenu.show .menu-item {
    animation: menuItemSlide 0.3s ease-out;
    animation-fill-mode: both;
}

.startmenu.show .menu-item:nth-child(1) { animation-delay: 0.05s; }
.startmenu.show .menu-item:nth-child(2) { animation-delay: 0.1s; }
.startmenu.show .menu-item:nth-child(3) { animation-delay: 0.15s; }
.startmenu.show .menu-item:nth-child(4) { animation-delay: 0.2s; }
.startmenu.show .menu-item:nth-child(5) { animation-delay: 0.25s; }
.startmenu.show .menu-item:nth-child(6) { animation-delay: 0.3s; }
.startmenu.show .menu-item:nth-child(7) { animation-delay: 0.35s; }
.startmenu.show .menu-item:nth-child(8) { animation-delay: 0.4s; }