/* ═══════════════════════════════════════
   WINDOWS - Premium Win11 Style
   ═══════════════════════════════════════ */
.window {
    position: absolute;
    min-width: 320px;
    min-height: 200px;
    background: var(--window-bg);
    backdrop-filter: var(--mica-blur);
    -webkit-backdrop-filter: var(--mica-blur);
    border: 1px solid var(--mica-border);
    border-radius: var(--window-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Entrance Animation */
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition:
        opacity 0.25s var(--ease-out-expo),
        transform 0.25s var(--ease-out-expo),
        box-shadow 0.2s ease;
}

/* Acrylic noise overlay */
.window::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--acrylic-noise);
    pointer-events: none;
    opacity: 0.4;
    border-radius: inherit;
}

.window.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.window:focus-within,
.window.focused {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.window.minimized {
    opacity: 0;
    transform: scale(0.5) translateY(100px);
    pointer-events: none;
}

/* Window Header */
.window-header {
    height: var(--window-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 12px;
    user-select: none;
    cursor: grab;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.window-header:active {
    cursor: grabbing;
}

.window-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.window-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.window-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Win11 Control Buttons */
.window-controls {
    display: flex;
    height: 100%;
}

.control-btn {
    width: 46px;
    height: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    transition: background 0.1s, color 0.1s;
    position: relative;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.control-btn.close-btn:hover {
    background: #c42b1c;
    color: #fff;
}

/* Symbols */
.minimize-btn::before {
    content: "─";
    font-size: 10px;
}

.maximize-btn::before {
    content: "";
    width: 9px;
    height: 9px;
    border: 1px solid currentColor;
    border-radius: 1px;
}

.close-btn::before {
    content: "✕";
    font-size: 10px;
}

/* Window Content */
.window-content {
    flex: 1;
    overflow: auto;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════
   SCROLLBARS - Win11 Style
   ═══════════════════════════════════════ */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border: 4px solid transparent;
    background-clip: content-box;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}