/* ══════════════════════════════════════════════════════════════
   daniel.py — Point & Click Game
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%; height: 100%; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #1a1a2e;
}
.hidden { display: none !important; }

/* ── Color Variables ────────────────────────────────────────── */
:root {
    --wall:      #F2EAD8;
    --wall2:     #E8DECA;
    --floor:     #C4956A;
    --floor2:    #B2855A;
    --desk-top:  #8B6347;
    --desk-body: #6B4226;
    --py-blue:   #3776AB;
    --py-yellow: #FFD43B;
    --wood:      #6B4226;
    --hud-h:     52px;
    --panel-h:   52%;
}

/* ══════════════════════════════════════════════════════════════
   HUD
   ══════════════════════════════════════════════════════════════ */
#hud {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--hud-h);
    background: linear-gradient(90deg, #1e3a5f 0%, #2d5a8e 100%);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hud-left { display: flex; align-items: center; gap: 8px; }
.hud-snake { font-size: 1.3rem; animation: bobSnake 2s ease infinite; }
@keyframes bobSnake { 0%,100%{transform:rotate(-5deg)} 50%{transform:rotate(5deg)} }
.hud-title {
    font-size: 1rem; font-weight: 800;
    color: var(--py-yellow);
    font-family: monospace; letter-spacing: -0.5px;
}
.hud-subtitle { font-size: 0.7rem; color: rgba(255,255,255,0.5); }

.hud-center { display: flex; align-items: center; gap: 8px; }
.hud-progress-label { font-size: 0.7rem; color: rgba(255,255,255,0.6); }
.hud-items { display: flex; gap: 5px; }
.hud-item {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; transition: all 0.3s ease;
}
.hud-item.found {
    background: var(--py-yellow);
    border-color: var(--py-yellow);
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(255,212,59,0.5);
}
.hud-counter { font-size: 0.75rem; font-weight: 700; color: #fff; }

.hud-skip {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff; border-radius: 6px;
    padding: 6px 14px; font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.hud-skip:hover { background: rgba(255,255,255,0.22); transform: translateX(2px); }

/* ══════════════════════════════════════════════════════════════
   GAME WRAP
   ══════════════════════════════════════════════════════════════ */
#gameWrap {
    position: fixed;
    top: var(--hud-h); left: 0; right: 0; bottom: 0;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   ROOM / SCENE
   ══════════════════════════════════════════════════════════════ */
#scene {
    position: absolute; inset: 0;
    overflow: hidden;
}

/* ── Room Structure ─────────────────────────────────────────── */
.room-ceiling {
    position: absolute; top: 0; left: 0; right: 0; height: 4%;
    background: #DDD5C0;
    border-bottom: 3px solid #C8BFA8;
}
.room-wall {
    position: absolute; top: 4%; left: 0; right: 0;
    height: 61%;
    background: linear-gradient(180deg, var(--wall) 0%, var(--wall2) 100%);
}
/* subtle wallpaper texture */
.room-wall::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,0,0,0.03) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,0,0,0.03) 40px);
}
.room-skirting {
    position: absolute; top: calc(4% + 61%); left: 0; right: 0; height: 12px;
    background: #C8B898; border-top: 2px solid #B8A888; border-bottom: 2px solid #D8C8A8;
    z-index: 2;
}
.room-floor {
    position: absolute; top: calc(4% + 61% + 12px); left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        var(--floor) 0px, var(--floor) 79px,
        var(--floor2) 79px, var(--floor2) 82px,
        var(--floor) 82px, var(--floor) 161px
    );
}
.room-floor::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 30%);
}

