main.css 13 KB

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