index.css 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. :root{
  2. --bg: #0b0f16;
  3. --border: rgba(255,255,255,.1);
  4. --text: rgba(255,255,255,.92);
  5. --muted: rgba(255,255,255,.68);
  6. --accent: #4cc9f0;
  7. --accent-2: #a78bfa;
  8. --outer-pad: 16px;
  9. --gap: 14px;
  10. --radius: 18px;
  11. --radius-sm: 12px;
  12. --font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  13. --time-size: clamp(40px, 2.55vh, 62px);
  14. --date-size: clamp(16px, 1.25vh, 22px);
  15. --h2-size: clamp(15px, 1.05vh, 19px);
  16. --cond-size: clamp(16px, 1.25vh, 21px);
  17. --info-size: clamp(12px, 1vh, 17px);
  18. --table-head: clamp(12px, 1vh, 15px);
  19. --table-cell: clamp(12px, 1.05vh, 16px);
  20. }
  21. *{box-sizing:border-box}
  22. html,body{height:100%;width:100%}
  23. body{
  24. margin:0;
  25. font-family:var(--font);
  26. color:var(--text);
  27. background:
  28. radial-gradient(1200px 600px at 20% 10%,rgba(76,201,240,.12),transparent 60%),
  29. radial-gradient(900px 500px at 85% 20%,rgba(167,139,250,.1),transparent 55%),
  30. radial-gradient(800px 600px at 50% 100%,rgba(255,255,255,.06),transparent 55%),
  31. var(--bg);
  32. overflow:hidden;
  33. -webkit-font-smoothing:antialiased;
  34. text-rendering:geometricPrecision
  35. }
  36. .grid{
  37. height:100vh;
  38. width:100vw;
  39. padding:var(--outer-pad);
  40. display:grid;
  41. grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);
  42. grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  43. gap:var(--gap);
  44. filter:brightness(.98)
  45. }
  46. .grid>*{min-width:0;min-height:0}
  47. .topLeft,.topRight,.bottomLeft,.bottomRight{
  48. position:relative;
  49. min-width:0;
  50. min-height:0;
  51. border-radius:var(--radius);
  52. background:linear-gradient(180deg,#ffffff0f,#ffffff08);
  53. border:1px solid var(--border);
  54. box-shadow:0 10px 30px #00000059,inset 0 1px #ffffff0f;
  55. overflow:hidden
  56. }
  57. /* -------- Top Left -------- */
  58. .topLeft{
  59. display:flex;
  60. flex-direction:column;
  61. min-width:0;
  62. min-height:0;
  63. padding:12px;
  64. gap:10px
  65. }
  66. .dateTime{
  67. flex:0 0 auto;
  68. min-width:0;
  69. display:flex;
  70. flex-direction:column;
  71. gap:4px;
  72. padding:10px 12px;
  73. border-radius:var(--radius-sm);
  74. background:#00000038;
  75. border:1px solid rgba(255,255,255,.08)
  76. }
  77. #date{
  78. margin:0;
  79. font-size:var(--date-size);
  80. letter-spacing:.35px;
  81. color:var(--muted)
  82. }
  83. #time{
  84. margin:0;
  85. font-size:var(--time-size);
  86. font-weight:760;
  87. letter-spacing:.8px;
  88. line-height:1.02;
  89. color:var(--text);
  90. overflow:hidden;
  91. text-overflow:ellipsis;
  92. white-space:nowrap
  93. }
  94. .weather{
  95. flex:1 1 auto;
  96. min-width:0;
  97. min-height:0;
  98. display:flex
  99. }
  100. .weatherBlock{
  101. flex:1 1 auto;
  102. min-width:0;
  103. min-height:0;
  104. padding:10px;
  105. border-radius:var(--radius-sm);
  106. background:radial-gradient(600px 240px at 20% 10%,rgba(76,201,240,.1),transparent 60%),#0000002e;
  107. border:1px solid rgba(255,255,255,.08);
  108. display:grid;
  109. grid-template-rows:auto auto minmax(0,1fr);
  110. gap:8px
  111. }
  112. .weatherBlock h2:before{
  113. content:"";
  114. width:10px;
  115. height:10px;
  116. border-radius:50%;
  117. background:linear-gradient(135deg,var(--accent),var(--accent-2));
  118. box-shadow:0 0 18px #4cc9f059
  119. }
  120. .condition{
  121. display:flex;
  122. align-items:center;
  123. gap:10px;
  124. padding:8px 10px;
  125. border-radius:14px;
  126. background:#ffffff0a;
  127. border:1px solid rgba(255,255,255,.06);
  128. min-width:0
  129. }
  130. .condition img{
  131. width:clamp(34px,2.2vh,48px);
  132. height:clamp(34px,2.2vh,48px);
  133. object-fit:contain;
  134. filter:drop-shadow(0 6px 10px rgba(0,0,0,.45));
  135. flex:0 0 auto
  136. }
  137. .conditionText{
  138. margin:0;
  139. font-size:var(--cond-size);
  140. font-weight:700;
  141. letter-spacing:.15px;
  142. color:var(--text);
  143. min-width:0;
  144. display:-webkit-box;
  145. -webkit-box-orient:vertical;
  146. -webkit-line-clamp:2;
  147. overflow:hidden;
  148. line-height:1.10
  149. }
  150. /* FIX 1: make weatherInfo a strict 2x2 grid so the last two rows can't get clipped */
  151. .weatherInfo{
  152. min-width:0;
  153. min-height:50px;
  154. display:grid;
  155. grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  156. grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  157. gap:6px 8px;
  158. align-content:stretch;
  159. align-items:stretch;
  160. }
  161. .weatherInfo p{
  162. margin:0;
  163. padding:6px 9px; /* slightly tighter */
  164. border-radius:14px;
  165. background:#ffffff09;
  166. border:1px solid rgba(255,255,255,.06);
  167. font-size:var(--info-size);
  168. line-height:1.00; /* tighter to stop bottom clipping */
  169. color:var(--muted);
  170. display:flex;
  171. align-items:center;
  172. justify-content:space-between;
  173. min-width:0;
  174. min-height:0;
  175. overflow:hidden;
  176. text-overflow:ellipsis;
  177. white-space:nowrap
  178. }
  179. #temp,#feels,#wind,#humidity{color:var(--text);font-weight:650}
  180. /* -------- Top Right (Radar) -------- */
  181. .topRight{
  182. padding:12px;
  183. display:flex;
  184. align-items:center;
  185. justify-content:center;
  186. background:radial-gradient(800px 520px at 70% 10%,rgba(167,139,250,.09),transparent 55%),#0000001a
  187. }
  188. /* FIX 2: slight zoom, clip a bit top/bottom */
  189. #radar{
  190. width:100%;
  191. height:100%;
  192. object-fit:scale-down; /* crop instead of letterbox */
  193. object-position:center 55%; /* trims a touch more top/bottom */
  194. transform:scale(1.5); /* very slight zoom */
  195. transform-origin:center;
  196. border-radius:calc(var(--radius) - 6px);
  197. border:1px solid rgba(255,255,255,.08);
  198. box-shadow:0 14px 40px #00000073;
  199. background:#00000038;
  200. display:block
  201. }
  202. .topRight:after{
  203. content:"Radar";
  204. position:absolute;
  205. top:12px;
  206. left:14px;
  207. padding:6px 10px;
  208. font-size:14px;
  209. letter-spacing:.6px;
  210. text-transform:uppercase;
  211. color:#ffffffb8;
  212. background:#0006;
  213. border:1px solid rgba(255,255,255,.08);
  214. border-radius:999px
  215. }
  216. /* -------- Bottom Left (Forecast) -------- */
  217. .bottomLeft{padding:12px;display:flex;min-width:0;min-height:0}
  218. table{
  219. width:100%;
  220. height:100%;
  221. border-collapse:separate;
  222. border-spacing:0;
  223. overflow:hidden;
  224. border-radius:calc(var(--radius) - 6px);
  225. background:#0000002e;
  226. border:1px solid rgba(255,255,255,.08);
  227. table-layout:fixed
  228. }
  229. thead th{
  230. padding:8px;
  231. font-size:var(--table-head);
  232. line-height:1.1;
  233. color:#ffffffd1;
  234. letter-spacing:.4px;
  235. text-transform:uppercase;
  236. background:linear-gradient(90deg,#4cc9f01a,#a78bfa14);
  237. border-bottom:1px solid rgba(255,255,255,.1);
  238. overflow:hidden;
  239. text-overflow:ellipsis;
  240. white-space:nowrap
  241. }
  242. tbody td{
  243. padding:6px 8px;
  244. font-size:var(--table-cell);
  245. line-height:1.1;
  246. color:var(--muted);
  247. border-bottom:1px solid rgba(255,255,255,.06);
  248. overflow:hidden;
  249. text-overflow:ellipsis;
  250. white-space:nowrap
  251. }
  252. tbody td:first-child{
  253. width:44%;
  254. color:#ffffffe0;
  255. font-weight:760;
  256. letter-spacing:.15px;
  257. background:#ffffff08;
  258. border-right:1px solid rgba(255,255,255,.06)
  259. }
  260. tbody td:not(:first-child),thead th:not(:first-child){text-align:center}
  261. tbody tr:nth-child(odd) td{background:#ffffff05}
  262. tbody tr:nth-child(2n) td{background:#ffffff07}
  263. tbody tr:nth-child(odd) td:first-child{background:#ffffff0a}
  264. tbody tr:nth-child(2n) td:first-child{background:#ffffff0e}
  265. tbody tr:last-child td{border-bottom:none}
  266. /* -------- Bottom Right -------- */
  267. .bottomRight{
  268. padding:12px;
  269. background:radial-gradient(900px 600px at 20% 20%,rgba(76,201,240,.08),transparent 55%),#0000001a;
  270. min-width:0;
  271. min-height:0
  272. }
  273. .bottomRight iframe{
  274. width:100%;
  275. height:100%;
  276. border:1px solid rgba(255,255,255,.1);
  277. border-radius:calc(var(--radius) - 6px);
  278. box-shadow:0 18px 50px #0000008c;
  279. background:#000;
  280. display:block
  281. }
  282. :focus{outline:2px solid rgba(76,201,240,.55);outline-offset:2px}