/* Taskbar Styles */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar-height);
    background: linear-gradient(to bottom, #3168D5 0%, #2B5FCD 3%, #2559C6 6%, #1941A5 100%);
    border-top: 1px solid #0E3A8E;
    display: flex;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.3);
}

/* Start Button */
.start-button {
    height: 100%;
    padding: 0 15px 0 10px; /* Ajustado para el nuevo diseño */
    background: linear-gradient(to bottom, #78B33E 0%, #619C32 50%, #518C2A 100%); /* Degradado XP */
    border-top: 1px solid #C6D79C; /* Borde superior claro */
    border-left: 1px solid #C6D79C; /* Borde izquierdo claro */
    border-right: 1px solid #3168D5; /* Borde derecho oscuro */
    border-bottom: 1px solid #3168D5; /* Borde inferior oscuro */
    border-radius: 3px; /* Ligeramente redondeado */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px; /* Espacio entre icono y texto */
    color: white;
    font-weight: bold;
    font-size: 14px; /* Tamaño de fuente más grande */
    font-family: 'Tahoma', sans-serif; /* Fuente de XP */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    position: relative;
    transition: all 0.1s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.2); /* Sombra interna y externa */
}

.start-button:hover {
    background: linear-gradient(to bottom, #88C34E 0%, #71AC42 50%, #619C32 100%); /* Degradado hover */
    border-top: 1px solid #D6E7AC;
    border-left: 1px solid #D6E7AC;
    border-right: 1px solid #4178E5;
    border-bottom: 1px solid #4178E5;
}

.start-button:active,
.start-button.active {
    background: linear-gradient(to bottom, #518C2A 0%, #619C32 50%, #78B33E 100%); /* Degradado active */
    border-top: 1px solid #3168D5;
    border-left: 1px solid #3168D5;
    border-right: 1px solid #C6D79C;
    border-bottom: 1px solid #C6D79C;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3); /* Sombra interna para presionado */
    padding: 1px 14px 0 11px; /* Efecto de "presionado" */
}

.start-button img {
    width: 24px; /* Tamaño del icono más grande */
    height: 24px;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.5));
}

/* Taskbar Programs Area */
.taskbar-programs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 5px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Taskbar Program Button */
.taskbar-program {
    height: calc(100% - 4px);
    min-width: 160px;
    max-width: 200px;
    background: linear-gradient(to bottom, #4A8FDB 0%, #3168D5 3%, #2559C6 100%);
    border: 1px solid #0E3A8E;
    border-radius: 2px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 11px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    transition: all 0.1s ease;
    position: relative;
    overflow: hidden;
}

.taskbar-program:hover {
    background: linear-gradient(to bottom, #5A9FEB 0%, #4178E5 3%, #3569D6 100%);
    border-color: #1E4A9E;
}

.taskbar-program.active {
    background: linear-gradient(to bottom, #1941A5 0%, #2559C6 3%, #3168D5 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    border-color: #0A2A6A;
}

.taskbar-program.minimized {
    background: linear-gradient(to bottom, #3A7FDB 0%, #2158C5 3%, #1549B6 100%);
    opacity: 0.8;
}

.taskbar-program img {
    width: 16px;
    height: 16px;
}

.taskbar-program span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* System Tray */
.system-tray {
    height: 100%;
    background: linear-gradient(to bottom, #12A7EA 0%, #0C9CDD 3%, #0592D0 100%);
    border-left: 1px solid #0E3A8E;
    padding: 0 10px;
    display: flex;
    align-items: center;
    position: relative;
    min-width: 100px;
}

.system-tray-bg {
    display: none;
}

.tray-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tray-icons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tray-icon,
.tray-network-icon,
.tray-fullscreen-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.tray-icon:hover,
.tray-network-icon:hover,
.tray-fullscreen-icon:hover {
    opacity: 1;
}

/* Clock */
.time {
    color: white;
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    cursor: default;
}

/* Taskbar Animations */
@keyframes taskbarProgramAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.taskbar-program {
    animation: taskbarProgramAppear 0.2s ease-out;
}

/* Quick Launch Area (optional) */
.quick-launch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 5px;
    border-right: 1px solid #0E3A8E;
    height: 100%;
}

.quick-launch-icon {
    width: 24px;
    height: 24px;
    padding: 2px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: all 0.1s ease;
}

.quick-launch-icon:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.quick-launch-icon img {
    width: 100%;
    height: 100%;
}

/* Show Desktop Button */
.show-desktop {
    width: 15px;
    height: 100%;
    background: linear-gradient(to bottom, #4A8FDB 0%, #3168D5 3%, #2559C6 100%);
    border-left: 1px solid #0E3A8E;
    cursor: pointer;
    position: relative;
}

.show-desktop:hover {
    background: linear-gradient(to bottom, #5A9FEB 0%, #4178E5 3%, #3569D6 100%);
}

.show-desktop:active {
    background: linear-gradient(to bottom, #1941A5 0%, #2559C6 3%, #3168D5 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .taskbar {
        height: 40px;
    }
    
    .start-button {
        padding: 0 15px;
        font-size: 10px;
    }
    
    .taskbar-program {
        min-width: 120px;
        font-size: 10px;
    }
    
    .system-tray {
        min-width: 80px;
        padding: 0 8px;
    }
    
    .time {
        font-size: 10px;
    }
    
    .tray-fullscreen-icon {
        display: none;
    }
}

/* Taskbar Context Menu */
.taskbar-context-menu {
    position: absolute;
    bottom: 100%;
    background: #ECE9D8;
    border: 1px solid #919B9C;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    padding: 2px;
    margin-bottom: 2px;
    display: none;
}

.taskbar-context-menu-item {
    padding: 4px 20px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
}

.taskbar-context-menu-item:hover {
    background: #316AC5;
    color: white;
}

/* Notification Area */
.notification-balloon {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #FFFFE1;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 8px;
    margin-bottom: 5px;
    font-size: 11px;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    display: none;
    max-width: 200px;
}

.notification-balloon::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #FFFFE1;
}

/* High DPI Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .start-button img,
    .taskbar-program img,
    .tray-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}