/* Taskbar Styles */
#taskbar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;

    /* Aero Glass Background */
    background: linear-gradient(to bottom,
            rgba(30, 40, 50, 0.4) 0%,
            rgba(10, 20, 30, 0.6) 49%,
            rgba(0, 0, 0, 0.7) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    /* Highlighted top border */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 -2px 10px rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 99999;
    /* Always on top */
    user-select: none;
}

/* Start Button Area (El Orb de Vista) */
.start-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 20px;
    margin-left: 5px;
    position: relative;
    top: -2px;
    /* Sobresale un poco hacia arriba */
    cursor: pointer;

    /* Efecto Orb Esfera de Cristal */
    background: radial-gradient(circle at 50% 25%, rgba(60, 160, 255, 1) 0%, rgba(20, 80, 180, 0.95) 60%, rgba(0, 30, 80, 0.95) 100%);
    box-shadow:
        inset 0 5px 6px -2px rgba(255, 255, 255, 0.8),
        /* brillo polo norte */
        inset 0 -5px 8px -2px rgba(0, 0, 0, 0.6),
        /* sombra polo sur */
        0 2px 8px rgba(0, 0, 0, 0.6),
        /* sombra en taskbar */
        0 0 0 1px rgba(0, 10, 20, 0.9),
        /* borde gris oscuro base */
        0 0 0 2px rgba(255, 255, 255, 0.25);
    /* halo transparente sutil */

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100000;
}

.start-button:hover {
    background: radial-gradient(circle at 50% 25%, rgba(100, 200, 255, 1) 0%, rgba(40, 110, 220, 0.95) 60%, rgba(10, 50, 120, 0.95) 100%);
    box-shadow:
        inset 0 5px 8px -2px rgba(255, 255, 255, 0.9),
        inset 0 -5px 8px -2px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(60, 180, 255, 0.8),
        /* resplandor radial hacia el escritorio */
        0 0 0 1px rgba(0, 10, 20, 0.9),
        0 0 0 2px rgba(255, 255, 255, 0.35);
}

.start-button img {
    height: 24px;
    width: auto;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
    z-index: 2;
}

/* Pseudo-elemento para el resplandor inferior del Orb (opcional, da extra realismo) */
.start-button::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 15%;
    width: 70%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(ellipse at bottom, rgba(200, 230, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

/* Task List Area */
#task-list {
    display: flex;
    flex: 1;
    /* Takes remaining space */
    gap: 4px;
    overflow-x: auto;
    /* Scroll if too many tasks */
    height: 100%;
    align-items: center;
}

/* Individual Task Item (Vista Glass Block) */
.task-item {
    display: flex;
    align-items: center;
    min-width: 140px;
    max-width: 180px;
    height: 40px;

    /* El corte horizontal clásico de Aero (transpirable arriba, cristal oscuro abajo) */
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 49%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0 10px;
    margin: 0 2px;
    cursor: pointer;

    /* Reflexiones de los bordes 3D */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset -1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);

    transition: all 0.15s ease;
}

.task-item:hover {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.05) 49%,
            rgba(30, 120, 200, 0.3) 50%,
            rgba(80, 180, 250, 0.2) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.2),
        inset -1px 0 0 rgba(255, 255, 255, 0.2),
        inset 0 -10px 15px rgba(50, 150, 255, 0.3);
}

/* Ventana abierta y enfocada (efecto encendido/presionado) */
.task-item.active {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.05) 49%,
            rgba(20, 80, 150, 0.4) 50%,
            rgba(20, 80, 150, 0.6) 100%);
    border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.5) rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 10px rgba(80, 180, 255, 0.4);
}

.task-item.minimized {
    opacity: 0.7;
    background: transparent;
}

.task-item img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.task-item span {
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Clock and Tray Area */
#clock-tray {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 10px;
    height: 100%;
    user-select: none;
}

/* Tray Icons Group */
.tray-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 60%;
}

.tray-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    cursor: default;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tray-icon:hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tray-icon svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* Clock Container (Time + Date) */
#clock-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    color: #fff;
    min-width: 80px;
}

#clock-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

#date-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* Utility to hide windows visually without display:none */
.window-minimized {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8);
    transition: all 0.2s;
}