/* Goonscape Hybrid Master CSS: Big Open World + Live Edging HUD + Complete OSRS Frame */

#hybrid-container {
    display: grid;
    grid-template-columns: 1fr 290px;
    grid-template-rows: 1fr 190px;
    height: calc(100vh - 58px);
    background: #080605;
    position: relative;
    overflow: hidden;
}

/* Master Viewport for the Large World */
.hybrid-canvas-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    position: relative;
    background: #0c0907;
    overflow: hidden;
}

#hybrid-osrs-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Screen Border Glow during The Edge Zone */
.hybrid-canvas-wrapper.in-edge-zone::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 45px rgba(255, 0, 119, 0.6), inset 0 0 15px rgba(255, 190, 0, 0.4);
    pointer-events: none;
    animation: canvasEdgePulse 1s infinite alternate ease-in-out;
    z-index: 100;
}

@keyframes canvasEdgePulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Top World Zone Banner (e.g. "Cumbridge Castle", "The Edgelands [PvP/Goon]") */
.world-zone-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 16, 12, 0.85);
    border: 2px solid var(--rs-gold);
    color: var(--rs-yellow);
    font-family: var(--rs-pixel-font);
    font-size: 11px;
    padding: 5px 16px;
    border-radius: 4px;
    text-shadow: 1px 1px #000;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Floating Live Edging Gauge Bar (HUD Overlay on Canvas) */
.hud-edging-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 580px;
    background: rgba(24, 18, 13, 0.92);
    border: 3px ridge var(--rs-border-light);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
}

.hud-edging-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.hud-edging-title {
    font-weight: bold;
    color: var(--rs-gold);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-track {
    width: 100%;
    height: 22px;
    background: #0d0a07;
    border: 2px inset #382c1e;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.hud-edge-marker {
    position: absolute;
    left: 80%;
    width: 18%;
    height: 100%;
    background: rgba(255, 0, 119, 0.3);
    border-left: 1px dashed #ff0077;
    border-right: 1px dashed #ff0077;
    pointer-events: none;
}

.hud-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, #00c3ff 0%, #ffcc00 65%, #ff0066 90%, #ff0000 100%);
    transition: width 0.08s linear;
}

.hud-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.hud-quick-buttons {
    display: flex;
    gap: 8px;
}

.hud-btn {
    flex: 1;
    background: #3c3022;
    border: 1px outset #69543c;
    color: #ffdf9e;
    font-family: var(--rs-font);
    font-size: 15px;
    padding: 4px 6px;
    cursor: pointer;
    text-align: center;
    border-radius: 2px;
}

.hud-btn:hover {
    background: #50412e;
    color: #fff;
    border-color: var(--rs-gold);
}

.hud-btn:active {
    border-style: inset;
}

