main.css 13 KB

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