/* =============================================
   START MENU — AdriX OS (Windows Vista Style)
   ============================================= */

#start-menu {
    position: fixed;
    bottom: 48px; /* Altura exacta de la taskbar */
    left: 0;
    width: 460px;
    height: calc(100vh - 48px); /* Llena toda la pantalla por encima de la taskbar */
    max-height: 580px; /* Pero nunca más alto que esto */

    /* Estructura */
    display: flex;
    flex-direction: column;
    overflow: hidden;

    z-index: 10000;
    font-family: 'Segoe UI', 'Tahoma', sans-serif;

    /* Vista: esquinas redondeadas solo arriba-derecha, cero abajo */
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-bottom: none; /* Sin borde inferior para que toque la taskbar sin línea */
    margin-bottom: 0;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 -6px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    animation: vistaSlideUp 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vistaSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── BODY: dos columnas side-by-side ── */
.start-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    height: 100%; /* Forzar a rellenar la altura de #start-menu */
    min-height: 0;
    overflow: hidden;
}

/* ══════════════════════════════
   LEFT PANEL — White / Light
   ══════════════════════════════ */
.start-left {
    flex: 1;
    /* ocupa el espacio sobrante */
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(235, 240, 252, 0.95) 100%);
    overflow: hidden;
}

/* Lista scrollable */
.start-apps-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0;
}

.start-apps-list::-webkit-scrollbar {
    width: 4px;
}

.start-apps-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 100, 0.2);
    border-radius: 2px;
}

/* Etiqueta sección */
.start-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    padding: 8px 14px 3px;
    user-select: none;
}

/* Items de programa */
.start-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    gap: 10px;
    transition: background 0.1s;
}

.start-item:hover {
    background: linear-gradient(90deg,
            rgba(30, 100, 200, 0.15) 0%,
            rgba(10, 60, 180, 0.2) 100%);
}

.start-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.start-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* Nombre: azul negrita (Vista) */
.start-item-text span {
    font-size: 13px;
    font-weight: 700;
    color: #1a5aab;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subtítulo: gris pequeño */
.start-item-text small {
    font-size: 10.5px;
    color: #888;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Separador */
.start-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 3px 12px;
}

/* ── Pie del panel izquierdo ── */
.start-bottom {
    flex-shrink: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.start-all-programs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #1a5aab;
    background: rgba(215, 228, 248, 0.7);
    transition: background 0.1s;
    user-select: none;
}

.start-all-programs::before {
    content: '▶';
    font-size: 8px;
    color: #1a5aab;
}

.start-all-programs:hover {
    background: rgba(195, 215, 248, 0.9);
}

/* Barra de búsqueda */
.start-search {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.start-search input {
    flex: 1;
    height: 28px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 12px;
    color: #333;
    padding: 0 10px;
}

.start-search input::placeholder {
    color: #aaa;
}

.start-search-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.12);
    background: linear-gradient(180deg, #e0e0e0 0%, #c8c8c8 100%);
    cursor: pointer;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.start-search-btn:hover {
    background: linear-gradient(180deg, #c8d8f0 0%, #a8c0e8 100%);
}

/* ══════════════════════════════
   RIGHT PANEL — Dark Glass
   ══════════════════════════════ */
.start-right {
    width: 175px;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg,
            rgba(15, 25, 55, 0.93) 0%,
            rgba(8, 15, 38, 0.97) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Perfil del usuario */
.user-profile {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px 12px;
    gap: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(60, 100, 200, 0.15) 0%, transparent 100%);
}

.user-avatar-frame {
    width: 56px;
    height: 56px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid rgba(100, 155, 235, 0.6);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 3px 12px rgba(0, 50, 180, 0.35);
    flex-shrink: 0;
}

.user-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name-start {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 8px rgba(80, 150, 255, 0.6);
    text-align: center;
    word-break: break-word;
}

/* Links del sistema */
.system-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    min-height: 0;
    overflow-y: auto;
}

.system-links::-webkit-scrollbar {
    width: 0;
}

.right-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 3px 0;
}

.system-link {
    padding: 5px 14px;
    cursor: pointer;
    color: rgba(205, 218, 240, 0.88);
    font-size: 12.5px;
    font-weight: 400;
    transition: color 0.12s, background 0.12s;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.system-link:hover {
    color: #fff;
    background: linear-gradient(90deg,
            rgba(60, 120, 220, 0.3) 0%,
            transparent 100%);
}

/* ── Botones de acción (pie derecha) ── */
.shutdown-area {
    flex-shrink: 0;
    padding: 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    background: rgba(0, 0, 0, 0.25);
}

.vista-power-btn {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg,
            rgba(80, 100, 150, 0.65) 0%,
            rgba(30, 40, 80, 0.8) 100%);
    color: rgba(210, 225, 255, 0.9);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.vista-power-btn:hover {
    background: linear-gradient(180deg,
            rgba(80, 145, 235, 0.75) 0%,
            rgba(30, 85, 195, 0.88) 100%);
    border-color: rgba(100, 165, 255, 0.5);
    box-shadow: 0 0 8px rgba(60, 125, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.vista-power-btn.power:hover {
    background: linear-gradient(180deg, #b54848 0%, #7a1e1e 100%);
    border-color: rgba(255, 100, 100, 0.5);
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.4);
}