index.css 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. /* =========
  2. Dark TV Dashboard Theme (4K, grid-hardened, NO media queries)
  3. Updated to:
  4. - show more than just "Sunny" (allow 2-line wrap for condition text)
  5. - show the full table (tighter row heights + fonts)
  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.10vh, 19px);
  23. --cond-size: clamp(17px, 1.35vh, 22px);
  24. --info-size: clamp(13px, 1.10vh, 18px);
  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 block */
  113. .weather{
  114. flex: 1 1 auto;
  115. min-width: 0;
  116. min-height: 0;
  117. display:flex;
  118. }
  119. .weatherBlock{
  120. flex: 1 1 auto;
  121. min-width: 0;
  122. min-height: 0;
  123. padding: 10px;
  124. border-radius: var(--radius-sm);
  125. background:
  126. radial-gradient(600px 240px at 20% 10%, rgba(76,201,240,0.10), transparent 60%),
  127. rgba(0,0,0,0.18);
  128. border: 1px solid rgba(255,255,255,0.08);
  129. display:flex;
  130. flex-direction:column;
  131. gap: 8px;
  132. }
  133. .weatherBlock h2{
  134. margin:0;
  135. font-size: var(--h2-size);
  136. font-weight: 820;
  137. letter-spacing: 0.5px;
  138. display:flex;
  139. align-items:center;
  140. gap: 10px;
  141. }
  142. .weatherBlock h2::before{
  143. content:"";
  144. width: 10px;
  145. height: 10px;
  146. border-radius: 50%;
  147. background: linear-gradient(135deg, var(--accent), var(--accent-2));
  148. box-shadow: 0 0 18px rgba(76,201,240,0.35);
  149. }
  150. /* Condition row (allow 2-line wrap so you see more than "Sunny") */
  151. .condition{
  152. display:flex;
  153. align-items:center;
  154. gap: 10px;
  155. padding: 8px 10px;
  156. border-radius: 14px;
  157. background: rgba(255,255,255,0.04);
  158. border: 1px solid rgba(255,255,255,0.06);
  159. min-width: 0;
  160. }
  161. .condition img{
  162. width: clamp(38px, 2.4vh, 52px);
  163. height: clamp(38px, 2.4vh, 52px);
  164. object-fit: contain;
  165. filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
  166. flex: 0 0 auto;
  167. }
  168. .conditionText{
  169. margin:0;
  170. font-size: var(--cond-size);
  171. font-weight: 700;
  172. letter-spacing: 0.15px;
  173. color: var(--text);
  174. min-width: 0;
  175. /* 2-line clamp */
  176. display: -webkit-box;
  177. -webkit-box-orient: vertical;
  178. -webkit-line-clamp: 2;
  179. overflow: hidden;
  180. line-height: 1.15;
  181. }
  182. /* Weather info list (tighter) */
  183. .weatherInfo{
  184. display:grid;
  185. grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  186. gap: 8px 10px;
  187. min-width: 0;
  188. min-height: 0;
  189. }
  190. .weatherInfo p{
  191. margin:0;
  192. padding: 8px 10px;
  193. border-radius: 14px;
  194. background: rgba(255,255,255,0.035);
  195. border: 1px solid rgba(255,255,255,0.06);
  196. font-size: var(--info-size);
  197. color: var(--muted);
  198. display:flex;
  199. align-items:center;
  200. justify-content:space-between;
  201. min-width: 0;
  202. overflow:hidden;
  203. text-overflow: ellipsis;
  204. white-space: nowrap;
  205. }
  206. #temp, #feels, #wind, #humidity{
  207. color: var(--text);
  208. font-weight: 650;
  209. }
  210. /* =========
  211. Top Right: Radar Image
  212. ========= */
  213. .topRight{
  214. padding: 12px;
  215. display:flex;
  216. align-items:center;
  217. justify-content:center;
  218. background:
  219. radial-gradient(800px 520px at 70% 10%, rgba(167,139,250,0.09), transparent 55%),
  220. rgba(0,0,0,0.10);
  221. }
  222. #radar{
  223. width:100%;
  224. height:100%;
  225. object-fit: cover;
  226. border-radius: calc(var(--radius) - 6px);
  227. border: 1px solid rgba(255,255,255,0.08);
  228. box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  229. filter: contrast(1.04) saturate(1.05);
  230. display:block;
  231. }
  232. .topRight::after{
  233. content:"Radar";
  234. position:absolute;
  235. top: 12px;
  236. left: 14px;
  237. padding: 6px 10px;
  238. font-size: 14px;
  239. letter-spacing: 0.6px;
  240. text-transform: uppercase;
  241. color: rgba(255,255,255,0.72);
  242. background: rgba(0,0,0,0.40);
  243. border: 1px solid rgba(255,255,255,0.08);
  244. border-radius: 999px;
  245. }
  246. /* =========
  247. Bottom Left: Forecast Table (shrink rows so you see Sunset)
  248. ========= */
  249. .bottomLeft{
  250. padding: 12px;
  251. display:flex;
  252. min-width: 0;
  253. min-height: 0;
  254. }
  255. table{
  256. width:100%;
  257. height:100%;
  258. border-collapse: separate;
  259. border-spacing: 0;
  260. overflow:hidden;
  261. border-radius: calc(var(--radius) - 6px);
  262. background: rgba(0,0,0,0.18);
  263. border: 1px solid rgba(255,255,255,0.08);
  264. table-layout: fixed; /* critical */
  265. }
  266. /* Header tighter */
  267. thead th{
  268. padding: 8px 8px;
  269. font-size: var(--table-head);
  270. line-height: 1.1;
  271. color: rgba(255,255,255,0.82);
  272. letter-spacing: 0.4px;
  273. text-transform: uppercase;
  274. background: linear-gradient(90deg, rgba(76,201,240,0.10), rgba(167,139,250,0.08));
  275. border-bottom: 1px solid rgba(255,255,255,0.10);
  276. overflow:hidden;
  277. text-overflow: ellipsis;
  278. white-space: nowrap;
  279. }
  280. /* Body rows tighter (this is what reveals the Sunset row) */
  281. tbody td{
  282. padding: 6px 8px;
  283. font-size: var(--table-cell);
  284. line-height: 1.1;
  285. color: var(--muted);
  286. border-bottom: 1px solid rgba(255,255,255,0.06);
  287. overflow:hidden;
  288. text-overflow: ellipsis;
  289. white-space: nowrap;
  290. }
  291. /* Left labels */
  292. tbody td:first-child{
  293. width: 44%;
  294. color: rgba(255,255,255,0.88);
  295. font-weight: 760;
  296. letter-spacing: 0.15px;
  297. background: rgba(255,255,255,0.03);
  298. border-right: 1px solid rgba(255,255,255,0.06);
  299. }
  300. /* Center the forecast values */
  301. tbody td:not(:first-child),
  302. thead th:not(:first-child){
  303. text-align:center;
  304. }
  305. /* Zebra rows */
  306. tbody tr:nth-child(odd) td{ background: rgba(255,255,255,0.018); }
  307. tbody tr:nth-child(even) td{ background: rgba(255,255,255,0.028); }
  308. tbody tr:nth-child(odd) td:first-child{ background: rgba(255,255,255,0.040); }
  309. tbody tr:nth-child(even) td:first-child{ background: rgba(255,255,255,0.055); }
  310. tbody tr:last-child td{ border-bottom: none; }
  311. /* =========
  312. Bottom Right: YouTube iframe
  313. ========= */
  314. .bottomRight{
  315. padding: 12px;
  316. background:
  317. radial-gradient(900px 600px at 20% 20%, rgba(76,201,240,0.08), transparent 55%),
  318. rgba(0,0,0,0.10);
  319. min-width: 0;
  320. min-height: 0;
  321. }
  322. .bottomRight iframe{
  323. width:100%;
  324. height:100%;
  325. border: 1px solid rgba(255,255,255,0.10);
  326. border-radius: calc(var(--radius) - 6px);
  327. box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  328. background: #000;
  329. display:block;
  330. }
  331. /* Focus styling */
  332. :focus{
  333. outline: 2px solid rgba(76,201,240,0.55);
  334. outline-offset: 2px;
  335. }