/* Hacker House OS - v11.0 WORKSTATION EDITION */
:root {
    --neon: #00ff41;
    --neon-blue: #00bfff;
    --neon-red: #ff5252;
    --neon-dim: rgba(0, 255, 65, 0.2);
    --bg-dark: #050505;
    /* Efecto Cristal (Glassmorphism) */
    --glass-bg: rgba(10, 14, 12, 0.96);
    --glass-border: rgba(0, 255, 65, 0.3);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }

body, html {
    margin: 0; padding: 0;
    height: 100vh; width: 100vw;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at center, rgba(0, 255, 65, 0.05) 0%, transparent 80%),
        linear-gradient(var(--neon-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-dim) 1px, transparent 1px);
    background-size: auto, 50px 50px, 50px 50px;
    color: #f2f6f3;
    font-family: var(--font-main);
    overflow: hidden;
}

/* --- BARRA DE TAREAS --- */
.os-taskbar {
    height: 40px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 10000;
}

/* --- VENTANAS (REDISEÑADAS PARA RESIZE) --- */
.window-popup {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    min-width: 300px;
    min-height: 200px;
    z-index: 1000;
}

.window-popup.active {
    border-color: var(--neon);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.2);
}

.window-header {
    background: rgba(0, 255, 65, 0.05);
    border-bottom: 1px solid var(--glass-border);
    color: var(--neon);
    padding: 10px 15px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    flex: 0 0 auto;
    min-height: 40px;
    position: relative;
    z-index: 10;
}

.window-header .header-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.window-header .window-controls { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }

.window-content {
    flex: 1;
    color: #fff;
    overflow: hidden; /* Cambiado a hidden para que el resizer no se pierda */
    position: relative;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* --- MOTOR DE REDIMENSIONADO (TIRADOR) --- */
.resizer {
    width: 20px;
    height: 20px;
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize; /* Cursor diagonal */
    z-index: 5000;
}

.resizer::after {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--neon);
    border-bottom: 2px solid var(--neon);
    opacity: 0.5;
}

/* --- GADGETS DE MINIMIZADO (DOCK DERECHO) --- */
.minimized-dock {
    position: absolute;
    right: 15px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.gadget-min {
    background: rgba(0, 20, 0, 0.85);
    border: 1px solid #222;
    border-left: 4px solid var(--neon);
    padding: 12px;
    width: 170px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    animation: slideInRight 0.3s ease;
}

.gadget-min:hover {
    transform: translateX(-10px);
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--neon);
}

.gadget-tag { font-size: 0.5rem; color: #555; text-transform: uppercase; }
.gadget-title { font-size: 0.75rem; color: #fff; font-weight: bold; margin: 3px 0; }
.gadget-status { font-size: 0.55rem; color: var(--neon); }

/* Alerta en Gadget (P2P Activity) */
.gadget-alert {
    border-left-color: var(--neon-blue) !important;
    animation: gadget-pulse 1.5s infinite;
}

@keyframes gadget-pulse {
    50% { background: rgba(0, 191, 255, 0.15); box-shadow: 0 0 15px var(--neon-blue); }
}

/* --- ICONOS DE ESCRITORIO --- */
.desktop-icons {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    gap: 25px;
    z-index: 5;
}

/* --- ESTILOS DE BLOQUEO (GHOST MODE) --- */
.lock-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.lock-content {
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 50px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 50px #000;
}

/* --- ANIMACIONES --- */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-in {
    animation: fadeInScale 0.25s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Lenguaje visual común: ayuda a usuarios nuevos sin perder la estética. */
.ui-intro { margin: 0 0 18px; padding: 12px 14px; color: #c9d3cc; background: rgba(0,191,255,.07); border: 1px solid rgba(0,191,255,.28); border-left: 4px solid var(--neon-blue); border-radius: 6px; font-size: .78rem; line-height: 1.5; }
.ui-intro strong { color: #fff; }
.ui-hint { display:block; margin-top:6px; color:#aab4ad; font-size:.7rem; line-height:1.4; }
label { color:#b5c0b8 !important; }
.btn-cyber { min-height:36px; }
.os-input::placeholder, input::placeholder, textarea::placeholder { color:#7d8881 !important; opacity:1; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [role="button"]:focus-visible { outline:2px solid var(--neon-blue); outline-offset:2px; }