/* ── Decorative: Window ─────────────────────────────────────── */
.deco-window {
    position: absolute;
    left: 17%; top: 6%;
    width: 14%; height: 44%;
    background: linear-gradient(160deg, #B8D8F0 0%, #D8EEFF 50%, #A8C8E8 100%);
    border: 8px solid #8B6347;
    border-radius: 2px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.4), 2px 4px 12px rgba(0,0,0,0.2);
    z-index: 3;
    overflow: hidden;
}
.win-pane {
    position: absolute; top: 0; bottom: 0; width: 48%;
}
.win-pane.left  { left: 0; border-right: 3px solid rgba(139,99,71,0.4); }
.win-pane.right { right: 0; }
.win-shine {
    position: absolute; top: 10%; left: 10%; width: 25%; height: 60%;
    background: rgba(255,255,255,0.35); border-radius: 3px;
    transform: skewX(-5deg);
}
.win-cross-h {
    position: absolute; top: 50%; left: -8px; right: -8px; height: 6px;
    background: #8B6347; transform: translateY(-50%);
}
.win-cross-v {
    position: absolute; left: 50%; top: -8px; bottom: -8px; width: 6px;
    background: #8B6347; transform: translateX(-50%);
}
.win-light {
    position: absolute;
    left: 17%; top: 6%;
    width: 14%; height: 80%;
    background: linear-gradient(180deg, rgba(255,240,180,0.18) 0%, transparent 100%);
    pointer-events: none; z-index: 2;
}

/* ── Decorative: Plant ──────────────────────────────────────── */
.deco-plant {
    position: absolute; right: 17%; bottom: calc(35% + 44px);
    width: 45px; z-index: 6; pointer-events: none;
}
.plant-pot {
    width: 34px; height: 30px; margin: 0 auto;
    background: linear-gradient(180deg, #C45D2C, #9B4020);
    border-radius: 2px 2px 8px 8px;
    border-top: 4px solid #D47040;
}
.plant-stem {
    position: absolute; bottom: 26px; left: 50%;
    width: 3px; height: 28px;
    background: #3A7A3A; transform: translateX(-50%);
}
.plant-leaf {
    position: absolute; border-radius: 50% 0 50% 0;
    background: #4CAF50;
}
.plant-leaf.l1 { width: 22px; height: 14px; bottom: 40px; left: 16px; transform: rotate(-30deg); }
.plant-leaf.l2 { width: 22px; height: 14px; bottom: 48px; left: 10px; transform: rotate(-60deg) scaleX(-1); }
.plant-leaf.l3 { width: 18px; height: 12px; bottom: 54px; left: 18px; transform: rotate(10deg); }

/* ══════════════════════════════════════════════════════════════
   INTERACTIVE OBJECTS
   ══════════════════════════════════════════════════════════════ */
.obj {
    position: absolute;
    cursor: pointer;
    z-index: 10;
    transition: filter 0.2s, transform 0.2s;
}
.obj:hover { filter: brightness(1.1) drop-shadow(0 0 10px rgba(255,212,59,0.6)); }
.obj:hover .obj-tooltip { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.obj:active { transform: scale(0.97); }
.obj.discovered { filter: none; }

/* Tooltip */
.obj-tooltip {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%) translateY(0px);
    background: rgba(30,30,50,0.9);
    color: #fff; border-radius: 6px;
    padding: 4px 10px; font-size: 0.7rem; font-weight: 600;
    white-space: nowrap; pointer-events: none;
    opacity: 0; transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
    border: 1px solid rgba(255,212,59,0.3);
}
.obj-tooltip::after {
    content: '';
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30,30,50,0.9);
}

/* ── 1. Bookshelf ───────────────────────────────────────────── */
#obj-bookshelf {
    left: 0; top: 5%;
    width: 9%; height: 68%;
    z-index: 3;
}
#obj-bookshelf .obj-tooltip { left: 140%; transform: none; bottom: auto; top: 40%; }
#obj-bookshelf .obj-tooltip::after { display: none; }

