/* Lunar Village - styles (mobile-first, responsive) Created by Andy Kong */ * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } html, body { height: 100%; overflow: hidden; background: #05060f; color: #e8e8f0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; touch-action: none; user-select: none; } #game { position: fixed; inset: 0; display: block; } /* ---------- HUD ---------- */ #hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; } #topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: env(safe-area-inset-top, 8px) 10px 8px; padding-top: max(env(safe-area-inset-top), 8px); } #resources { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(10, 12, 24, 0.65); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 6px 8px; } .res { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; } .res-ic { font-size: 14px; } .pill-btn { pointer-events: auto; background: linear-gradient(135deg, #6c5ce7, #4834d4); color: #fff; border: none; border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(76, 52, 212, 0.4); white-space: nowrap; } .pill-btn:active { transform: scale(0.96); } .topbar-btns { display: flex; gap: 8px; align-items: center; } .pill-btn.ghost { background: rgba(10, 12, 24, 0.65); border: 1px solid rgba(124,246,255,0.35); box-shadow: none; color: #cffaff; } .pill-btn.profile { background: linear-gradient(135deg, #ffd166, #f0932b); color: #1a1200; box-shadow: 0 4px 14px rgba(240,147,43,0.4); } .pill-btn.announce { background: linear-gradient(135deg, #ff7675, #d63031); box-shadow: 0 4px 14px rgba(214, 48, 49, 0.4); } /* Broadcast banner */ #broadcast-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 14px 16px; padding-top: max(env(safe-area-inset-top), 14px); background: linear-gradient(180deg, rgba(214,48,49,0.95), rgba(214,48,49,0)); color: #fff; font-weight: 700; font-size: 15px; text-align: center; transform: translateY(-120%); transition: transform 0.4s ease; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,0.5); } #broadcast-banner.show { transform: translateY(0); } /* Announcement composer */ .announce-card { width: 100%; max-width: 480px; max-height: 86vh; background: linear-gradient(160deg, #1e1420, #0c0d1a); border: 1px solid rgba(255, 118, 117, 0.3); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; } .announce-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); } .announce-head h2 { font-size: 18px; } .announce-sub { font-size: 13px; color: #aab; padding: 12px 16px 0; } .announce-input-row { display: flex; gap: 8px; padding: 12px 16px; } #announce-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 12px; color: #fff; font-size: 15px; outline: none; } #announce-send { background: linear-gradient(135deg, #ff7675, #d63031); border: none; color: #fff; font-weight: 700; padding: 0 16px; border-radius: 12px; cursor: pointer; font-size: 14px; } #announce-send:disabled { opacity: 0.5; cursor: not-allowed; } #announce-send:active:not(:disabled) { transform: scale(0.95); } .announce-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; } .quick-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #cdd; border-radius: 20px; padding: 6px 10px; font-size: 12px; cursor: pointer; } .quick-chip:active { transform: scale(0.95); } .announce-results { overflow-y: auto; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 8px; } .ann-row { display: flex; gap: 10px; align-items: flex-start; } .ann-av { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; background-color: #12142a; background-size: cover; background-position: center; border: 2px solid #ff7675; } .ann-body { flex: 1; min-width: 0; } .ann-name { font-size: 12px; font-weight: 700; color: #ffb0af; } .ann-reply { font-size: 13px; color: #e8e8f0; line-height: 1.35; } .ann-reply.pending { color: #889; font-style: italic; } .ann-move-note { background: rgba(124,246,255,0.12); border: 1px solid rgba(124,246,255,0.3); color: #cffaff; font-size: 12px; font-weight: 600; padding: 8px 10px; border-radius: 10px; } #zoom-controls { position: absolute; right: 12px; top: 62px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; } .zoom-ctl { width: 40px; height: 40px; border-radius: 10px; font-size: 22px; font-weight: 700; background: rgba(10, 12, 24, 0.7); color: #fff; border: 1px solid rgba(255,255,255,0.15); cursor: pointer; line-height: 1; } .zoom-ctl:active { transform: scale(0.92); } #action-hint { position: absolute; bottom: 108px; left: 50%; transform: translateX(-50%); background: rgba(10, 12, 24, 0.7); padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; color: #ffd166; border: 1px solid rgba(255,209,102,0.3); } #action-hint:empty { display: none; } /* ---------- Mobile controls ---------- */ #joystick { position: fixed; bottom: 28px; left: 22px; width: 118px; height: 118px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.14); z-index: 20; touch-action: none; } #joystick-knob { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9b8cff, #4834d4); box-shadow: 0 4px 12px rgba(0,0,0,0.4); } #action-btn { position: fixed; bottom: 40px; right: 26px; width: 78px; height: 78px; border-radius: 50%; font-size: 30px; border: none; cursor: pointer; background: linear-gradient(135deg, #ffd166, #f0932b); box-shadow: 0 6px 20px rgba(240, 147, 43, 0.5); z-index: 20; display: none; } #action-btn.show { display: block; } #action-btn:active { transform: scale(0.93); } #enter-btn { position: fixed; bottom: 130px; right: 26px; padding: 10px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; border: none; cursor: pointer; background: linear-gradient(135deg, #7cf6ff, #38bdf8); color: #0c1020; box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4); z-index: 20; display: none; } #enter-btn.show { display: block; } #enter-btn:active { transform: scale(0.93); } /* ---------- Toast ---------- */ #toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(12, 14, 28, 0.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; border: 1px solid rgba(124, 246, 255, 0.3); opacity: 0; transition: all 0.25s ease; z-index: 40; pointer-events: none; max-width: 90vw; text-align: center; } #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } /* ---------- Modals ---------- */ .modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 4, 12, 0.72); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 14px; } .modal.show { display: flex; } .close-x { background: rgba(255,255,255,0.08); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: 0 0 auto; } .close-x:active { transform: scale(0.9); } /* ---------- Dialog ---------- */ .dialog-card { width: 100%; max-width: 460px; height: min(78vh, 620px); background: linear-gradient(160deg, #16182c, #0c0d1a); border: 1px solid rgba(124, 246, 255, 0.18); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); } .dialog-head { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); } .dialog-avatar { width: 46px; height: 46px; border-radius: 50%; background-color: #12142a; background-size: cover; background-position: center; background-repeat: no-repeat; border: 2px solid #7cf6ff; flex: 0 0 auto; } .dialog-title { flex: 1; min-width: 0; } #dialog-name { font-weight: 700; font-size: 16px; } .role { font-size: 12px; color: #9aa; text-transform: capitalize; } .ai-status { font-size: 11px; color: #7cf6ff; background: rgba(124,246,255,0.1); padding: 3px 7px; border-radius: 8px; } .chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; } .chat-line { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; word-wrap: break-word; } .chat-line.npc { align-self: flex-start; background: rgba(124, 246, 255, 0.12); border: 1px solid rgba(124,246,255,0.2); border-bottom-left-radius: 4px; } .chat-line.me { align-self: flex-end; background: linear-gradient(135deg, #6c5ce7, #4834d4); border-bottom-right-radius: 4px; } .chat-line.typing { opacity: 0.6; font-style: italic; } .chat-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,0.08); } #chat-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 11px 12px; color: #fff; font-size: 15px; outline: none; } #chat-send { background: linear-gradient(135deg, #ffd166, #f0932b); border: none; color: #1a1200; font-weight: 700; padding: 0 16px; border-radius: 12px; cursor: pointer; font-size: 14px; } #chat-send:active { transform: scale(0.95); } /* ---------- About panel ---------- */ .pill-btn.about { background: rgba(10, 12, 24, 0.65); border: 1px solid rgba(255,255,255,0.2); box-shadow: none; color: #e8e8f0; } .about-card { width: 100%; max-width: 600px; max-height: 85vh; background: linear-gradient(160deg, #16182c, #0c0d1a); border: 1px solid rgba(124, 246, 255, 0.22); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); } .about-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); flex: 0 0 auto; } .about-head h2 { font-size: 18px; } .about-body { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; } .about-section { border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: visible; flex: 0 0 auto; } .about-toggle { width: 100%; background: rgba(255,255,255,0.04); border: none; color: #e8e8f0; padding: 12px 14px; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: 12px; } .about-toggle:hover { background: rgba(255,255,255,0.07); } .about-toggle .arrow { transition: transform 0.2s; font-size: 12px; } .about-toggle.open .arrow { transform: rotate(90deg); } .about-content { display: none; padding: 10px 14px 14px; font-size: 13px; line-height: 1.6; color: #cdd; } .about-content.open { display: block; } .about-content p { margin: 0 0 8px; } .about-content ul { margin: 4px 0 8px; padding-left: 18px; } .about-content li { margin: 4px 0; } .about-content .char-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .about-content .char-dot { width: 8px; height: 8px; border-radius: 50%; background: #7cf6ff; flex: 0 0 auto; } .about-content strong { color: #ffd166; } .about-content em { color: #7cf6ff; font-style: normal; } /* ---------- Building interior view ---------- */ .interior-card { width: 100%; max-width: 800px; max-height: 88vh; background: #0c0d1a; border: 1px solid rgba(124, 246, 255, 0.22); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.7); } .interior-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); } .interior-head h2 { font-size: 16px; } .interior-scene { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; } #interior-canvas { width: 100%; height: 100%; display: block; } /* ---------- Character ability window ---------- */ .char-card { width: 100%; max-width: 440px; max-height: 88vh; background: linear-gradient(160deg, #16182c, #0c0d1a); border: 1px solid rgba(124, 246, 255, 0.22); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); } .char-head { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); } .char-title { flex: 1; min-width: 0; } #char-name { font-weight: 800; font-size: 17px; } .char-body { overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .stat-bar-row { display: flex; align-items: center; gap: 8px; } .stat-bar-label { width: 26px; font-size: 12px; font-weight: 700; color: #cdd; } .stat-bar { flex: 1; height: 12px; background: rgba(255,255,255,0.08); border-radius: 7px; overflow: hidden; } .stat-bar-fill { height: 100%; border-radius: 7px; transition: width 0.4s ease; } .stat-bar-num { width: 62px; text-align: right; font-size: 11px; color: #aab; font-variant-numeric: tabular-nums; } .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0; } .stat-chip { display: flex; justify-content: space-between; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 6px 9px; font-size: 12px; } .stat-chip b { color: #ffd166; } .stat-line { display: flex; gap: 8px; font-size: 13px; line-height: 1.35; } .stat-line .k { flex: 0 0 92px; color: #8ab; font-weight: 600; } .stat-line .v { flex: 1; color: #e8e8f0; } .stat-section { margin-top: 6px; font-size: 13px; font-weight: 800; color: #7cf6ff; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; } .rel-list, .fight-list { display: flex; flex-direction: column; gap: 4px; } .rel-row, .fight-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 5px 9px; } .rel-row .ally, .fight-row .win { color: #6ee7a8; } .rel-row .rival, .fight-row .loss { color: #ff9a9a; } .fight-row { justify-content: flex-start; gap: 10px; } .muted { font-size: 12px; color: #778; padding: 2px 2px; } .tag.injured { background: rgba(248,113,113,0.2); color: #ffb4b4; padding: 1px 6px; border-radius: 6px; font-size: 11px; } .char-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.08); } .cbtn { flex: 1 1 auto; min-width: 88px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); color: #e8e8f0; border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 700; cursor: pointer; } .cbtn.talk { background: linear-gradient(135deg, #ffd166, #f0932b); color: #1a1200; border: none; } .cbtn:active { transform: scale(0.96); } /* ---------- Missions ---------- */ .missions-card { width: 100%; max-width: 720px; max-height: 86vh; background: linear-gradient(160deg, #16182c, #0c0d1a); border: 1px solid rgba(255, 209, 102, 0.2); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; } .missions-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); } .missions-head h2 { font-size: 18px; } .missions-list { overflow-y: auto; padding: 14px; display: grid; grid-template-columns: 1fr; gap: 12px; } @media (min-width: 560px) { .missions-list { grid-template-columns: 1fr 1fr; } } .mission-card { display: flex; gap: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 10px; overflow: hidden; } .mission-card.done { border-color: rgba(46, 213, 115, 0.4); } .mission-img { width: 92px; height: 92px; border-radius: 10px; background-size: cover; background-position: center; flex: 0 0 auto; } .mission-body { flex: 1; min-width: 0; } .mission-body h3 { font-size: 15px; margin-bottom: 3px; } .mission-body p { font-size: 12px; color: #aab; line-height: 1.35; margin-bottom: 6px; } .mission-cost { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; } .cost { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.06); } .cost.ok { color: #6ee7a8; } .cost.no { color: #ff7675; } .build-btn { background: linear-gradient(135deg, #6c5ce7, #4834d4); color: #fff; border: none; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer; } .build-btn:disabled { opacity: 0.4; cursor: not-allowed; } .build-btn:active:not(:disabled) { transform: scale(0.96); } .mission-status { font-size: 12px; font-weight: 700; color: #ffd166; } .mission-card.done .mission-status { color: #6ee7a8; } .progress { height: 8px; background: rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden; margin-bottom: 5px; } .progress .bar { height: 100%; background: linear-gradient(90deg, #ffd166, #f0932b); transition: width 0.5s ease; } .credit-small { text-align: center; font-size: 11px; color: #667; padding: 8px; } /* ---------- Title ---------- */ #title { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 50% 30%, #1a1330, #05060f 70%); overflow-y: auto; } #title.show { display: flex; } .title-inner { text-align: center; max-width: 480px; width: 100%; } .title-badge { font-size: 64px; filter: drop-shadow(0 0 24px rgba(255,209,102,0.5)); } #title h1 { font-size: clamp(30px, 8vw, 46px); letter-spacing: 4px; margin: 6px 0; background: linear-gradient(135deg, #ffd166, #7cf6ff); -webkit-background-clip: text; background-clip: text; color: transparent; } .tagline { color: #aab; font-size: 14px; line-height: 1.5; margin-bottom: 20px; } .avatar-select { display: flex; gap: 16px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; } .avatar-opt { cursor: pointer; padding: 8px; border-radius: 14px; border: 2px solid transparent; transition: all 0.2s; } .avatar-opt.sel { border-color: #ffd166; background: rgba(255,209,102,0.08); } .avatar-opt:active { transform: scale(0.96); } .avatar-pic { width: 140px; height: 172px; border-radius: 18px; background-color: #161831; background-size: contain; background-position: center center; background-repeat: no-repeat; border: 3px solid rgba(255,255,255,0.15); } .avatar-opt.sel .avatar-pic { border-color: #ffd166; } .avatar-name { margin-top: 8px; font-weight: 700; font-size: 14px; } .start-btn { background: linear-gradient(135deg, #ffd166, #f0932b); color: #1a1200; border: none; padding: 14px 34px; border-radius: 14px; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(240,147,43,0.4); } .start-btn:disabled { opacity: 0.45; cursor: not-allowed; } .start-btn:active:not(:disabled) { transform: scale(0.97); } .how { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #889; } .credit { margin-top: 22px; font-size: 13px; color: #7cf6ff; font-weight: 600; } .api-key-section { margin-top: 18px; text-align: left; max-width: 380px; margin-left: auto; margin-right: auto; } .api-key-section label { display: block; font-size: 13px; font-weight: 700; color: #cdd; margin-bottom: 6px; } #api-key-input { width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: #fff; outline: none; } #api-key-input:focus { border-color: rgba(124,246,255,0.5); } .api-key-hint { font-size: 11px; color: #778; margin-top: 6px; line-height: 1.4; } .credit-small, .credit { letter-spacing: 0.3px; }