main.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  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. /* Embed mode: when URL fragment contains #embed, the homepage toggles this on <body> */
  220. body.embed .view-home {
  221. min-height: auto;
  222. padding: 0;
  223. }
  224. .view-home .container {
  225. width: 100%;
  226. max-width: 560px;
  227. padding: 0;
  228. }
  229. /* Make the home “card” look like a window */
  230. .view-home .container {
  231. background: var(--w98-face);
  232. border-top: 2px solid var(--w98-hilight);
  233. border-left: 2px solid var(--w98-hilight);
  234. border-right: 2px solid var(--w98-dkshadow);
  235. border-bottom: 2px solid var(--w98-dkshadow);
  236. box-shadow:
  237. 1px 1px 0 var(--w98-shadow),
  238. 2px 2px 0 var(--w98-shadow);
  239. padding: 0;
  240. }
  241. /* Fake titlebar via hero logo area */
  242. .view-home .hero-logo {
  243. margin: 0;
  244. padding: 8px 10px;
  245. background: var(--w98-blue);
  246. color: var(--w98-hilight);
  247. font-size: 18px;
  248. font-weight: 700;
  249. letter-spacing: 0.2px;
  250. text-align: left;
  251. }
  252. /* Ensure the <span> inside logo doesn't change titlebar legibility */
  253. .view-home .hero-logo span {
  254. color: var(--w98-hilight);
  255. }
  256. /* Body of the window */
  257. .home-search-form {
  258. padding: 14px 12px 12px 12px;
  259. }
  260. .view-home .search-input-wrapper {
  261. margin-bottom: 12px;
  262. }
  263. .view-home .search-box {
  264. box-shadow:
  265. inset 1px 1px 0 var(--w98-shadow),
  266. inset -1px -1px 0 var(--w98-hilight);
  267. padding: 6px 8px;
  268. }
  269. .view-home .buttons {
  270. display: flex;
  271. gap: 10px;
  272. justify-content: flex-start;
  273. }
  274. .view-home .buttons a {
  275. display: inline-flex;
  276. }
  277. /* ---------- Nav tabs -> classic flat toolbar links ---------- */
  278. .nav-tabs {
  279. background: var(--w98-face);
  280. border-bottom: 1px solid var(--w98-shadow);
  281. padding: 6px 12px;
  282. }
  283. .nav-container {
  284. max-width: var(--content-max);
  285. margin: 0;
  286. display: flex;
  287. gap: 10px;
  288. align-items: center;
  289. }
  290. .nav-tabs a {
  291. color: var(--w98-text);
  292. text-decoration: none;
  293. padding: 4px 10px;
  294. border: 1px solid transparent;
  295. }
  296. .nav-tabs a:hover {
  297. border-top: 1px solid var(--w98-hilight);
  298. border-left: 1px solid var(--w98-hilight);
  299. border-right: 1px solid var(--w98-shadow);
  300. border-bottom: 1px solid var(--w98-shadow);
  301. background: var(--w98-face);
  302. }
  303. .nav-tabs a.active {
  304. background: var(--w98-face-2);
  305. border-top: 1px solid var(--w98-shadow);
  306. border-left: 1px solid var(--w98-shadow);
  307. border-right: 1px solid var(--w98-hilight);
  308. border-bottom: 1px solid var(--w98-hilight);
  309. font-weight: 700;
  310. }
  311. /* ---------- Results layout ---------- */
  312. .content-layout {
  313. max-width: var(--content-max);
  314. margin: 0;
  315. padding: var(--content-pad);
  316. display: grid;
  317. grid-template-columns: minmax(0, 2.8fr) minmax(320px, 1.1fr);
  318. gap: 16px;
  319. }
  320. /* Left spacer not used in full-width layout */
  321. .sidebar-spacer {
  322. display: none;
  323. }
  324. .results-container {
  325. min-width: 0;
  326. }
  327. .result {
  328. padding: 10px 12px;
  329. margin-bottom: 12px;
  330. background: var(--w98-face);
  331. border-top: 2px solid var(--w98-hilight);
  332. border-left: 2px solid var(--w98-hilight);
  333. border-right: 2px solid var(--w98-shadow);
  334. border-bottom: 2px solid var(--w98-shadow);
  335. }
  336. .result a {
  337. font-size: 16px;
  338. font-weight: 700;
  339. display: inline-block;
  340. margin: 4px 0 3px 0;
  341. color: var(--w98-link);
  342. }
  343. .url {
  344. color: #004000;
  345. font-size: 12px;
  346. display: block;
  347. overflow-wrap: anywhere;
  348. }
  349. .desc {
  350. margin: 0;
  351. color: var(--w98-text);
  352. }
  353. /* ---------- Infobox sidebar (right “window”) ---------- */
  354. .infobox-sidebar {
  355. min-width: 0;
  356. }
  357. .infobox {
  358. background: var(--w98-face);
  359. border-top: 2px solid var(--w98-hilight);
  360. border-left: 2px solid var(--w98-hilight);
  361. border-right: 2px solid var(--w98-dkshadow);
  362. border-bottom: 2px solid var(--w98-dkshadow);
  363. box-shadow: 1px 1px 0 var(--w98-shadow);
  364. margin-bottom: 12px;
  365. }
  366. .infobox-header {
  367. background: var(--w98-blue);
  368. color: var(--w98-hilight);
  369. padding: 8px 10px;
  370. border-bottom: 1px solid var(--w98-dkshadow);
  371. }
  372. .infobox-title {
  373. margin: 0;
  374. font-size: 14px;
  375. font-weight: 700;
  376. }
  377. .infobox-main {
  378. display: flex;
  379. gap: 10px;
  380. padding: 10px;
  381. }
  382. .infobox-image {
  383. width: 96px;
  384. height: 96px;
  385. min-width: 96px;
  386. object-fit: cover;
  387. background: var(--w98-hilight);
  388. border: 1px solid var(--w98-dkshadow);
  389. box-shadow:
  390. inset 1px 1px 0 var(--w98-shadow),
  391. inset -1px -1px 0 var(--w98-hilight);
  392. }
  393. .infobox-content {
  394. display: flex;
  395. flex-direction: column;
  396. gap: 8px;
  397. min-width: 0;
  398. }
  399. .infobox-summary {
  400. margin: 0;
  401. font-size: 13px;
  402. color: var(--w98-text);
  403. }
  404. .read-more {
  405. align-self: flex-start;
  406. font-weight: 700;
  407. text-decoration: underline;
  408. color: var(--w98-link);
  409. }
  410. /* ---------- Pagination ---------- */
  411. .pagination {
  412. display: flex;
  413. gap: 10px;
  414. align-items: center;
  415. padding: 10px 0 0 0;
  416. justify-content: flex-start;
  417. }
  418. .pagination-current {
  419. color: var(--w98-text);
  420. font-size: 13px;
  421. padding: 2px 6px;
  422. background: var(--w98-face-2);
  423. border-top: 1px solid var(--w98-shadow);
  424. border-left: 1px solid var(--w98-shadow);
  425. border-right: 1px solid var(--w98-hilight);
  426. border-bottom: 1px solid var(--w98-hilight);
  427. }
  428. /* ---------- Images view ---------- */
  429. .image-results-container {
  430. max-width: var(--content-max);
  431. margin: 0 auto;
  432. padding: var(--content-pad);
  433. }
  434. .image-grid {
  435. display: grid;
  436. grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  437. gap: 12px;
  438. }
  439. .image-card {
  440. background: var(--w98-face);
  441. border-top: 2px solid var(--w98-hilight);
  442. border-left: 2px solid var(--w98-hilight);
  443. border-right: 2px solid var(--w98-shadow);
  444. border-bottom: 2px solid var(--w98-shadow);
  445. overflow: hidden;
  446. }
  447. .image-wrapper {
  448. position: relative;
  449. background: #000;
  450. aspect-ratio: 4 / 3;
  451. overflow: hidden;
  452. }
  453. .image-wrapper img {
  454. width: 100%;
  455. height: 100%;
  456. object-fit: cover;
  457. display: block;
  458. }
  459. /* Overlay: Win98-ish tooltip panel instead of modern blur */
  460. .image-overlay {
  461. position: absolute;
  462. inset: 0;
  463. background: rgba(192, 192, 192, 0.92);
  464. opacity: 0;
  465. transition: opacity 0.12s linear;
  466. display: grid;
  467. place-items: center;
  468. }
  469. .image-card:hover .image-overlay {
  470. opacity: 1;
  471. }
  472. .overlay-buttons {
  473. display: flex;
  474. flex-direction: column;
  475. gap: 8px;
  476. width: 78%;
  477. }
  478. .overlay-btn {
  479. width: 100%;
  480. font-weight: 700;
  481. color: var(--w98-text);
  482. }
  483. .overlay-btn.primary,
  484. .overlay-btn.secondary {
  485. /* identical classic button look */
  486. background: var(--w98-face);
  487. }
  488. .image-info {
  489. padding: 8px 10px;
  490. background: var(--w98-face);
  491. border-top: 1px solid var(--w98-shadow);
  492. }
  493. .image-caption {
  494. display: block;
  495. font-size: 12px;
  496. font-weight: 700;
  497. white-space: nowrap;
  498. overflow: hidden;
  499. text-overflow: ellipsis;
  500. }
  501. .image-source {
  502. display: block;
  503. font-size: 12px;
  504. color: #404040;
  505. white-space: nowrap;
  506. overflow: hidden;
  507. text-overflow: ellipsis;
  508. }
  509. /* ---------- Responsive ---------- */
  510. @media (max-width: 1100px) {
  511. .content-layout {
  512. grid-template-columns: 1fr;
  513. }
  514. .infobox-sidebar {
  515. order: -1;
  516. }
  517. }
  518. @media (max-width: 768px) {
  519. header {
  520. flex-direction: column;
  521. align-items: stretch;
  522. }
  523. .search-form {
  524. max-width: none;
  525. }
  526. .view-home {
  527. padding: 14px;
  528. }
  529. .view-home .buttons {
  530. justify-content: stretch;
  531. flex-direction: column;
  532. }
  533. .view-home .buttons button,
  534. .view-home .buttons a {
  535. width: 100%;
  536. }
  537. .image-grid {
  538. grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  539. }
  540. }
  541. @media (prefers-reduced-motion: reduce) {
  542. * {
  543. transition: none !important;
  544. }
  545. }