.shelf-unit {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #7A4F2A 0%, #9B6B40 30%, #8B5E35 100%);
    border-right: 6px solid #5A3A1A;
    padding: 6px 4px;
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: inset -4px 0 8px rgba(0,0,0,0.3);
}
.shelf-row { display: flex; gap: 2px; padding: 2px 3px; flex: 1; align-items: flex-end; }
.shelf-board {
    height: 6px; background: #5A3A1A;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.book {
    border-radius: 1px 2px 2px 1px;
    flex: 1; min-width: 6px;
    box-shadow: inset -1px 0 2px rgba(0,0,0,0.3);
}
/* Book colors */
.bk1  { background: #E74C3C; height: 85%; }
.bk2  { background: #3498DB; height: 100%; }
.bk3  { background: #F39C12; height: 90%; }
.bk4  { background: #27AE60; height: 75%; }
.bk5  { background: #9B59B6; height: 95%; }
.bk6  { background: #E67E22; height: 80%; }
.bk7  { background: #1ABC9C; height: 100%; }
.bk8  { background: #E74C3C; height: 85%; }
.bk9  { background: #3776AB; height: 90%; }
.bk10 { background: #FFD43B; height: 75%; }
.bk11 { background: #E74C3C; height: 95%; }
.bk12 { background: #2C3E50; height: 100%; }
.bk13 { background: #27AE60; height: 80%; }
.bk14 { background: #9B59B6; height: 90%; }
.bk15 { background: #E67E22; height: 70%; }

/* ── 2. Calendar ────────────────────────────────────────────── */
#obj-calendar {
    left: 34%; top: 8%;
    width: 10%; height: 28%;
}
.calendar-art {
    width: 100%; height: 100%;
    background: #fff;
    border-radius: 4px;
    border: 2px solid #ccc;
    overflow: hidden;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.2);
}
.cal-header {
    background: #E74C3C;
    padding: 6px 4px 4px;
    color: #fff; font-size: 0.5rem; font-weight: 800;
    text-align: center; text-transform: uppercase; letter-spacing: 0.5px;
    position: relative;
}
.cal-rings {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-around; padding: 0 12px;
}
.cal-rings::before, .cal-rings::after {
    content: '';
    width: 5px; height: 8px;
    background: #888; border-radius: 0 0 3px 3px;
    border: 1.5px solid #666; margin-top: -2px;
}
.cal-body { padding: 4px; }
.cal-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-bottom: 2px;
}
.cal-row span {
    height: 8px; background: #f0f0f0; border-radius: 1px;
}
.cal-row span:nth-child(1) { background: #ffe0e0; }

/* ── 3. Whiteboard ──────────────────────────────────────────── */
#obj-whiteboard {
    left: 46%; top: 6%;
    width: 24%; height: 44%;
}
.board-frame {
    width: 100%; height: calc(100% - 12px);
    background: #6B4226; border-radius: 4px;
    padding: 6px;
    box-shadow: 2px 4px 16px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
}
.board-surface {
    flex: 1;
    background: #F8F8F2;
    border-radius: 2px;
    padding: 8px 10px;
    position: relative;
    overflow: hidden;
}
.board-title {
    font-size: 0.6rem; font-weight: 800; color: #2C3E50;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 4px;
}
.board-line {
    height: 3px; border-radius: 2px; margin-bottom: 6px;
    background: rgba(60,60,120,0.2);
    position: relative;
}
.board-line::before {
    content: ''; position: absolute; left: 0; top: 0;
    height: 100%; border-radius: 2px;
    background: rgba(60,60,120,0.5);
}
.board-line.l1::before { width: 90%; background: rgba(44,62,80,0.5); }
.board-line.l2::before { width: 75%; background: rgba(55,118,171,0.5); }
.board-line.l3::before { width: 82%; background: rgba(44,62,80,0.4); }
.board-line.l4::before { width: 60%; background: rgba(55,118,171,0.4); }
.board-line.l5::before { width: 70%; background: rgba(44,62,80,0.3); }
.board-tray {
    height: 12px; background: #5A3A1A;
    border-radius: 0 0 2px 2px;
    display: flex; gap: 4px; align-items: center; padding: 0 6px;
}
.marker {
    height: 6px; width: 18px; border-radius: 3px;
}
.m1 { background: #E74C3C; }
.m2 { background: #2C3E50; }
.m3 { background: #27AE60; }

/* ── 4. Trophy Shelf ────────────────────────────────────────── */
#obj-trophies {
    right: 14%; top: 8%;
    width: 12%;
}
.trophy-shelf-unit {
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
    padding-top: 8px; gap: 4px;
}
.trophy-row { display: flex; align-items: flex-end; gap: 8px; }
.trophy { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tr-cup {
    width: 18px; height: 14px;
    border-radius: 50% 50% 30% 30% / 60% 60% 30% 30%;
    border: 2px solid transparent;
}
.tr-stem { width: 4px; height: 6px; }
.tr-base { width: 14px; height: 3px; border-radius: 1px; }
.t1 .tr-cup  { background: #FFD700; border-color: #DAA520; }
.t1 .tr-stem { background: #DAA520; }
.t1 .tr-base { background: #B8860B; }
.t2 .tr-cup  { background: #C0C0C0; border-color: #A0A0A0; }
.t2 .tr-stem { background: #A0A0A0; }
.t2 .tr-base { background: #888; }
.t3 .tr-cup  { background: #3776AB; border-color: #2255880; }
.t3 .tr-cup  { background: #FFD43B; border-color: #E5A000; }
.t3 .tr-stem { background: #E5A000; }
.t3 .tr-base { background: #C88000; }
.medal { font-size: 1.4rem; margin-bottom: 4px; }
.trophy-shelf-board {
    width: 100%; height: 6px;
    background: linear-gradient(180deg, #9B6B40, #6B4226);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.trophy-label {
    font-size: 0.55rem; font-weight: 800;
    color: var(--py-blue); text-align: center;
    background: rgba(255,255,255,0.8);
    border-radius: 3px; padding: 2px 5px;
}

/* ── 5. Desk ────────────────────────────────────────────────── */
.room-desk {
    position: absolute;
    left: 8%; right: 14%;
    top: calc(4% + 56%);
    height: 14%;
    z-index: 5; pointer-events: none;
}
.desk-top {
    position: absolute; top: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(180deg, #A07848 0%, var(--desk-top) 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.desk-body {
    position: absolute; top: 35%; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #5A3A1A 0%, var(--desk-body) 20%, var(--desk-body) 80%, #5A3A1A 100%);
}
.desk-leg {
    position: absolute; bottom: 0; width: 5%; height: 55%;
    background: linear-gradient(90deg, #5A3A1A, var(--desk-body), #5A3A1A);
}
.desk-leg.left  { left: 4%; }
.desk-leg.right { right: 4%; }

/* ── 6. Monitor ─────────────────────────────────────────────── */
#obj-monitor {
    left: 33%; top: calc(4% + 51%);
    width: min(17%, 240px); z-index: 8;
}
.monitor-art { display: flex; flex-direction: column; align-items: center; }
.mon-screen {
    width: 100%;
    background: #0D1117;
    border-radius: 6px 6px 0 0;
    border: 3px solid #444;
    padding: 8px 10px;
    min-height: 80px;
    box-shadow: 0 0 20px rgba(55,118,171,0.4), inset 0 0 30px rgba(55,118,171,0.05);
    overflow: hidden;
}
.mon-line {
    font-family: monospace; font-size: 0.55rem;
    color: #cdd9e5; margin-bottom: 3px; white-space: nowrap;
    animation: typeLine 0.5s ease both;
}
.mon-line.l1 { animation-delay: 0s; }
.mon-line.l2 { animation-delay: 0.3s; }
.mon-line.l3 { animation-delay: 0.7s; }
@keyframes typeLine { from{opacity:0;transform:translateX(-4px)} to{opacity:1;transform:none} }
.mon-line .py { color: #58a6ff; }
.mon-line .gr { color: #3fb950; }
.mon-line .yw { color: #FFD43B; font-weight: 800; }
.mon-cursor {
    color: #cdd9e5; font-family: monospace; font-size: 0.55rem;
    animation: blinkCur 1s step-end infinite;
}
@keyframes blinkCur { 0%,100%{opacity:1} 50%{opacity:0} }
.mon-neck {
    width: 12px; height: 12px;
    background: linear-gradient(90deg, #333, #555, #333);
}
.mon-base {
    width: 50%; height: 8px;
    background: linear-gradient(90deg, #333, #666, #333);
    border-radius: 0 0 4px 4px;
}

/* ── 7. Coffee Mug ──────────────────────────────────────────── */
#obj-mug {
    left: 57%; top: calc(4% + 55%);
    width: min(5%, 60px); z-index: 8;
}
.mug-art { position: relative; display: flex; flex-direction: column; align-items: center; }
.mug-body {
    width: 80%;
    aspect-ratio: 0.85 / 1;
    background: linear-gradient(160deg, #fff 0%, #dde8f4 100%);
    border: 2px solid #c0c0c0;
    border-radius: 4px 4px 7px 7px;
    position: relative;
    box-shadow: inset -3px 0 6px rgba(0,0,0,0.08), 2px 3px 8px rgba(0,0,0,0.18);
}
.mug-logo {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: min(1.1rem, 20px);
    line-height: 1;
}
.mug-handle {
    position: absolute;
    right: -18%;
    top: 22%; width: 18%; height: 42%;
    border: 3px solid #b0b0b0; border-left: none;
    border-radius: 0 5px 5px 0;
}
.steam {
    position: absolute; bottom: 105%; width: 3px;
    background: rgba(200,220,240,0.6);
    border-radius: 2px;
    animation: steamRise 2s ease infinite;
}
.steam.s1 { left: 25%; height: 10px; animation-delay: 0s; }
.steam.s2 { left: 50%; height: 14px; animation-delay: 0.4s; }
.steam.s3 { left: 70%; height: 8px; animation-delay: 0.8s; }
@keyframes steamRise {
    0%   { opacity: 0; transform: translateY(0) scaleX(1); }
    30%  { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-16px) scaleX(2); }
}

/* ── 8. Phone ───────────────────────────────────────────────── */
#obj-phone {
    right: 22%; top: calc(4% + 50%);
    width: min(3.5%, 50px); z-index: 8;
}
.phone-art { display: flex; justify-content: center; }
.phone-body {
    width: 100%;
    aspect-ratio: 0.5 / 1;
    background: linear-gradient(160deg, #2C2C3E, #1A1A2E);
    border-radius: 7px;
    border: 2px solid #444;
    position: relative;
    box-shadow: 1px 2px 8px rgba(0,0,0,0.4);
    overflow: hidden;
}
.phone-screen {
    position: absolute;
    top: 8%; left: 8%; right: 8%; bottom: 20%;
    background: linear-gradient(135deg, #1a3a5f, #0d1b2e);
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
}
.ph-notif {
    background: #E74C3C; color: #fff;
    font-size: 0.4rem; font-weight: 800;
    border-radius: 3px; padding: 2px 3px;
    animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
.phone-home {
    position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%);
    width: 30%; height: 5%;
    background: #444; border-radius: 2px;
}

/* ── 9. Door ────────────────────────────────────────────────── */
#obj-door {
    right: 0; top: 4%;
    width: 9%; height: 61%;
    z-index: 7;
}
.door-art { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; }
.door-frame {
    width: 90%; height: 100%;
    background: #5A3A1A;
    border-radius: 4px 4px 0 0;
    padding: 6px 5px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}
.door-panel {
    width: 100%; height: 100%;
    background: linear-gradient(160deg, #9B6B40 0%, #7A4F2A 100%);
    border-radius: 3px 3px 0 0;
    position: relative;
    box-shadow: inset 1px 1px 4px rgba(255,255,255,0.1), inset -1px -1px 4px rgba(0,0,0,0.2);
}
.door-window {
    position: absolute;
    top: 15%; left: 15%; right: 15%; height: 28%;
    background: linear-gradient(135deg, #B8D8F0 0%, #D8EEFF 100%);
    border: 3px solid #5A3A1A;
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
}
.door-win-text {
    font-size: 0.7rem; font-weight: 800; color: #2C3E50; font-family: monospace;
}
.door-knob {
    position: absolute; left: 12%; top: 50%;
    width: 10px; height: 10px;
    background: radial-gradient(circle at 35% 35%, #FFD700, #B8860B);
    border-radius: 50%; transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── Cursor hint ─────────────────────────────────────────────── */
.cursor-hint {
    position: absolute; bottom: 12px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5); color: rgba(255,255,255,0.85);
    border-radius: 20px; padding: 6px 16px;
    font-size: 0.72rem;
    animation: hintFade 3s ease 2s forwards;
    pointer-events: none;
    z-index: 20;
}
@keyframes hintFade { to { opacity: 0; } }

/* ══════════════════════════════════════════════════════════════
   INFO PANEL
   ══════════════════════════════════════════════════════════════ */
.info-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: var(--panel-h);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.25);
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.info-panel.open { transform: translateY(0); }
.info-panel.closed { transform: translateY(100%); }

.info-panel-bar {
    display: flex; justify-content: center; padding: 8px;
    flex-shrink: 0;
}
.info-drag-hint {
    width: 36px; height: 4px; background: #DDD;
    border-radius: 2px; border: none; cursor: pointer;
}

.info-panel-head {
    display: flex; align-items: center; gap: 12px;
    padding: 0 18px 10px; flex-shrink: 0;
    border-bottom: 2px solid #F0F0F0;
}
.info-panel-icon { font-size: 1.4rem; }
.info-panel-title {
    flex: 1; font-size: 1rem; font-weight: 800; color: #1A2332;
}
.info-panel-close {
    width: 28px; height: 28px;
    background: #F0F0F0; border: none;
    border-radius: 50%; font-size: 0.8rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.info-panel-close:hover { background: #E0E0E0; }

.info-panel-body {
    flex: 1; overflow-y: auto;
    padding: 14px 18px;
    -webkit-overflow-scrolling: touch;
}

/* ── Panel content styles ────────────────────────────────────── */

/* Skills grid */
.skill-section { margin-bottom: 14px; }
.skill-sec-title {
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: #64748b; margin-bottom: 6px;
    padding-bottom: 4px; border-bottom: 1px solid #e2e8f0;
}
.skill-items { display: flex; flex-direction: column; gap: 5px; }
.skill-row { display: flex; align-items: center; gap: 8px; }
.skill-name { font-size: 0.75rem; font-weight: 600; color: #1e293b; min-width: 140px; }
.skill-bar { flex: 1; height: 7px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3776AB, #5a9fd4); transition: width 0.8s ease; }
.skill-fill.legendary { background: linear-gradient(90deg, #FFD43B, #ffa800); }
.skill-pct { font-size: 0.65rem; font-weight: 800; color: #3776AB; min-width: 30px; text-align: right; }
.skill-max { font-size: 0.55rem; font-weight: 800; color: #9a6800; background: #fff3cd; border-radius: 999px; padding: 1px 5px; }

/* Quest/Experience */
.quest-item {
    border-left: 4px solid #3776AB;
    background: #f8fafc; border-radius: 0 8px 8px 0;
    padding: 10px 14px; margin-bottom: 10px;
}
.quest-item.last { border-left-color: #ccc; }
.qi-period { font-size: 0.65rem; color: #64748b; margin-bottom: 2px; }
.qi-title  { font-size: 0.88rem; font-weight: 700; color: #1e293b; }
.qi-company{ font-size: 0.75rem; color: #3776AB; font-weight: 600; margin-bottom: 4px; }
.qi-desc   { font-size: 0.75rem; color: #475569; margin-bottom: 6px; line-height: 1.5; }
.qi-tags   { display: flex; flex-wrap: wrap; gap: 4px; }
.qi-tag    { font-size: 0.62rem; font-weight: 600; background: #eff6ff; color: #3776AB; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 7px; }

/* Formation/certs */
.form-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.form-year { font-size: 0.68rem; font-weight: 800; color: #3776AB; background: #eff6ff; border-radius: 4px; padding: 2px 6px; min-width: 62px; text-align: center; flex-shrink: 0; }
.form-year.current { background: #d1fae5; color: #065f46; animation: pulse 2s ease infinite; }
.form-title { font-size: 0.78rem; font-weight: 600; color: #1e293b; }
.form-org   { font-size: 0.67rem; color: #64748b; }

/* Cert categories */
.cert-cat { margin-bottom: 12px; }
.cert-cat-name {
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.5px; color: #3776AB;
    margin-bottom: 5px; display: flex; align-items: center; gap: 6px;
}
.cert-cat-count {
    background: #3776AB; color: #fff;
    border-radius: 999px; font-size: 0.55rem; padding: 1px 6px;
}
.cert-cloud { display: flex; flex-wrap: wrap; gap: 4px; }
.cert-pill {
    font-size: 0.65rem; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 999px; padding: 2px 8px; color: #475569;
}

/* Functions list */
.fn-item {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 6px 0; border-bottom: 1px solid #f5f5f5;
}
.fn-icon { color: #3776AB; font-weight: 700; flex-shrink: 0; font-size: 0.8rem; }
.fn-text  { font-size: 0.78rem; color: #475569; line-height: 1.5; }
.fn-title { font-weight: 700; color: #1e293b; margin-right: 4px; }

/* Profile */
.profile-info { }
.profile-bio { font-size: 0.8rem; color: #475569; margin-bottom: 12px; line-height: 1.6; }
.profile-stat-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.profile-stat { text-align: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 14px; }
.profile-stat-n { font-size: 1.2rem; font-weight: 800; color: #3776AB; display: block; }
.profile-stat-l { font-size: 0.62rem; color: #64748b; }
.lang-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lang-row  { display: flex; align-items: center; gap: 8px; }
.lang-flag { font-size: 1rem; width: 24px; text-align: center; }
.lang-name { font-size: 0.75rem; font-weight: 600; width: 60px; }
.lang-lv   { font-size: 0.65rem; color: #3776AB; font-weight: 700; width: 80px; }
.lang-dots { display: flex; gap: 3px; }
.ld        { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.ld.on     { background: #FFD43B; box-shadow: 0 0 4px rgba(255,212,59,0.5); }

/* Contact / platforms */
.contact-chips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.contact-chip  {
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px;
}
.cc-ico  { font-size: 1.1rem; width: 24px; text-align: center; }
.cc-body { flex: 1; }
.cc-type { font-size: 0.62rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.cc-val  { font-size: 0.8rem; font-weight: 600; color: #1e293b; }
.copy-btn {
    background: #eff6ff; border: 1px solid #bfdbfe;
    color: #3776AB; border-radius: 6px;
    font-size: 0.62rem; font-weight: 700; padding: 3px 8px;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.copy-btn:hover { background: #3776AB; color: #fff; }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.plat-card {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 8px 6px; text-align: center;
    text-decoration: none; transition: all 0.2s; display: block;
}
.plat-card:hover { border-color: #3776AB; background: #eff6ff; text-decoration: none; }
.plat-name { font-size: 0.68rem; font-weight: 700; color: #1e293b; display: block; }
.plat-user { font-size: 0.6rem; color: #3776AB; font-family: monospace; }

/* Door panel */
.door-info { text-align: center; padding: 10px; }
.door-info h3 { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.door-info p  { font-size: 0.8rem; color: #64748b; margin-bottom: 16px; }
.btn-go-cv {
    background: #3776AB; color: #fff;
    border: none; border-radius: 8px; padding: 10px 24px;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
}
.btn-go-cv:hover { background: #2a5d8f; transform: translateY(-2px); }

/* ── Sparkle particles ──────────────────────────────────────── */
.sparkle {
    position: fixed; pointer-events: none;
    border-radius: 50%; animation: sparkleAnim 0.7s ease forwards;
}
@keyframes sparkleAnim {
    0%   { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   CV VIEW (COMPLETO)
   ══════════════════════════════════════════════════════════════ */
#cvView {
    position: fixed; inset: 0;
    overflow-y: auto;
    background: #f0f4f8;
    z-index: 500;
}
.cv-bar {
    position: sticky; top: 0; z-index: 10;
    background: #3776AB; color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cv-bar button {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
    color: #fff; border-radius: 6px; padding: 5px 12px;
    font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.cv-bar button:hover { background: rgba(255,255,255,0.25); }
.cv-bar span { font-size: 0.82rem; font-weight: 600; }
.cv-bar a {
    background: #FFD43B; color: #1A2332;
    border-radius: 6px; padding: 5px 14px;
    font-size: 0.75rem; font-weight: 700; text-decoration: none;
}
.cv-inner { max-width: 860px; margin: 0 auto; padding: 28px 20px; }
.cv-hero {
    background: linear-gradient(135deg, #3776AB, #1a4a7a);
    color: #fff; border-radius: 12px; padding: 36px 28px;
    text-align: center; margin-bottom: 28px;
}
.cv-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.cv-hero h1 span { color: #FFD43B; }
.cv-hero p  { color: rgba(255,255,255,0.8); margin-bottom: 16px; }
.cv-contact-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cv-contact-row a {
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; border-radius: 6px; padding: 5px 12px;
    font-size: 0.75rem; text-decoration: none; transition: background 0.2s;
}
.cv-contact-row a:hover { background: rgba(255,255,255,0.22); }
.cv-sections { display: flex; flex-direction: column; gap: 24px; }
.cv-sec { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.cv-sec h2 {
    font-size: 0.9rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: #3776AB;
    border-bottom: 2px solid #FFD43B;
    padding-bottom: 6px; margin-bottom: 14px; display: inline-block;
}
#cvView footer { text-align: center; padding: 20px; color: #64748b; font-size: 0.75rem; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    :root { --panel-h: 60%; }
    #obj-whiteboard { left: 42%; width: 30%; }
    .hud-subtitle { display: none; }
    .hud-center { display: none; }
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-stat-row { gap: 6px; }
    .skill-name { min-width: 100px; }
}
