/**
 * object-quest/object-quest.css
 * Fog of War + Magnifying Glass identity styles for Object Quest.
 */

:root {
    --game-accent: #15803d;
    --game-accent-dim: #166534;
    --game-accent-contrast: #f0fdf4;
    --oq-bg: #091a10;
    --oq-card-bg: #14281d;
    --oq-border: #1e3a29;
    --oq-fog-color: rgba(15, 28, 20, 0.92);
    --oq-trail-color: rgba(74, 222, 128, 0.5);
    --oq-pin-color: #22c55e;
}

body.game-standalone.cosy-game-theme {
    background-color: var(--oq-bg);
    color: #f0fdf4;
}

.oq-game-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--oq-card-bg);
    border-radius: 16px;
    border: 2px solid var(--oq-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    max-width: 950px;
    margin: 1rem auto 0 auto;
    position: relative;
    box-sizing: border-box;
}

.oq-score-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(9, 26, 16, 0.8);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
}

.oq-sb-item {
    font-size: 0.95rem;
    color: #a7f3d0;
}

.oq-sb-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--game-accent-contrast);
}

/* Scene Search Board Canvas */
.oq-scene-board {
    position: relative;
    width: 100%;
    height: 380px;
    background: radial-gradient(circle at 50% 50%, #1e3a2b 0%, #0d1e14 100%);
    border-radius: 14px;
    border: 2px solid var(--oq-border);
    overflow: hidden;
    user-select: none;
    touch-action: none;
    cursor: crosshair;
}

/* Base Scene Grid with Hidden Objects */
.oq-scene-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    z-index: 1;
}

.oq-target-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(74, 222, 128, 0.25);
    border-radius: 12px;
    padding: 0.5rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.oq-target-item.found {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid var(--oq-pin-color);
}

.oq-item-emoji {
    font-size: 2.2rem;
    user-select: none;
}

.oq-item-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 0.2rem;
    text-align: center;
}

/* Canvas Fog Overlay Layer */
.oq-fog-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* SVG Dotted Trail Overlay Layer */
.oq-trail-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.oq-trail-line {
    fill: none;
    stroke: var(--oq-trail-color);
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 6 6;
}

/* Discovered Permanent Pin Drop Markers */
.oq-marker-pin {
    position: absolute;
    z-index: 4;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -14px;
    background: radial-gradient(circle at 35% 35%, #4ade80, #15803d);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
    pointer-events: none;
}

/* Magnifying Glass Lens UI Ring */
.oq-lens-ring {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    border: 3px solid var(--game-accent-contrast);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--game-accent), 0 0 20px rgba(34, 197, 94, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.2);
    display: none;
    transform: translate(-50%, -50%);
}

.oq-lens-ring.active {
    display: block;
}

/* Responsive Overrides */

/* Phone Context (data-context="phone") */
[data-context="phone"] .oq-game-wrapper {
    padding: 0.85rem;
    border-radius: 10px;
}

[data-context="phone"] .oq-scene-board {
    height: 300px;
}

[data-context="phone"] .oq-scene-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
}

[data-context="phone"] .oq-item-emoji {
    font-size: 1.6rem;
}

/* Projector Context (data-context="projector") */
[data-context="projector"] .oq-scene-board {
    height: 460px;
}

[data-context="projector"] .oq-item-emoji {
    font-size: 3rem;
}

[data-context="projector"] .oq-item-label {
    font-size: 1.1rem;
}
