:root {
    --plummy: #685e7b;
    --lavender: #b8a6dd;
    --glass: rgba(247, 235, 229, 0.85);
}

* {
    user-select: none;
    -webkit-user-drag: none;
}

body, html {
    margin: 0; padding: 0;
    height: 100vh; width: 100vw;
    background: url('https://wist-refs.neocities.org/assets/wistwebsite_background.png') no-repeat center center fixed;
    background-size: cover;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.logo-container { padding: 40px; pointer-events: none; }
.wist-logo { height: 150px; }

.ref-window {
    position: absolute;
    width: 280px; height: 380px;
    min-width: 180px; min-height: 180px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1.5px solid var(--lavender);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

.resizer { position: absolute; z-index: 10; }
.resizer.n { top: -4px; left: 10px; right: 10px; height: 8px; cursor: n-resize; }
.resizer.s { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: s-resize; }
.resizer.e { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: e-resize; }
.resizer.w { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: w-resize; }
.resizer.se { right: -4px; bottom: -4px; width: 15px; height: 15px; cursor: se-resize; }

.window-header {
    padding: 10px 14px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    cursor: grab;
    border-bottom: 1px solid rgba(104, 94, 123, 0.1);
    border-radius: 14px 14px 0 0;
}

.win-controls { display: flex; gap: 4px; margin-right: 12px; align-items: center; }
.close-hitbox { padding: 8px; margin: -8px; cursor: pointer; z-index: 20; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lavender); pointer-events: none; }
.dot.close { background: #ff605c; }

.window-title {
    font-size: 10px; font-weight: 800;
    color: var(--plummy);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.window-content { padding: 12px; flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.img-container { flex-grow: 1; overflow: hidden; margin-bottom: 10px; border-radius: 8px; background: white; border: 1px solid var(--mauve); }
.img-container img { width: 100%; height: 100%; object-fit: contain; }

.save-button { text-align: center; background: var(--plummy); color: white; text-decoration: none; font-size: 10px; font-weight: bold; padding: 10px; border-radius: 6px; }

.rack-container { position: fixed; bottom: 0; left: 0; width: 100%; display: flex; justify-content: center; z-index: 2000; }
.gallery-rack { background: var(--glass); backdrop-filter: blur(10px); border: 1.5px solid var(--lavender); border-bottom: none; padding: 8px 15px; border-radius: 12px 12px 0 0; display: flex; gap: 10px; }
.thumb { width: 42px; height: 42px; border: 1px solid var(--lavender); border-radius: 6px; cursor: pointer; overflow: hidden; transition: transform 0.2s; }
.thumb:hover { transform: translateY(-5px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }