@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&family=VT323&display=swap');

/* =====================================================
   OWL VIRTUAL OFFICE – FRONTEND SIMULATOR
   Habbo-style Isometric Retro UI
   ===================================================== */

#owlvo-app {
    width: 100%;
    max-width: 1200px;
    height: 600px;
    margin: 20px auto;
    position: relative;
    background: radial-gradient(circle, #2a2a2a, #1a1a1a);
    overflow: hidden;
    font-family: 'Ubuntu', sans-serif;
    border: 3px solid #444;
    border-bottom: 6px solid #222;
    image-rendering: pixelated;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* VIEWPORT & STAGE */
#owlvo-viewport {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: grab;
}
#owlvo-viewport:active { cursor: grabbing; }

#owlvo-stage {
    position: absolute;
    width: 2000px;
    height: 2000px;
    transform-origin: 0 0;
    pointer-events: none;
}

/* TILES */
.owl-tile {
    position: absolute;
    width: 64px;
    height: 32px;
    pointer-events: all;
    transition: filter 0.2s;
}
.owl-tile::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%) rotate(45deg);
    background: inherit;
    border: 1px solid rgba(255,255,255,0.05);
}
.owl-tile:hover {
    filter: brightness(1.3);
}

/* AVATARS */
.owl-avatar {
    position: absolute;
    width: 48px;
    height: 72px;
    transform: translate(-50%, -100%);
    transition: left 0.5s linear, top 0.5s linear;
    z-index: 100;
}
.owl-avatar-body {
    width: 100%; height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
}
/* Habbo-style bubble */
.owl-bubble {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    padding: 6px 12px;
    border-radius: 10px;
    border: 2px solid #000;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}
.owl-bubble.owl-active { opacity: 1; }
.owl-bubble::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #000;
}

/* HUD */
#owlvo-hud {
    position: absolute;
    top: 15px; left: 15px;
    background: rgba(0,0,0,0.7);
    border: 1px solid #444;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.owlvo-hud-brand {
    font-family: 'VT323', monospace;
    font-size: 24px;
    color: #ffcc00;
    text-shadow: 2px 2px #000;
}
.owlvo-hud-motto {
    font-size: 9px;
    color: #aaa;
    letter-spacing: 2px;
}

/* CONTROLS (D-PAD) */
#owlvo-controls {
    position: absolute;
    bottom: 20px; left: 20px;
    z-index: 500;
}
.owlvo-dpad {
    display: grid;
    grid-template-areas: ".  u  ."
                        "l  o  r"
                        ".  d  .";
    gap: 4px;
}
.owlvo-dbtn {
    width: 40px; height: 40px;
    background: #333;
    border: 2px solid #555;
    border-bottom: 4px solid #111;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.owlvo-dbtn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}
.owlvo-dbtn-ok { background: #444; }

/* CHAT PANEL */
#owlvo-chat {
    position: absolute;
    bottom: 0; right: 0;
    width: 320px;
    height: 0; /* JS controls this */
    background: #2a2a2a;
    border-left: 2px solid #000;
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease-out;
    z-index: 600;
}
.owlvo-chat-open { height: 400px !important; }

#owlvo-chat-header {
    background: #111;
    padding: 10px 15px;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#owlvo-chat-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffcc00;
}
#owlvo-chat-close {
    background: none; border: none; color: #888; cursor: pointer; font-size: 18px;
}
#owlvo-chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #222;
}
.msg { margin-bottom: 12px; font-size: 12px; line-height: 1.4; color: #ddd; }
.msg-name { font-weight: 700; color: #ffcc00; margin-right: 6px; }
.msg-ai { color: #5f5; }

#owlvo-chat-input-row {
    padding: 10px;
    background: #111;
    display: flex;
    gap: 8px;
}
#owlvo-chat-inp {
    flex: 1;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 12px;
    font-size: 12px;
}
#owlvo-chat-send {
    background: #555;
    border: none;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    #owlvo-app { height: 100vh; margin: 0; border: none; }
    #owlvo-chat { width: 100%; border-left: none; }
    .owlvo-hud-brand { font-size: 18px; }
    #owlvo-controls { bottom: 10px; left: 10px; transform: scale(0.8); }
}