.hud-btn.pump {
    background: linear-gradient(180deg, #6c1a40 0%, #3d0c23 100%);
    border-color: #9e2e63;
    color: #ffb3d9;
    font-weight: bold;
}
.hud-btn.pump:hover {
    background: linear-gradient(180deg, #872050 0%, #4a0e2a 100%);
    border-color: #ff55aa;
    color: #fff;
}

.hud-btn.breathe {
    background: linear-gradient(180deg, #1b4d42 0%, #0e2e27 100%);
    border-color: #2e7a69;
    color: #a3f0e0;
}
.hud-btn.breathe:hover {
    background: linear-gradient(180deg, #246657 0%, #123d34 100%);
    border-color: #55ffcc;
    color: #fff;
}

.hud-btn.bank {
    background: linear-gradient(180deg, #6e5812 0%, #382c06 100%);
    border-color: #a88820;
    color: #ffea70;
}
.hud-btn.bank:hover {
    background: linear-gradient(180deg, #8c7017 0%, #4a3a09 100%);
    border-color: #ffd700;
}

/* Sidebar Client Frame */
.hybrid-sidebar {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    background: #241e18;
    border-left: 4px ridge #655440;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.8);
    position: relative;
}

.hybrid-minimap-box {
    height: 190px;
    background: #181410;
    border-bottom: 3px ridge #5d4e3c;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hybrid-minimap-circle {
    width: 154px;
    height: 154px;
    border-radius: 50%;
    border: 3px solid #8e785c;
    background: #15110d;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 15px #000;
}

#hybrid-minimap-canvas {
    width: 100%;
    height: 100%;
}

/* Tab Strip (7 Authentic Tabs) */
.hybrid-tabs {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #1a1510;
    border-bottom: 2px solid #4a3e2e;
}

.hybrid-tab-icon {
    padding: 7px 0;
    text-align: center;
    cursor: pointer;
    font-size: 17px;
    background: #2a221b;
    border: 1px outset #504130;
    color: #ffd996;
}

.hybrid-tab-icon:hover {
    background: #3e3227;
}

.hybrid-tab-icon.active {
    background: #140f0c;
    border: 1px inset #382c1e;
    color: var(--rs-yellow);
}

.hybrid-tab-body {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    background: #201a14;
}

/* Bottom Chat Window */
.hybrid-chat-window {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    background: #1a1510;
    border-top: 4px ridge #5d4e3c;
    border-right: 4px ridge #5d4e3c;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hybrid-chat-log {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 17px;
}

.hybrid-chat-controls {
    display: flex;
    background: #14100c;
    border-top: 2px groove #4a3e2e;
    padding: 4px 8px;
    gap: 6px;
    align-items: center;
}

.chat-filter-btn {
    background: #382e22;
    border: 2px outset #665440;
    color: #ffdf9e;
    font-family: var(--rs-font);
    font-size: 16px;
    padding: 2px 10px;
    cursor: pointer;
    box-shadow: 1px 1px 0px #000;
    border-radius: 2px;
    transition: all 0.08s ease;
    text-shadow: 1px 1px 0px #000;
    line-height: 1.2;
}

.chat-filter-btn:hover {
    background: #4e4030;
    border-color: var(--rs-gold);
    color: #ffffff;
}

.chat-filter-btn.active {
    background: #1b1611;
    border: 2px inset #4a3b29;
    color: var(--rs-yellow);
    font-weight: bold;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.9);
}

.chat-filter-btn:active {
    border-style: inset;
    transform: translateY(1px);
}

#hybrid-chat-input {
    flex: 1;
    background: #100d09;
    border: 2px inset #3a2e20;
    color: #ffffff;
    font-family: var(--rs-font);
    font-size: 17px;
    padding: 3px 8px;
    outline: none;
    border-radius: 2px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#hybrid-chat-input:focus {
    border-color: var(--rs-gold);
    box-shadow: 0 0 6px rgba(255, 190, 0, 0.4), inset 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* =========================================================
   AUTHENTIC OSRS INVENTORY STYLING (28 Slots + Inspect Box)
   ========================================================= */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(7, 44px);
    gap: 4px;
    background: radial-gradient(circle, #251e17 0%, #15110d 100%);
    padding: 6px;
    border: 2px inset #100e0a;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.inv-slot {
    background: radial-gradient(circle, #3d3225 0%, #262017 100%);
    border: 1px solid #4f4130;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    font-size: 24px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.8), 1px 1px 0 rgba(255,255,255,0.05);
    transition: all 0.06s ease;
}

.inv-slot:hover {
    background: radial-gradient(circle, #5a4834 0%, #3b3021 100%);
    border-color: var(--rs-gold);
    box-shadow: 0 0 6px rgba(255, 190, 0, 0.4), inset 1px 1px 2px rgba(0,0,0,0.6);
}

.inv-slot.selected {
    border: 2px solid #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
    background: #423627;
}

.inv-slot:active {
    transform: scale(0.92);
}

.inv-count {
    position: absolute;
    bottom: 1px;
    right: 3px;
    font-family: var(--rs-pixel-font);
    font-size: 9px;
    color: var(--rs-yellow);
    text-shadow: 1px 1px 0px #000;
    pointer-events: none;
}

/* Item Inspect / Action Panel beneath Inventory */
.inv-inspect-panel {
    margin-top: 6px;
    background: #18130e;
    border: 1px solid #4a3c2a;
    padding: 8px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 80px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.6);
}

.inspect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3d3224;
    padding-bottom: 4px;
}

.inspect-name {
    font-weight: bold;
    color: var(--rs-gold);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inspect-type {
    font-size: 11px;
    color: #00ffff;
    font-family: var(--rs-pixel-font);
}

.inspect-desc {
    color: #c9bea9;
    font-size: 13px;
    line-height: 1.25;
}

.inspect-stats {
    color: #88ff88;
    font-size: 12px;
    font-weight: bold;
}

.inspect-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.inspect-btn {
    flex: 1;
    background: #3a2e21;
    border: 1px outset #6b553e;
    color: #ffdf9e;
    font-family: var(--rs-font);
    font-size: 14px;
    padding: 3px 6px;
    cursor: pointer;
    text-align: center;
}

.inspect-btn:hover {
    background: #50402e;
    border-color: var(--rs-gold);
    color: #fff;
}

/* =========================================================
   EQUIPMENT PAPER-DOLL SCREEN (Tab 5)
   ========================================================= */
.equip-paperdoll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 48px);
    gap: 6px;
    background: #16120e;
    padding: 8px;
    border: 2px inset #100d0a;
}

.equip-slot {
    background: radial-gradient(circle, #33291e 0%, #1e1812 100%);
    border: 1px solid #483928;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 22px;
    transition: all 0.08s ease;
}

.equip-slot:hover {
    border-color: var(--rs-gold);
    background: #463726;
    box-shadow: 0 0 6px rgba(255, 190, 0, 0.4);
}

.equip-slot-label {
    position: absolute;
    bottom: 1px;
    font-size: 8px;
    color: #8c7e6c;
    font-family: var(--rs-pixel-font);
    pointer-events: none;
}

.equip-stats-summary {
    margin-top: 8px;
    background: #18130e;
    border: 1px solid #4a3c2a;
    padding: 8px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* =========================================================
   SKILLS & EMOTES GRIDS
   ========================================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.skill-card {
    background: #1a1510;
    border: 1px solid #3d3224;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.08s ease;
}

.skill-card:hover {
    background: #2a221b;
    border-color: var(--rs-gold);
}

.emotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.emote-btn {
    background: #362c21;
    border: 1px outset #63523e;
    color: #ffdf9e;
    font-family: var(--rs-font);
    font-size: 15px;
    padding: 8px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
}

.emote-btn:hover {
    background: #50412e;
    color: #fff;
    border-color: var(--rs-gold);
}

.emote-btn:active {
    border-style: inset;
}

/* =========================================================
   CANVAS ACTION TOOLTIP & GATHERING CHANNEL BAR
   ========================================================= */
.canvas-action-tooltip {
    position: absolute;
    top: 10px;
    left: 12px;
    font-family: var(--rs-pixel-font);
    font-size: 10px;
    color: #00ffff;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    z-index: 60;
    background: rgba(14, 11, 8, 0.85);
    border: 1px solid #5a4b39;
    padding: 4px 8px;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.canvas-action-tooltip span.action {
    color: #ffffff;
}

.canvas-action-tooltip span.target {
    color: #ffff00;
}

.canvas-action-tooltip span.lvl {
    color: #ff7777;
}

.gathering-channel-bar {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: rgba(20, 16, 12, 0.9);
    border: 2px solid var(--rs-gold);
    padding: 6px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 210;
    box-shadow: 0 4px 12px rgba(0,0,0,0.9);
}

.channel-track {
    width: 100%;
    height: 12px;
    background: #0d0a07;
    border: 1px inset #382c1e;
    position: relative;
    overflow: hidden;
}

.channel-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff88, #ffff00);
    transition: width 0.05s linear;
}

.channel-text {
    font-family: var(--rs-pixel-font);
    font-size: 9px;
    color: var(--rs-yellow);
    text-align: center;
    text-shadow: 1px 1px #000;
}

/* =========================================================
   RIGHT-CLICK CONTEXT MENU & CROSSHAIR
   ========================================================= */
.rs-context-menu {
    position: absolute;
    background: #463d32;
    border: 2px outset #786855;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    z-index: 10000;
    min-width: 175px;
}

.rs-context-header {
    background: #2e261f;
    color: #e6dac6;
    padding: 4px 8px;
    font-size: 13px;
    border-bottom: 1px solid #5a4c3d;
    font-weight: bold;
}

.rs-context-item {
    padding: 5px 12px;
    font-size: 16px;
    color: #ffff00;
    cursor: pointer;
    text-shadow: 1px 1px #000;
}

.rs-context-item:hover {
    background: #5d5143;
    color: #fff;
}

.rs-context-item span.target {
    color: #00ffff;
}

.rs-context-item.danger {
    color: #ff4444;
}

.click-crosshair {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: crosshairFade 0.45s forwards ease-out;
}

@keyframes crosshairFade {
    0% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(0.9); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* =========================================================
   CANVAS HOVER LABEL & OSRS MODALS (Dialogue, Shop)
   ========================================================= */
.context-hover-label {
    position: absolute;
    top: 10px;
    left: 12px;
    font-family: var(--rs-pixel-font);
    font-size: 10px;
    color: #00ffff;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    z-index: 60;
    background: rgba(18, 14, 10, 0.85);
    border: 1px solid #5a4b39;
    padding: 5px 10px;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.context-hover-label span.action { color: #ffffff; }
.context-hover-label span.target { color: #ffff00; }

.rs-dialogue-modal {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 600px;
    background: #2b231a;
    border: 3px outset #6b5741;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
    padding: 12px;
    display: none;
    gap: 12px;
    z-index: 9900;
}

.rs-dialogue-avatar {
    font-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1b1611;
    border: 2px inset #483928;
    padding: 8px;
    min-width: 70px;
}

.rs-dialogue-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rs-dialogue-speaker {
    font-family: var(--rs-pixel-font);
    font-size: 11px;
    color: var(--rs-gold);
}

.rs-dialogue-text {
    font-size: 16px;
    color: #fff;
    background: #19140f;
    border: 1px solid #4a3e2e;
    padding: 8px;
    min-height: 48px;
}

.rs-dialogue-choices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rs-dialogue-opt {
    background: #3c3022;
    border: 1px outset #69543c;
    color: var(--rs-yellow);
    font-family: var(--rs-font);
    font-size: 15px;
    padding: 4px 8px;
    cursor: pointer;
    text-align: left;
}

.rs-dialogue-opt:hover {
    background: #50412e;
    border-color: var(--rs-gold);
    color: #fff;
}

.rs-shop-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    background: #282119;
    border: 3px outset #6b5741;
    box-shadow: 0 0 30px rgba(0,0,0,0.95);
    padding: 14px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
