1
0

styles.css 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. :root {
  2. color-scheme: dark;
  3. --bg: #1f2328;
  4. --text: #ecf0f4;
  5. --muted-text: #bcc3cc;
  6. --panel: rgba(39, 44, 51, 0.9);
  7. --panel-strong: #323841;
  8. --card: #2d333b;
  9. --border: rgba(236, 240, 244, 0.18);
  10. --border-strong: rgba(236, 240, 244, 0.32);
  11. --focus: #d7dde5;
  12. --shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  13. }
  14. * {
  15. box-sizing: border-box;
  16. }
  17. html,
  18. body {
  19. height: 100%;
  20. }
  21. body {
  22. margin: 0;
  23. font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  24. background: var(--bg);
  25. color: var(--text);
  26. overflow: hidden;
  27. }
  28. .app {
  29. position: fixed;
  30. inset: 0;
  31. }
  32. .map {
  33. width: 100%;
  34. height: 100%;
  35. background: var(--bg);
  36. }
  37. .map-header {
  38. position: fixed;
  39. top: 1rem;
  40. left: 1rem;
  41. z-index: 3;
  42. padding: 0.75rem 0.9rem;
  43. border-radius: 12px;
  44. border: 1px solid var(--border);
  45. background: var(--panel);
  46. box-shadow: var(--shadow);
  47. backdrop-filter: blur(6px);
  48. }
  49. .map-header h1 {
  50. margin: 0;
  51. font-size: clamp(1rem, 1.9vw, 1.35rem);
  52. line-height: 1.15;
  53. }
  54. .map-header p {
  55. margin: 0.22rem 0 0;
  56. font-size: clamp(0.76rem, 1.2vw, 0.9rem);
  57. color: var(--muted-text);
  58. }
  59. .mobile-country-button,
  60. .mobile-legend-button {
  61. display: none;
  62. align-items: center;
  63. justify-content: center;
  64. position: fixed;
  65. z-index: 4;
  66. border: 1px solid var(--border);
  67. background: var(--panel);
  68. color: var(--text);
  69. border-radius: 999px;
  70. box-shadow: var(--shadow);
  71. backdrop-filter: blur(6px);
  72. cursor: pointer;
  73. }
  74. .mobile-country-button {
  75. width: 2.7rem;
  76. height: 2.7rem;
  77. font-size: 1.25rem;
  78. }
  79. .mobile-legend-button {
  80. height: 2.7rem;
  81. padding: 0 0.9rem;
  82. font-size: 0.92rem;
  83. font-weight: 600;
  84. }
  85. .country-sidebar {
  86. position: fixed;
  87. top: 6.35rem;
  88. left: 1rem;
  89. height: min(58vh, 520px);
  90. width: min(320px, calc(100vw - 2rem));
  91. display: flex;
  92. flex-direction: column;
  93. gap: 0.55rem;
  94. padding: 0.8rem;
  95. background: var(--panel);
  96. border: 1px solid var(--border);
  97. border-radius: 14px;
  98. box-shadow: var(--shadow);
  99. backdrop-filter: blur(6px);
  100. z-index: 2;
  101. }
  102. .country-sidebar h3 {
  103. margin: 0;
  104. font-size: 1rem;
  105. }
  106. .country-search {
  107. border: 1px solid var(--border);
  108. border-radius: 9px;
  109. padding: 0.52rem 0.62rem;
  110. font-size: 0.9rem;
  111. color: var(--text);
  112. background: var(--panel-strong);
  113. outline: none;
  114. }
  115. .country-search:focus {
  116. border-color: var(--focus);
  117. box-shadow: 0 0 0 3px rgba(236, 240, 244, 0.2);
  118. }
  119. .country-search::placeholder {
  120. color: var(--muted-text);
  121. }
  122. .country-list-count {
  123. margin: 0;
  124. font-size: 0.78rem;
  125. color: var(--muted-text);
  126. }
  127. .country-list {
  128. margin: 0;
  129. padding: 0;
  130. list-style: none;
  131. overflow: auto;
  132. min-height: 0;
  133. flex: 1;
  134. display: grid;
  135. gap: 0.28rem;
  136. align-content: start;
  137. }
  138. .country-list-item {
  139. width: 100%;
  140. border: 1px solid var(--border);
  141. background: var(--card);
  142. border-radius: 8px;
  143. padding: 0.38rem 0.5rem;
  144. display: flex;
  145. align-items: center;
  146. gap: 0.45rem;
  147. font-size: 0.86rem;
  148. color: var(--text);
  149. cursor: pointer;
  150. text-align: left;
  151. }
  152. .country-list-item:hover,
  153. .country-list-item:focus-visible {
  154. background: #3a414a;
  155. border-color: var(--border-strong);
  156. outline: none;
  157. }
  158. .country-list-flag {
  159. width: 1.3rem;
  160. text-align: center;
  161. }
  162. .country-list-empty {
  163. margin: 0.4rem 0;
  164. font-size: 0.84rem;
  165. color: var(--muted-text);
  166. }
  167. .country-list-modal {
  168. position: fixed;
  169. inset: 0;
  170. display: none;
  171. align-items: center;
  172. justify-content: center;
  173. padding: 0.8rem;
  174. background: rgba(0, 0, 0, 0.64);
  175. z-index: 11;
  176. }
  177. .country-list-modal.open {
  178. display: flex;
  179. }
  180. .country-list-modal-content {
  181. width: min(700px, 96vw);
  182. height: min(88vh, 800px);
  183. background: var(--card);
  184. border: 1px solid var(--border);
  185. color: var(--text);
  186. border-radius: 14px;
  187. padding: 0.85rem;
  188. box-shadow: var(--shadow);
  189. display: flex;
  190. flex-direction: column;
  191. gap: 0.55rem;
  192. }
  193. .country-list-modal-head {
  194. display: flex;
  195. align-items: center;
  196. justify-content: space-between;
  197. gap: 0.5rem;
  198. }
  199. .country-list-modal-head h2 {
  200. margin: 0;
  201. font-size: 1.04rem;
  202. }
  203. .country-list-modal-head .close {
  204. position: static;
  205. font-size: 1.35rem;
  206. line-height: 1;
  207. }
  208. .country-list-modal .country-list {
  209. flex: 1;
  210. }
  211. .map-footer {
  212. position: fixed;
  213. left: 50%;
  214. bottom: 0.55rem;
  215. transform: translateX(-50%);
  216. margin: 0;
  217. z-index: 2;
  218. font-size: 0.78rem;
  219. color: var(--muted-text);
  220. background: var(--panel);
  221. border: 1px solid var(--border);
  222. border-radius: 999px;
  223. padding: 0.34rem 0.75rem;
  224. backdrop-filter: blur(6px);
  225. white-space: nowrap;
  226. }
  227. .map-footer a {
  228. color: #e8ecf2;
  229. }
  230. .map-tooltip {
  231. position: fixed;
  232. left: 0;
  233. top: 0;
  234. z-index: 40;
  235. pointer-events: none;
  236. opacity: 0;
  237. transform: translate(8px, 8px);
  238. transition: none;
  239. background: rgba(17, 20, 24, 0.96);
  240. color: #f8fafc;
  241. border-radius: 8px;
  242. padding: 0.3rem 0.5rem;
  243. font-size: 0.8rem;
  244. line-height: 1.2;
  245. white-space: nowrap;
  246. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.55);
  247. }
  248. .map-tooltip.visible {
  249. opacity: 1;
  250. }
  251. svg {
  252. width: 100%;
  253. height: 100%;
  254. display: block;
  255. touch-action: none;
  256. cursor: grab;
  257. }
  258. svg:active {
  259. cursor: grabbing;
  260. }
  261. .country-shadow-layer {
  262. box-shadow: var(--shadow);
  263. filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.38));
  264. }
  265. .country-shadow {
  266. fill: rgba(0, 0, 0, 0.31);
  267. filter: blur(2.5px);
  268. stroke: none;
  269. pointer-events: none;
  270. }
  271. .country {
  272. stroke: rgba(21, 24, 28, 0.95);
  273. stroke-width: 0.85;
  274. vector-effect: non-scaling-stroke;
  275. stroke-linejoin: round;
  276. filter: none;
  277. outline: none !important;
  278. -webkit-tap-highlight-color: transparent;
  279. cursor: pointer;
  280. transition: opacity 0.15s ease;
  281. }
  282. .country:hover,
  283. .country:focus,
  284. .country:focus-visible {
  285. opacity: 0.75;
  286. outline: none !important;
  287. }
  288. svg [tabindex]:focus {
  289. outline: none !important;
  290. }
  291. .modal {
  292. position: fixed;
  293. inset: 0;
  294. display: none;
  295. align-items: center;
  296. justify-content: center;
  297. padding: 1rem;
  298. background: rgba(0, 0, 0, 0.66);
  299. }
  300. .modal.open {
  301. display: flex;
  302. }
  303. .modal-content {
  304. width: min(360px, 95vw);
  305. background: var(--card);
  306. border: 1px solid var(--border);
  307. color: var(--text);
  308. border-radius: 14px;
  309. padding: 1.2rem 1.2rem 1rem;
  310. box-shadow: var(--shadow);
  311. position: relative;
  312. }
  313. .modal-content h2 {
  314. margin: 0;
  315. font-size: 1.15rem;
  316. }
  317. .modal-content p {
  318. margin: 0.8rem 0 0;
  319. font-size: 1.05rem;
  320. }
  321. .close {
  322. position: absolute;
  323. top: 0.55rem;
  324. right: 0.55rem;
  325. border: none;
  326. background: transparent;
  327. font-size: 1.45rem;
  328. line-height: 1;
  329. cursor: pointer;
  330. color: var(--muted-text);
  331. }
  332. .close:hover,
  333. .close:focus-visible {
  334. color: var(--text);
  335. }
  336. .legend {
  337. position: fixed;
  338. right: 1rem;
  339. background: var(--panel);
  340. border: 1px solid var(--border);
  341. border-radius: 12px;
  342. padding: 0.7rem 0.8rem;
  343. width: min(330px, calc(100vw - 2rem));
  344. box-shadow: var(--shadow);
  345. backdrop-filter: blur(6px);
  346. }
  347. .legend {
  348. top: 1rem;
  349. }
  350. .legend h3 {
  351. margin: 0 0 0.45rem;
  352. font-size: 0.95rem;
  353. }
  354. .legend ul {
  355. margin: 0;
  356. padding: 0;
  357. list-style: none;
  358. display: grid;
  359. gap: 0.32rem;
  360. }
  361. .legend li {
  362. display: flex;
  363. align-items: center;
  364. gap: 0.45rem;
  365. font-size: 0.86rem;
  366. }
  367. .legend-swatch {
  368. width: 12px;
  369. height: 12px;
  370. border-radius: 2px;
  371. border: 1px solid rgba(226, 232, 240, 0.24);
  372. flex: 0 0 12px;
  373. }
  374. .country-category {
  375. margin-top: 0.45rem;
  376. margin-bottom: 0.2rem;
  377. font-weight: 600;
  378. color: var(--text);
  379. }
  380. .country-data {
  381. margin-top: 0.45rem;
  382. max-height: min(48vh, 360px);
  383. overflow: auto;
  384. padding-right: 0.25rem;
  385. }
  386. .country-data-row {
  387. display: grid;
  388. grid-template-columns: 132px 1fr;
  389. gap: 0.5rem;
  390. margin-bottom: 0.42rem;
  391. font-size: 0.92rem;
  392. line-height: 1.3;
  393. }
  394. .country-data-row strong {
  395. color: #c8ced6;
  396. }
  397. .country-data-row span {
  398. color: var(--text);
  399. white-space: pre-line;
  400. }
  401. @media (max-width: 760px) {
  402. .country-search {
  403. font-size: 16px;
  404. }
  405. .map-header {
  406. top: 0.6rem;
  407. left: 0.6rem;
  408. right: 0.6rem;
  409. }
  410. .mobile-country-button,
  411. .mobile-legend-button {
  412. display: inline-flex;
  413. top: 5.1rem;
  414. }
  415. .mobile-country-button {
  416. left: 0.6rem;
  417. }
  418. .mobile-legend-button {
  419. right: 0.6rem;
  420. }
  421. .country-sidebar {
  422. display: none;
  423. }
  424. .legend {
  425. right: 0.6rem;
  426. width: min(290px, calc(100vw - 1.2rem));
  427. top: 8.5rem;
  428. max-height: min(58vh, 430px);
  429. overflow: auto;
  430. display: none;
  431. }
  432. .legend.mobile-open {
  433. display: block;
  434. }
  435. .country-list-modal {
  436. padding: 0.6rem;
  437. }
  438. .country-list-modal-content {
  439. width: 100%;
  440. height: min(90vh, 820px);
  441. }
  442. .map-footer {
  443. max-width: calc(100vw - 1.2rem);
  444. overflow: hidden;
  445. text-overflow: ellipsis;
  446. white-space: nowrap;
  447. font-size: 0.72rem;
  448. }
  449. .country-data-row {
  450. grid-template-columns: 1fr;
  451. gap: 0.15rem;
  452. }
  453. }