main.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. /* OmniSearch - Windows 98 theme
  2. - No external assets required
  3. - Classic 3D bevel controls, gray workspace, teal titlebars
  4. - Works for: home, results, images
  5. */
  6. :root {
  7. /* Win98-ish palette */
  8. --w98-face: #c0c0c0;
  9. --w98-face-2: #dfdfdf;
  10. --w98-shadow: #808080;
  11. --w98-dkshadow: #000000;
  12. --w98-hilight: #ffffff;
  13. --w98-text: #000000;
  14. --w98-blue: #000080;
  15. --w98-teal: #008080;
  16. /* Link colors reminiscent of old browsers */
  17. --w98-link: #0000ee;
  18. --w98-visited: #551a8b;
  19. /* Layout */
  20. --content-max: none;
  21. --content-pad: 16px;
  22. /* Focus */
  23. --focus-ring: 1px dotted #000000;
  24. }
  25. @media (prefers-color-scheme: dark) {
  26. /* Keep the Win98 look even if the user prefers dark mode */
  27. :root {
  28. color-scheme: light;
  29. }
  30. }
  31. *,
  32. *::before,
  33. *::after {
  34. box-sizing: border-box;
  35. }
  36. html,
  37. body {
  38. height: 100%;
  39. }
  40. body {
  41. margin: 0;
  42. padding: 0;
  43. background: var(--w98-face);
  44. color: var(--w98-text);
  45. font-family: "MS Sans Serif", Tahoma, Verdana, Arial, sans-serif;
  46. font-size: 14px;
  47. line-height: 1.35;
  48. -webkit-tap-highlight-color: transparent;
  49. }
  50. img[src=""] {
  51. display: none;
  52. }
  53. /* ---------- Utilities: Win98 Bevels ---------- */
  54. .w98-bevel {
  55. background: var(--w98-face);
  56. border-top: 2px solid var(--w98-hilight);
  57. border-left: 2px solid var(--w98-hilight);
  58. border-right: 2px solid var(--w98-shadow);
  59. border-bottom: 2px solid var(--w98-shadow);
  60. }
  61. .w98-sunken {
  62. background: var(--w98-face-2);
  63. border-top: 2px solid var(--w98-shadow);
  64. border-left: 2px solid var(--w98-shadow);
  65. border-right: 2px solid var(--w98-hilight);
  66. border-bottom: 2px solid var(--w98-hilight);
  67. }
  68. .w98-inset {
  69. background: var(--w98-hilight);
  70. border: 1px solid var(--w98-dkshadow);
  71. box-shadow:
  72. inset 1px 1px 0 var(--w98-shadow),
  73. inset -1px -1px 0 var(--w98-hilight);
  74. }
  75. .w98-titlebar {
  76. background: var(--w98-blue);
  77. color: var(--w98-hilight);
  78. padding: 6px 10px;
  79. font-weight: 700;
  80. letter-spacing: 0.2px;
  81. display: flex;
  82. align-items: center;
  83. justify-content: space-between;
  84. user-select: none;
  85. }
  86. /* Visually classic “window” container */
  87. .w98-window {
  88. background: var(--w98-face);
  89. border-top: 2px solid var(--w98-hilight);
  90. border-left: 2px solid var(--w98-hilight);
  91. border-right: 2px solid var(--w98-dkshadow);
  92. border-bottom: 2px solid var(--w98-dkshadow);
  93. box-shadow:
  94. 1px 1px 0 var(--w98-shadow),
  95. 2px 2px 0 var(--w98-shadow);
  96. }
  97. /* ---------- Links ---------- */
  98. a {
  99. color: var(--w98-link);
  100. text-decoration: underline;
  101. }
  102. a:visited {
  103. color: var(--w98-visited);
  104. }
  105. a:hover {
  106. filter: contrast(110%);
  107. }
  108. a:focus {
  109. outline: var(--focus-ring);
  110. outline-offset: 2px;
  111. }
  112. /* ---------- Form controls (classic) ---------- */
  113. input[type="text"],
  114. input[type="search"],
  115. .search-box {
  116. font-family: inherit;
  117. font-size: 14px;
  118. color: var(--w98-text);
  119. background: var(--w98-hilight);
  120. border: 1px solid var(--w98-dkshadow);
  121. box-shadow:
  122. inset 1px 1px 0 var(--w98-shadow),
  123. inset -1px -1px 0 var(--w98-hilight);
  124. border-radius: 0;
  125. padding: 6px 8px;
  126. width: 100%;
  127. }
  128. .search-box::placeholder {
  129. color: #505050;
  130. }
  131. .search-box:focus {
  132. outline: var(--focus-ring);
  133. outline-offset: 0;
  134. }
  135. /* Buttons: raised with pressed active state */
  136. button,
  137. .pagination-btn,
  138. .overlay-btn {
  139. font-family: inherit;
  140. font-size: 14px;
  141. color: var(--w98-text);
  142. background: var(--w98-face);
  143. border-top: 2px solid var(--w98-hilight);
  144. border-left: 2px solid var(--w98-hilight);
  145. border-right: 2px solid var(--w98-shadow);
  146. border-bottom: 2px solid var(--w98-shadow);
  147. border-radius: 0;
  148. padding: 6px 12px;
  149. cursor: pointer;
  150. text-decoration: none;
  151. display: inline-flex;
  152. align-items: center;
  153. justify-content: center;
  154. gap: 6px;
  155. touch-action: manipulation;
  156. }
  157. button:hover,
  158. .pagination-btn:hover,
  159. .overlay-btn:hover {
  160. filter: brightness(1.02);
  161. }
  162. button:active,
  163. .pagination-btn:active,
  164. .overlay-btn:active {
  165. border-top: 2px solid var(--w98-shadow);
  166. border-left: 2px solid var(--w98-shadow);
  167. border-right: 2px solid var(--w98-hilight);
  168. border-bottom: 2px solid var(--w98-hilight);
  169. padding: 7px 11px 5px 13px; /* tiny pressed illusion */
  170. }
  171. button:focus,
  172. .pagination-btn:focus,
  173. .overlay-btn:focus {
  174. outline: var(--focus-ring);
  175. outline-offset: 2px;
  176. }
  177. /* Preserve existing semantic classes from templates */
  178. .view-home .btn-primary,
  179. .view-home .btn-secondary {
  180. /* Same in Win98, just classic raised buttons */
  181. font-weight: 700;
  182. }
  183. .view-home a {
  184. text-decoration: none;
  185. }
  186. /* ---------- Page chrome ---------- */
  187. header {
  188. /* Turn the header into a classic “window” titlebar row + form row feel */
  189. padding: 10px 12px;
  190. background: var(--w98-face);
  191. border-bottom: 1px solid var(--w98-shadow);
  192. display: flex;
  193. align-items: center;
  194. gap: 12px;
  195. }
  196. h1 {
  197. margin: 0;
  198. font-size: 18px;
  199. font-weight: 700;
  200. letter-spacing: 0;
  201. white-space: nowrap;
  202. }
  203. h1 span {
  204. color: var(--w98-blue);
  205. }
  206. /* Search form in header */
  207. .search-form {
  208. flex: 1;
  209. max-width: 680px;
  210. }
  211. /* ---------- Home view (centered "dialog") ---------- */
  212. .view-home {
  213. min-height: 100vh;
  214. padding: 22px;
  215. display: grid;
  216. place-items: center;
  217. background: var(--w98-teal); /* desktop-like backdrop */
  218. }
  219. .view-home .container {
  220. width: 100%;
  221. max-width: 560px;
  222. padding: 0;
  223. }
  224. /* Make the home “card” look like a window */
  225. .view-home .container {
  226. background: var(--w98-face);
  227. border-top: 2px solid var(--w98-hilight);
  228. border-left: 2px solid var(--w98-hilight);
  229. border-right: 2px solid var(--w98-dkshadow);
  230. border-bottom: 2px solid var(--w98-dkshadow);
  231. box-shadow:
  232. 1px 1px 0 var(--w98-shadow),
  233. 2px 2px 0 var(--w98-shadow);
  234. padding: 0;
  235. }
  236. /* Fake titlebar via hero logo area */
  237. .view-home .hero-logo {
  238. margin: 0;
  239. padding: 8px 10px;
  240. background: var(--w98-blue);
  241. color: var(--w98-hilight);
  242. font-size: 18px;
  243. font-weight: 700;
  244. letter-spacing: 0.2px;
  245. text-align: left;
  246. }
  247. /* Ensure the <span> inside logo doesn't change titlebar legibility */
  248. .view-home .hero-logo span {
  249. color: var(--w98-hilight);
  250. }
  251. /* Body of the window */
  252. .home-search-form {
  253. padding: 14px 12px 12px 12px;
  254. }
  255. .view-home .search-input-wrapper {
  256. margin-bottom: 12px;
  257. }
  258. .view-home .search-box {
  259. box-shadow:
  260. inset 1px 1px 0 var(--w98-shadow),
  261. inset -1px -1px 0 var(--w98-hilight);
  262. padding: 6px 8px;
  263. }
  264. .view-home .buttons {
  265. display: flex;
  266. gap: 10px;
  267. justify-content: flex-start;
  268. }
  269. .view-home .buttons a {
  270. display: inline-flex;
  271. }
  272. /* ---------- Nav tabs -> classic flat toolbar links ---------- */
  273. .nav-tabs {
  274. background: var(--w98-face);
  275. border-bottom: 1px solid var(--w98-shadow);
  276. padding: 6px 12px;
  277. }
  278. .nav-container {
  279. max-width: var(--content-max);
  280. margin: 0;
  281. display: flex;
  282. gap: 10px;
  283. align-items: center;
  284. }
  285. .nav-tabs a {
  286. color: var(--w98-text);
  287. text-decoration: none;
  288. padding: 4px 10px;
  289. border: 1px solid transparent;
  290. }
  291. .nav-tabs a:hover {
  292. border-top: 1px solid var(--w98-hilight);
  293. border-left: 1px solid var(--w98-hilight);
  294. border-right: 1px solid var(--w98-shadow);
  295. border-bottom: 1px solid var(--w98-shadow);
  296. background: var(--w98-face);
  297. }
  298. .nav-tabs a.active {
  299. background: var(--w98-face-2);
  300. border-top: 1px solid var(--w98-shadow);
  301. border-left: 1px solid var(--w98-shadow);
  302. border-right: 1px solid var(--w98-hilight);
  303. border-bottom: 1px solid var(--w98-hilight);
  304. font-weight: 700;
  305. }
  306. /* ---------- Results layout ---------- */
  307. .content-layout {
  308. max-width: var(--content-max);
  309. margin: 0;
  310. padding: var(--content-pad);
  311. display: grid;
  312. grid-template-columns: minmax(0, 2.8fr) minmax(320px, 1.1fr);
  313. gap: 16px;
  314. }
  315. /* Left spacer not used in full-width layout */
  316. .sidebar-spacer {
  317. display: none;
  318. }
  319. .results-container {
  320. min-width: 0;
  321. }
  322. .result {
  323. padding: 10px 12px;
  324. margin-bottom: 12px;
  325. background: var(--w98-face);
  326. border-top: 2px solid var(--w98-hilight);
  327. border-left: 2px solid var(--w98-hilight);
  328. border-right: 2px solid var(--w98-shadow);
  329. border-bottom: 2px solid var(--w98-shadow);
  330. }
  331. .result a {
  332. font-size: 16px;
  333. font-weight: 700;
  334. display: inline-block;
  335. margin: 4px 0 3px 0;
  336. color: var(--w98-link);
  337. }
  338. .url {
  339. color: #004000;
  340. font-size: 12px;
  341. display: block;
  342. overflow-wrap: anywhere;
  343. }
  344. .desc {
  345. margin: 0;
  346. color: var(--w98-text);
  347. }
  348. /* ---------- Infobox sidebar (right “window”) ---------- */
  349. .infobox-sidebar {
  350. min-width: 0;
  351. }
  352. .infobox {
  353. background: var(--w98-face);
  354. border-top: 2px solid var(--w98-hilight);
  355. border-left: 2px solid var(--w98-hilight);
  356. border-right: 2px solid var(--w98-dkshadow);
  357. border-bottom: 2px solid var(--w98-dkshadow);
  358. box-shadow: 1px 1px 0 var(--w98-shadow);
  359. margin-bottom: 12px;
  360. }
  361. .infobox-header {
  362. background: var(--w98-blue);
  363. color: var(--w98-hilight);
  364. padding: 8px 10px;
  365. border-bottom: 1px solid var(--w98-dkshadow);
  366. }
  367. .infobox-title {
  368. margin: 0;
  369. font-size: 14px;
  370. font-weight: 700;
  371. }
  372. .infobox-main {
  373. display: flex;
  374. gap: 10px;
  375. padding: 10px;
  376. }
  377. .infobox-image {
  378. width: 96px;
  379. height: 96px;
  380. min-width: 96px;
  381. object-fit: cover;
  382. background: var(--w98-hilight);
  383. border: 1px solid var(--w98-dkshadow);
  384. box-shadow:
  385. inset 1px 1px 0 var(--w98-shadow),
  386. inset -1px -1px 0 var(--w98-hilight);
  387. }
  388. .infobox-content {
  389. display: flex;
  390. flex-direction: column;
  391. gap: 8px;
  392. min-width: 0;
  393. }
  394. .infobox-summary {
  395. margin: 0;
  396. font-size: 13px;
  397. color: var(--w98-text);
  398. }
  399. .read-more {
  400. align-self: flex-start;
  401. font-weight: 700;
  402. text-decoration: underline;
  403. color: var(--w98-link);
  404. }
  405. /* ---------- Pagination ---------- */
  406. .pagination {
  407. display: flex;
  408. gap: 10px;
  409. align-items: center;
  410. padding: 10px 0 0 0;
  411. justify-content: flex-start;
  412. }
  413. .pagination-current {
  414. color: var(--w98-text);
  415. font-size: 13px;
  416. padding: 2px 6px;
  417. background: var(--w98-face-2);
  418. border-top: 1px solid var(--w98-shadow);
  419. border-left: 1px solid var(--w98-shadow);
  420. border-right: 1px solid var(--w98-hilight);
  421. border-bottom: 1px solid var(--w98-hilight);
  422. }
  423. /* ---------- Images view ---------- */
  424. .image-results-container {
  425. max-width: var(--content-max);
  426. margin: 0 auto;
  427. padding: var(--content-pad);
  428. }
  429. .image-grid {
  430. display: grid;
  431. grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  432. gap: 12px;
  433. }
  434. .image-card {
  435. background: var(--w98-face);
  436. border-top: 2px solid var(--w98-hilight);
  437. border-left: 2px solid var(--w98-hilight);
  438. border-right: 2px solid var(--w98-shadow);
  439. border-bottom: 2px solid var(--w98-shadow);
  440. overflow: hidden;
  441. }
  442. .image-wrapper {
  443. position: relative;
  444. background: #000;
  445. aspect-ratio: 4 / 3;
  446. overflow: hidden;
  447. }
  448. .image-wrapper img {
  449. width: 100%;
  450. height: 100%;
  451. object-fit: cover;
  452. display: block;
  453. }
  454. /* Overlay: Win98-ish tooltip panel instead of modern blur */
  455. .image-overlay {
  456. position: absolute;
  457. inset: 0;
  458. background: rgba(192, 192, 192, 0.92);
  459. opacity: 0;
  460. transition: opacity 0.12s linear;
  461. display: grid;
  462. place-items: center;
  463. }
  464. .image-card:hover .image-overlay {
  465. opacity: 1;
  466. }
  467. .overlay-buttons {
  468. display: flex;
  469. flex-direction: column;
  470. gap: 8px;
  471. width: 78%;
  472. }
  473. .overlay-btn {
  474. width: 100%;
  475. font-weight: 700;
  476. color: var(--w98-text);
  477. }
  478. .overlay-btn.primary,
  479. .overlay-btn.secondary {
  480. /* identical classic button look */
  481. background: var(--w98-face);
  482. }
  483. .image-info {
  484. padding: 8px 10px;
  485. background: var(--w98-face);
  486. border-top: 1px solid var(--w98-shadow);
  487. }
  488. .image-caption {
  489. display: block;
  490. font-size: 12px;
  491. font-weight: 700;
  492. white-space: nowrap;
  493. overflow: hidden;
  494. text-overflow: ellipsis;
  495. }
  496. .image-source {
  497. display: block;
  498. font-size: 12px;
  499. color: #404040;
  500. white-space: nowrap;
  501. overflow: hidden;
  502. text-overflow: ellipsis;
  503. }
  504. /* ---------- Responsive ---------- */
  505. @media (max-width: 1100px) {
  506. .content-layout {
  507. grid-template-columns: 1fr;
  508. }
  509. .infobox-sidebar {
  510. order: -1;
  511. }
  512. }
  513. @media (max-width: 768px) {
  514. header {
  515. flex-direction: column;
  516. align-items: stretch;
  517. }
  518. .search-form {
  519. max-width: none;
  520. }
  521. .view-home {
  522. padding: 14px;
  523. }
  524. .view-home .buttons {
  525. justify-content: stretch;
  526. flex-direction: column;
  527. }
  528. .view-home .buttons button,
  529. .view-home .buttons a {
  530. width: 100%;
  531. }
  532. .image-grid {
  533. grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  534. }
  535. }
  536. @media (prefers-reduced-motion: reduce) {
  537. * {
  538. transition: none !important;
  539. }
  540. }