/* ========== Root ========== */
.wdw-root {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Window Frame ========== */
.wdw-frame {
    position: relative;
    width: 672px;
    height: 576px;
    border: 12px solid #5C3A1E;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 2px #3E2418,
        0 0 0 2px #2A1A0A,
        0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background: #1a1a2e;
}

/* Wood texture on frame */
.wdw-frame::before {
    content: '';
    position: absolute;
    top: -12px; left: -12px; right: -12px; bottom: -12px;
    border: 12px solid transparent;
    border-image: repeating-linear-gradient(
        87deg,
        #5C3A1E,
        #5C3A1E 3px,
        #6B4226 3px,
        #6B4226 6px
    ) 12;
    pointer-events: none;
    z-index: 3;
}

/* ========== Scene Image ========== */
.wdw-scene {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== Window Pane Dividers ========== */
.wdw-bar {
    position: absolute;
    background: rgba(92, 58, 30, 0.65);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
}

.wdw-bar-h {
    top: 50%;
    left: 0; right: 0;
    height: 8px;
    transform: translateY(-50%);
}

.wdw-bar-v {
    left: 50%;
    top: 0; bottom: 0;
    width: 8px;
    transform: translateX(-50%);
}

/* ========== Loading ========== */
.wdw-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 220, 160, 0.6);
    font-family: 'Excalifont', sans-serif;
    font-size: 14px;
    background: #1a1a2e;
    z-index: 1;
}

/* ========== Close Button ========== */
.wdw-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    font-family: sans-serif;
    z-index: 20;
}

.wdw-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* ========== Refresh Button ========== */
.wdw-refresh {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    font-family: sans-serif;
    z-index: 20;
    line-height: 1;
}

.wdw-refresh:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}
