index.css 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. /* =========
  2. Dark TV Dashboard Theme (4K, grid-hardened, NO media queries)
  3. Updated:
  4. - Current weather: guaranteed fit (tighter spacing + weather block uses grid rows)
  5. - Radar: no cropping (object-fit: contain + subtle background)
  6. ========= */
  7. :root{
  8. --bg: #0b0f16;
  9. --border: rgba(255,255,255,0.10);
  10. --text: rgba(255,255,255,0.92);
  11. --muted: rgba(255,255,255,0.68);
  12. --accent: #4cc9f0;
  13. --accent-2: #a78bfa;
  14. --outer-pad: 16px;
  15. --gap: 14px;
  16. --radius: 18px;
  17. --radius-sm: 12px;
  18. --font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  19. /* Sizing tuned to fit all content in a 2x2 4K layout */
  20. --time-size: clamp(40px, 2.55vh, 62px);
  21. --date-size: clamp(16px, 1.25vh, 22px);
  22. --h2-size: clamp(15px, 1.05vh, 19px);
  23. --cond-size: clamp(16px, 1.25vh, 21px);
  24. --info-size: clamp(12px, 1.00vh, 17px);
  25. --table-head: clamp(12px, 1.00vh, 15px);
  26. --table-cell: clamp(12px, 1.05vh, 16px);
  27. }
  28. *{ box-sizing:border-box; }
  29. html, body{ height:100%; width:100%; }
  30. body{
  31. margin:0;
  32. font-family: var(--font);
  33. color: var(--text);
  34. background:
  35. radial-gradient(1200px 600px at 20% 10%, rgba(76,201,240,0.12), transparent 60%),
  36. radial-gradient(900px 500px at 85% 20%, rgba(167,139,250,0.10), transparent 55%),
  37. radial-gradient(800px 600px at 50% 100%, rgba(255,255,255,0.06), transparent 55%),
  38. var(--bg);
  39. overflow:hidden;
  40. -webkit-font-smoothing: antialiased;
  41. text-rendering: geometricPrecision;
  42. }
  43. /* =========
  44. Grid Layout (2x2 always)
  45. ========= */
  46. .grid{
  47. height:100vh;
  48. width:100vw;
  49. padding: var(--outer-pad);
  50. display:grid;
  51. grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  52. grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  53. gap: var(--gap);
  54. filter: brightness(0.98);
  55. }
  56. .grid > *{
  57. min-width: 0;
  58. min-height: 0;
  59. }
  60. .topLeft, .topRight, .bottomLeft, .bottomRight{
  61. position:relative;
  62. min-width: 0;
  63. min-height: 0;
  64. border-radius: var(--radius);
  65. background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  66. border: 1px solid var(--border);
  67. box-shadow:
  68. 0 10px 30px rgba(0,0,0,0.35),
  69. inset 0 1px 0 rgba(255,255,255,0.06);
  70. overflow:hidden;
  71. }
  72. /* =========
  73. Top Left: Date/Time + Current Weather
  74. ========= */
  75. .topLeft{
  76. display:flex;
  77. flex-direction:column;
  78. min-width: 0;
  79. min-height: 0;
  80. padding: 12px;
  81. gap: 10px;
  82. }
  83. /* Date/Time card */
  84. .dateTime{
  85. flex: 0 0 auto;
  86. min-width: 0;
  87. display:flex;
  88. flex-direction:column;
  89. gap: 4px;
  90. padding: 10px 12px;
  91. border-radius: var(--radius-sm);
  92. background: rgba(0,0,0,0.22);
  93. border: 1px solid rgba(255,255,255,0.08);
  94. }
  95. #date{
  96. margin:0;
  97. font-size: var(--date-size);
  98. letter-spacing: 0.35px;
  99. color: var(--muted);
  100. }
  101. #time{
  102. margin:0;
  103. font-size: var(--time-size);
  104. font-weight: 760;
  105. letter-spacing: 0.8px;
  106. line-height: 1.02;
  107. color: var(--text);
  108. overflow:hidden;
  109. text-overflow: ellipsis;
  110. white-space: nowrap;
  111. }
  112. /* Weather container */
  113. .weather{
  114. flex: 1 1 auto;
  115. min-width: 0;
  116. min-height: 0;
  117. display:flex;
  118. }
  119. /* Weather block: use grid rows so content *must* fit the tile */
  120. .weatherBlock{
  121. flex: 1 1 auto;
  122. min-width: 0;
  123. min-height: 0;
  124. padding: 10px;
  125. border-radius: var(--radius-sm);
  126. background:
  127. radial-gradient(600px 240px at 20% 10%, rgba(76,201,240,0.10), transparent 60%),
  128. rgba(0,0,0,0.18);
  129. border: 1px solid rgba(255,255,255,0.08);
  130. display:grid;
  131. grid-template-rows: auto auto minmax(0, 1fr);
  132. gap: 8px;
  133. }
  134. .weatherBlock h2{
  135. margin:0;
  136. font-size: var(--h2-size);
  137. font-weight: 820;
  138. letter-spacing: 0.5px;
  139. display:flex;
  140. align-items:center;
  141. gap: 10px;
  142. }
  143. .weatherBlock h2::before{
  144. content:"";
  145. width: 10px;
  146. height: 10px;
  147. border-radius: 50%;
  148. background: linear-gradient(135deg, var(--accent), var(--accent-2));
  149. box-shadow: 0 0 18px rgba(76,201,240,0.35);
  150. }
  151. /* Condition row (2-line clamp) */
  152. .condition{
  153. display:flex;
  154. align-items:center;
  155. gap: 10px;
  156. padding: 8px 10px;
  157. border-radius: 14px;
  158. background: rgba(255,255,255,0.04);
  159. border: 1px solid rgba(255,255,255,0.06);
  160. min-width: 0;
  161. }
  162. .condition img{
  163. width: clamp(34px, 2.2vh, 48px);
  164. height: clamp(34px, 2.2vh, 48px);
  165. object-fit: contain;
  166. filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
  167. flex: 0 0 auto;
  168. }
  169. .conditionText{
  170. margin:0;
  171. font-size: var(--cond-size);
  172. font-weight: 700;
  173. letter-spacing: 0.15px;
  174. color: var(--text);
  175. min-width: 0;
  176. display: -webkit-box;
  177. -webkit-box-orient: vertical;
  178. -webkit-line-clamp: 2;
  179. overflow: hidden;
  180. line-height: 1.12;
  181. }
  182. /* Weather info list: set to stretch and shrink safely inside remaining space */
  183. .weatherInfo{
  184. min-width: 0;
  185. min-height: 0;
  186. display:grid;
  187. grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  188. grid-auto-rows: 1fr; /* forces the 4 cells to share available height */
  189. gap: 8px 10px;
  190. align-content: stretch;
  191. }
  192. .weatherInfo p{
  193. margin:0;
  194. padding: 7px 10px; /* tightened to prevent bottom clipping */
  195. border-radius: 14px;
  196. background: rgba(255,255,255,0.035);
  197. border: 1px solid rgba(255,255,255,0.06);
  198. font-size: var(--info-size);
  199. line-height: 1.08;
  200. color: var(--muted);
  201. display:flex;
  202. align-items:center;
  203. justify-content:space-between;
  204. min-width: 0;
  205. min-height: 0;
  206. overflow:hidden;
  207. text-overflow: ellipsis;
  208. white-space: nowrap;
  209. }
  210. #temp, #feels, #wind, #humidity{
  211. color: var(--text);
  212. font-weight: 650;
  213. }
  214. /* =========
  215. Top Right: Radar Image (NO CROP)
  216. ========= */
  217. .topRight{
  218. padding: 12px;
  219. display:flex;
  220. align-items:center;
  221. justify-content:center;
  222. background:
  223. radial-gradient(800px 520px at 70% 10%, rgba(167,139,250,0.09), transparent 55%),
  224. rgba(0,0,0,0.10);
  225. }
  226. #radar{
  227. width:100%;
  228. height:100%;
  229. /* Key change: show the whole radar without cropping */
  230. object-fit: contain;
  231. object-position: center;
  232. border-radius: calc(var(--radius) - 6px);
  233. border: 1px solid rgba(255,255,255,0.08);
  234. box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  235. /* If the gif has transparency or odd edges, this makes letterboxing look intentional */
  236. background: rgba(0,0,0,0.22);
  237. display:block;
  238. }
  239. .topRight::after{
  240. content:"Radar";
  241. position:absolute;
  242. top: 12px;
  243. left: 14px;
  244. padding: 6px 10px;
  245. font-size: 14px;
  246. letter-spacing: 0.6px;
  247. text-transform: uppercase;
  248. color: rgba(255,255,255,0.72);
  249. background: rgba(0,0,0,0.40);
  250. border: 1px solid rgba(255,255,255,0.08);
  251. border-radius: 999px;
  252. }
  253. /* =========
  254. Bottom Left: Forecast Table (already tightened)
  255. ========= */
  256. .bottomLeft{
  257. padding: 12px;
  258. display:flex;
  259. min-width: 0;
  260. min-height: 0;
  261. }
  262. table{
  263. width:100%;
  264. height:100%;
  265. border-collapse: separate;
  266. border-spacing: 0;
  267. overflow:hidden;
  268. border-radius: calc(var(--radius) - 6px);
  269. background: rgba(0,0,0,0.18);
  270. border: 1px solid rgba(255,255,255,0.08);
  271. table-layout: fixed;
  272. }
  273. thead th{
  274. padding: 8px 8px;
  275. font-size: var(--table-head);
  276. line-height: 1.1;
  277. color: rgba(255,255,255,0.82);
  278. letter-spacing: 0.4px;
  279. text-transform: uppercase;
  280. background: linear-gradient(90deg, rgba(76,201,240,0.10), rgba(167,139,250,0.08));
  281. border-bottom: 1px solid rgba(255,255,255,0.10);
  282. overflow:hidden;
  283. text-overflow: ellipsis;
  284. white-space: nowrap;
  285. }
  286. tbody td{
  287. padding: 6px 8px;
  288. font-size: var(--table-cell);
  289. line-height: 1.1;
  290. color: var(--muted);
  291. border-bottom: 1px solid rgba(255,255,255,0.06);
  292. overflow:hidden;
  293. text-overflow: ellipsis;
  294. white-space: nowrap;
  295. }
  296. tbody td:first-child{
  297. width: 44%;
  298. color: rgba(255,255,255,0.88);
  299. font-weight: 760;
  300. letter-spacing: 0.15px;
  301. background: rgba(255,255,255,0.03);
  302. border-right: 1px solid rgba(255,255,255,0.06);
  303. }
  304. tbody td:not(:first-child),
  305. thead th:not(:first-child){
  306. text-align:center;
  307. }
  308. tbody tr:nth-child(odd) td{ background: rgba(255,255,255,0.018); }
  309. tbody tr:nth-child(even) td{ background: rgba(255,255,255,0.028); }
  310. tbody tr:nth-child(odd) td:first-child{ background: rgba(255,255,255,0.040); }
  311. tbody tr:nth-child(even) td:first-child{ background: rgba(255,255,255,0.055); }
  312. tbody tr:last-child td{ border-bottom: none; }
  313. /* =========
  314. Bottom Right: YouTube iframe
  315. ========= */
  316. .bottomRight{
  317. padding: 12px;
  318. background:
  319. radial-gradient(900px 600px at 20% 20%, rgba(76,201,240,0.08), transparent 55%),
  320. rgba(0,0,0,0.10);
  321. min-width: 0;
  322. min-height: 0;
  323. }
  324. .bottomRight iframe{
  325. width:100%;
  326. height:100%;
  327. border: 1px solid rgba(255,255,255,0.10);
  328. border-radius: calc(var(--radius) - 6px);
  329. box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  330. background: #000;
  331. display:block;
  332. }
  333. /* Focus styling */
  334. :focus{
  335. outline: 2px solid rgba(76,201,240,0.55);
  336. outline-offset: 2px;
  337. }