.window {
    position: absolute;
    min-width: 350px;
    min-height: 250px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%);
    border-radius: 12px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.35),
        0 12px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: windowIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes windowIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 40px) !important;
    border-radius: 0;
    animation: none;
}

.window.minimized {
    display: none;
}

.window.dragging {
    transition: none;
}

.window.dragging * {
    transition: none !important;
}

.window-header {
    height: 36px;
    background: linear-gradient(180deg, 
        rgba(230, 240, 250, 0.98) 0%, 
        rgba(210, 226, 242, 0.98) 50%,
        rgba(200, 218, 238, 0.98) 100%);
    border-bottom: 1px solid rgba(160, 190, 220, 0.4);
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: default;
    flex-shrink: 0;
}

.window-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 20%, 
        rgba(255, 255, 255, 0.8) 80%, 
        transparent 100%);
}

.window-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.window-title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1a3045;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.window-controls {
    display: flex;
    gap: 3px;
    margin-right: -2px;
}

.window-btn {
    width: 32px;
    height: 26px;
    border: 1px solid rgba(140, 170, 200, 0.4);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(235, 242, 250, 0.9) 100%);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #3a5a7a;
    font-weight: 600;
    transition: all 0.15s ease;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.window-btn:hover {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(245, 250, 255, 1) 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.window-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.window-btn.close {
    background: linear-gradient(180deg, 
        rgba(255, 120, 110, 0.95) 0%, 
        rgba(235, 90, 80, 0.95) 100%);
    border-color: rgba(180, 50, 40, 0.4);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.window-btn.close:hover {
    background: linear-gradient(180deg, 
        rgba(255, 140, 130, 1) 0%, 
        rgba(245, 100, 90, 1) 100%);
    box-shadow: 
        0 2px 6px rgba(235, 60, 50, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.window-body {
    flex: 1;
    overflow: auto;
    background: #fff;
    position: relative;
}

.window-content {
    padding: 0;
    font-size: 13px;
    color: #2a3a4a;
    line-height: 1.55;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.window-content::-webkit-scrollbar {
    width: 10px;
}

.window-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10;
}

.window-resize-handle::before {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(120, 150, 180, 0.5);
    border-bottom: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 0 0 2px 0;
}

.window.dragging .window-header {
    cursor: move;
}

.window.focused .window-header {
    background: linear-gradient(180deg, 
        rgba(220, 235, 250, 0.98) 0%, 
        rgba(200, 220, 242, 0.98) 50%,
        rgba(190, 212, 236, 0.98) 100%);
}
