/* RAN Online Web client page. Unity substitutes #231F20 at build time. */
html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: #000; }
body { font-family: Tahoma, "Segoe UI", "Noto Sans Thai", sans-serif; color: #e6edf5; }

#unity-container { position: fixed; left: 0; top: 0; width: 100%; height: 100%; }
#unity-canvas { display: block; background: #231F20; outline: none; }
.unity-mobile #unity-canvas { width: 100%; height: 100%; }

/* Loading screen = the game's MapLoadingScreen prefab (constant pixel size, scale 1):
   black backdrop, lobby art stretched between the header and footer chrome, hint + status row
   bottom-left and the animated ring bottom-right. Values are the prefab's RectTransforms. */
.ran-loading { position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: none; z-index: 30; overflow: hidden;
  background: #000; transition: opacity 0.18s linear; }
.ran-loading.ran-loading-done { opacity: 0; pointer-events: none; }
.ran-loading-art { position: absolute; left: 0; right: 0; top: 139.65px; bottom: 133.85px; background: url('loading-lobby.jpg') 0 0 / 100% 100% no-repeat; }
.ran-loading-top { position: absolute; left: 0; right: 0; top: 0; height: 147px; background: url('loading-top.png') 0 0 / 100% 100% no-repeat; }
.ran-loading-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 147px; background: url('loading-bottom.png') 0 0 / 100% 100% no-repeat; }
.ran-loading-status { position: absolute; left: 10%; right: calc(5% + 142px); bottom: 43.5px; height: 60px; display: flex; align-items: center; }
.ran-loading-hint { flex: none; width: 97px; height: 60px; background: url('loading-hint.png') no-repeat; }
/* Tahoma 14 like the prefab's StatusMessage; colour matched to the rendered in-game text. */
.ran-loading-text { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.25; color: #e6e6e6; white-space: normal; }
.ran-loading-activity { position: absolute; right: calc(5% - 6.3px); bottom: 10.5px; width: 126px; height: 126px; }
.ran-loading-ring { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: url('loading-ring.png') 0 0 / 100% 100% no-repeat; }
/* Four native activity frames, 0.5 s each (LegacyLoadingPresentation.frameSeconds). */
.ran-loading-frame { position: absolute; left: 11px; top: 11px; width: 104px; height: 104px; background: url('loading-frames.png') 0 0 no-repeat;
  animation: ran-loading-frames 2s steps(4) infinite; }
@keyframes ran-loading-frames { to { background-position: -416px 0; } }

/* Errors: message panel over the same loading art */
.ran-error-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, 88vw); padding: 22px 26px;
  text-align: center; background: rgba(10, 12, 16, 0.86); border: 1px solid rgba(212, 179, 110, 0.6); border-radius: 4px; }
.ran-error-title { font-size: 18px; color: #d4b36e; }
.ran-error-text { margin: 10px 0 18px; font-size: 13px; line-height: 1.5; color: #e6e6e6; word-break: break-word; }
.ran-button { cursor: pointer; padding: 9px 26px; border-radius: 3px; border: 1px solid #d4b36e; background: rgba(212, 179, 110, 0.16); color: #f2e6c9; font-size: 15px; font-family: inherit; }
.ran-button:hover { background: rgba(212, 179, 110, 0.32); }

/* Banners from Unity (showBanner) */
#unity-warning { position: fixed; left: 50%; top: 4%; transform: translate(-50%); display: none; z-index: 40; }
.ran-banner { margin: 6px 0; padding: 10px 16px; border-radius: 6px; background: rgba(20, 40, 60, 0.92); color: #e6edf5; font-size: 14px; border: 1px solid rgba(140, 200, 255, 0.4); }
.ran-banner-warning { background: rgba(120, 90, 10, 0.92); border-color: #ffd36b; }
.ran-banner-error { background: rgba(120, 20, 20, 0.95); border-color: #ff7b7b; }

/* In-game overlay controls (bottom-right) */
#unity-footer { position: fixed; right: 10px; bottom: 8px; display: none; z-index: 10; text-align: right; }
.unity-mobile #unity-footer { display: none !important; }
#unity-build-title { display: inline-block; vertical-align: middle; margin-right: 8px; font-size: 11px; color: rgba(230, 237, 245, 0.45); }
.ran-fullscreen { display: inline-block; vertical-align: middle; cursor: pointer; width: 34px; height: 34px; border-radius: 6px; background: rgba(10, 24, 38, 0.6); border: 1px solid rgba(140, 200, 255, 0.45); position: relative; }
.ran-fullscreen::before { content: ""; position: absolute; left: 9px; top: 9px; width: 14px; height: 14px; border: 2px solid #bfe6ff; border-radius: 2px; }
.ran-fullscreen:hover { background: rgba(47, 167, 255, 0.35); }
#diagnostics-icon { vertical-align: middle; cursor: pointer; margin-right: 6px; }
