index.css 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. position: relative;
  77. }
  78. #date{
  79. margin:0;
  80. font-size:var(--date-size);
  81. letter-spacing:.35px;
  82. color:var(--muted)
  83. }
  84. #time{
  85. margin:0;
  86. font-size:var(--time-size);
  87. font-weight:760;
  88. letter-spacing:.8px;
  89. line-height:1.02;
  90. color:var(--text);
  91. overflow:hidden;
  92. text-overflow:ellipsis;
  93. white-space:nowrap
  94. }
  95. .weather{
  96. flex:1 1 auto;
  97. min-width:0;
  98. min-height:0;
  99. display:flex
  100. }
  101. .weatherBlock{
  102. flex:1 1 auto;
  103. min-width:0;
  104. min-height:0;
  105. padding:10px;
  106. border-radius:var(--radius-sm);
  107. background:radial-gradient(600px 240px at 20% 10%,rgba(76,201,240,.1),transparent 60%),#0000002e;
  108. border:1px solid rgba(255,255,255,.08);
  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. #conditionLogo{
  121. height: 100%;
  122. position: absolute;
  123. top: 0;
  124. right: 0;
  125. }
  126. /* FIX 1: make weatherInfo a strict 2x2 grid so the last two rows can't get clipped */
  127. .weatherInfo{
  128. height: 100%;
  129. display:grid;
  130. grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  131. grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  132. gap:6px 8px;
  133. align-content:stretch;
  134. align-items:stretch;
  135. }
  136. .weatherInfo p{
  137. margin:0;
  138. padding:6px 9px; /* slightly tighter */
  139. border-radius:14px;
  140. background:#ffffff09;
  141. border:1px solid rgba(255,255,255,.06);
  142. font-size:var(--info-size);
  143. line-height:1.00; /* tighter to stop bottom clipping */
  144. color:var(--muted);
  145. display:flex;
  146. align-items:center;
  147. justify-content:center;
  148. min-width:0;
  149. min-height:0;
  150. overflow:hidden;
  151. text-overflow:ellipsis;
  152. white-space:nowrap
  153. }
  154. #temp,#feels,#wind,#humidity{color:var(--text);font-weight:650}
  155. /* -------- Top Right (Radar) -------- */
  156. .topRight{
  157. padding:12px;
  158. display:flex;
  159. align-items:center;
  160. justify-content:center;
  161. background:radial-gradient(800px 520px at 70% 10%,rgba(167,139,250,.09),transparent 55%),#0000001a
  162. }
  163. /* FIX 2: slight zoom, clip a bit top/bottom */
  164. #radar{
  165. width:100%;
  166. height:100%;
  167. object-fit:scale-down; /* crop instead of letterbox */
  168. object-position:center 55%; /* trims a touch more top/bottom */
  169. transform:scale(1.5); /* very slight zoom */
  170. transform-origin:center;
  171. border-radius:calc(var(--radius) - 6px);
  172. border:1px solid rgba(255,255,255,.08);
  173. box-shadow:0 14px 40px #00000073;
  174. background:#00000038;
  175. display:block
  176. }
  177. .topRight:after{
  178. content:"Radar";
  179. position:absolute;
  180. top:12px;
  181. left:14px;
  182. padding:6px 10px;
  183. font-size:14px;
  184. letter-spacing:.6px;
  185. text-transform:uppercase;
  186. color:#ffffffb8;
  187. background:#0006;
  188. border:1px solid rgba(255,255,255,.08);
  189. border-radius:999px
  190. }
  191. /* -------- Bottom Left (Forecast) -------- */
  192. .bottomLeft{padding:12px;display:flex;min-width:0;min-height:0}
  193. table{
  194. width:100%;
  195. height:100%;
  196. border-collapse:separate;
  197. border-spacing:0;
  198. overflow:hidden;
  199. border-radius:calc(var(--radius) - 6px);
  200. background:#0000002e;
  201. border:1px solid rgba(255,255,255,.08);
  202. table-layout:fixed
  203. }
  204. thead th{
  205. padding:8px;
  206. font-size:var(--table-head);
  207. line-height:1.1;
  208. color:#ffffffd1;
  209. letter-spacing:.4px;
  210. text-transform:uppercase;
  211. background:linear-gradient(90deg,#4cc9f01a,#a78bfa14);
  212. border-bottom:1px solid rgba(255,255,255,.1);
  213. overflow:hidden;
  214. text-overflow:ellipsis;
  215. white-space:nowrap
  216. }
  217. tbody td{
  218. padding:6px 8px;
  219. font-size:var(--table-cell);
  220. line-height:1.1;
  221. color:var(--muted);
  222. border-bottom:1px solid rgba(255,255,255,.06);
  223. overflow:hidden;
  224. text-overflow:ellipsis;
  225. white-space:nowrap
  226. }
  227. tbody td:first-child{
  228. width:44%;
  229. color:#ffffffe0;
  230. font-weight:760;
  231. letter-spacing:.15px;
  232. background:#ffffff08;
  233. border-right:1px solid rgba(255,255,255,.06)
  234. }
  235. tbody td:not(:first-child),thead th:not(:first-child){text-align:center}
  236. tbody tr:nth-child(odd) td{background:#ffffff05}
  237. tbody tr:nth-child(2n) td{background:#ffffff07}
  238. tbody tr:nth-child(odd) td:first-child{background:#ffffff0a}
  239. tbody tr:nth-child(2n) td:first-child{background:#ffffff0e}
  240. tbody tr:last-child td{border-bottom:none}
  241. /* -------- Bottom Right -------- */
  242. .bottomRight{
  243. padding:12px;
  244. background:radial-gradient(900px 600px at 20% 20%,rgba(76,201,240,.08),transparent 55%),#0000001a;
  245. min-width:0;
  246. min-height:0
  247. }
  248. .bottomRight iframe{
  249. width:100%;
  250. height:100%;
  251. border:1px solid rgba(255,255,255,.1);
  252. border-radius:calc(var(--radius) - 6px);
  253. box-shadow:0 18px 50px #0000008c;
  254. background:#000;
  255. display:block
  256. }
  257. :focus{outline:2px solid rgba(76,201,240,.55);outline-offset:2px}