index.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. /*
  2. * This CSS is required to make the React app fill the entire viewport.
  3. * The default browser styles for <html> and <body> do not stretch to 100% height,
  4. * so we must set this explicitly. This allows Tailwind's min-h-screen to work correctly.
  5. */
  6. @import "tailwindcss";
  7. @import url("https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap");
  8. html,
  9. body,
  10. #root {
  11. height: 100%;
  12. width: 100%;
  13. margin: 0;
  14. padding: 0;
  15. }
  16. /*
  17. * The following styles are for a clean, flat aesthetic.
  18. * You can customize the font and background color here.
  19. */
  20. body {
  21. font-family: var(--font-body), "Inter", "Noto Color Emoji", sans-serif;
  22. background-color: var(--color-background,
  23. #f7fafc);
  24. /* A light gray background color */
  25. color: var(--color-text, #1f2937);
  26. }
  27. .markdown-content table {
  28. display: table;
  29. width: auto;
  30. /* prevent stretching full screen */
  31. max-width: max-content;
  32. }
  33. .markdown-content {
  34. line-height: 1.7;
  35. font-size: 1rem;
  36. color: var(--color-text, #000000);
  37. }
  38. /* Headings */
  39. .markdown-content h1 {
  40. font-size: 2.25rem;
  41. /* 36px */
  42. font-weight: 800;
  43. margin-top: 2.5rem;
  44. margin-bottom: 1rem;
  45. color: var(--color-text, #000000);
  46. }
  47. .markdown-content h2 {
  48. font-size: 1.75rem;
  49. font-weight: 700;
  50. margin-top: 2rem;
  51. margin-bottom: 1rem;
  52. color: var(--color-text, #000000);
  53. }
  54. .markdown-content h3 {
  55. font-size: 1.5rem;
  56. font-weight: 600;
  57. margin-top: 1.75rem;
  58. margin-bottom: 0.75rem;
  59. color: var(--color-text, #000000);
  60. }
  61. .markdown-content h4,
  62. .markdown-content h5,
  63. .markdown-content h6 {
  64. font-size: 1.25rem;
  65. font-weight: 600;
  66. margin-top: 1.5rem;
  67. margin-bottom: 0.5rem;
  68. color: var(--color-text, #000000);
  69. }
  70. /* Paragraphs */
  71. .markdown-content p {
  72. margin-top: 1rem;
  73. margin-bottom: 1rem;
  74. }
  75. /* Blockquotes */
  76. .markdown-content blockquote {
  77. border-left: 4px solid var(--color-primary, #3b82f6);
  78. padding-left: 1rem;
  79. margin: 1.5rem 0;
  80. color: var(--color-text-secondary, #9ca3af);
  81. font-style: italic;
  82. }
  83. /* Lists */
  84. .markdown-content ul,
  85. .markdown-content ol {
  86. margin: 1.25rem 0 1.25rem 1.5rem;
  87. padding-left: 1rem;
  88. }
  89. .markdown-content ul {
  90. list-style-type: disc;
  91. }
  92. .markdown-content ol {
  93. list-style-type: decimal;
  94. }
  95. .markdown-content li {
  96. margin: 0.5rem 0;
  97. }
  98. .markdown-content li>ul,
  99. .markdown-content li>ol {
  100. margin-top: 0.5rem;
  101. margin-bottom: 0.5rem;
  102. }
  103. /* Horizontal Rule */
  104. .markdown-content hr {
  105. border: none;
  106. border-top: 1px solid var(--color-border, #4b5563);
  107. margin: 2rem 0;
  108. }
  109. /* Markdown Content Styles - FORCE ATOM ONE DARK */
  110. .markdown-content pre {
  111. display: block;
  112. overflow-x: auto;
  113. padding: 1em;
  114. background: #282c34 !important;
  115. /* Force Dark Background */
  116. color: #abb2bf !important;
  117. /* Force Light Text */
  118. border-radius: 0.5rem;
  119. margin-bottom: 1.5rem;
  120. border: 1px solid rgba(255, 255, 255, 0.1);
  121. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  122. font-size: 0.9em;
  123. line-height: 1.5;
  124. }
  125. /* Ensure .hljs class shares the same styles if specific overrides exist */
  126. .markdown-content pre.hljs {
  127. background: #282c34 !important;
  128. color: #abb2bf !important;
  129. }
  130. .markdown-content code {
  131. /* Inline code styles - adapt to theme */
  132. background-color: rgba(var(--text-color), 0.1);
  133. padding: 0.2em 0.4em;
  134. border-radius: 0.25rem;
  135. font-size: 0.9em;
  136. }
  137. /* Hard reset for code inside pre to prevent inline styles leaking */
  138. .markdown-content pre code,
  139. .markdown-content pre.hljs code {
  140. background-color: transparent !important;
  141. padding: 0;
  142. border-radius: 0;
  143. font-size: inherit;
  144. color: inherit !important;
  145. border: none;
  146. box-shadow: none;
  147. }
  148. /* Hardcoded Syntax Highlighting Colors (Atom One Dark) */
  149. .markdown-content .hljs-comment,
  150. .markdown-content .hljs-quote {
  151. color: #5c6370 !important;
  152. font-style: italic;
  153. }
  154. .markdown-content .hljs-doctag,
  155. .markdown-content .hljs-keyword,
  156. .markdown-content .hljs-formula {
  157. color: #c678dd !important;
  158. }
  159. .markdown-content .hljs-section,
  160. .markdown-content .hljs-name,
  161. .markdown-content .hljs-selector-tag,
  162. .markdown-content .hljs-deletion,
  163. .markdown-content .hljs-subst {
  164. color: #e06c75 !important;
  165. }
  166. .markdown-content .hljs-literal {
  167. color: #56b6c2 !important;
  168. }
  169. .markdown-content .hljs-string,
  170. .markdown-content .hljs-regexp,
  171. .markdown-content .hljs-addition,
  172. .markdown-content .hljs-attribute,
  173. .markdown-content .hljs-meta .hljs-string {
  174. color: #98c379 !important;
  175. }
  176. .markdown-content .hljs-attr,
  177. .markdown-content .hljs-variable,
  178. .markdown-content .hljs-template-variable,
  179. .markdown-content .hljs-type,
  180. .markdown-content .hljs-selector-class,
  181. .markdown-content .hljs-selector-attr,
  182. .markdown-content .hljs-selector-pseudo,
  183. .markdown-content .hljs-number {
  184. color: #d19a66 !important;
  185. }
  186. .markdown-content .hljs-symbol,
  187. .markdown-content .hljs-bullet,
  188. .markdown-content .hljs-link,
  189. .markdown-content .hljs-meta,
  190. .markdown-content .hljs-selector-id,
  191. .markdown-content .hljs-title {
  192. color: #61afef !important;
  193. }
  194. .markdown-content .hljs-emphasis {
  195. font-style: italic;
  196. }
  197. .markdown-content .hljs-strong {
  198. font-weight: bold;
  199. }
  200. .markdown-content .hljs-link {
  201. text-decoration: underline;
  202. }
  203. /* Emphasis */
  204. .markdown-content em {
  205. font-style: italic;
  206. color: var(--color-text, #000000);
  207. }
  208. .markdown-content strong {
  209. font-weight: 700;
  210. color: var(--color-text, #000000);
  211. }
  212. /* Links */
  213. .markdown-content a {
  214. color: var(--color-primary, #3b82f6);
  215. text-decoration: underline;
  216. }
  217. .markdown-content a:hover {
  218. color: var(--color-secondary, #60a5fa);
  219. }
  220. /* Images */
  221. .markdown-content img {
  222. display: block;
  223. width: 100%;
  224. border-radius: 0.5rem;
  225. margin-top: 1rem;
  226. margin-bottom: 1rem;
  227. }
  228. /* Tables */
  229. .markdown-content table {
  230. border-collapse: collapse;
  231. margin: 2rem 0;
  232. width: 100%;
  233. font-size: 0.95rem;
  234. }
  235. .markdown-content th,
  236. .markdown-content td {
  237. padding: 0.75rem 1rem;
  238. border: 1px solid var(--color-border, #4b5563);
  239. text-align: left;
  240. vertical-align: top;
  241. }
  242. .markdown-content th {
  243. background-color: var(--color-surface, #777777);
  244. font-weight: 600;
  245. color: var(--color-text, #f3f4f6);
  246. }
  247. /* Strikethrough */
  248. .markdown-content del,
  249. .markdown-content s {
  250. text-decoration: line-through;
  251. color: var(--color-text-secondary, #9ca3af);
  252. }
  253. .headercontainer {
  254. padding-left: 2rem;
  255. padding-right: 2rem;
  256. }
  257. /* Standard HTML elements support */
  258. .markdown-content sub {
  259. font-size: 0.8em;
  260. vertical-align: sub;
  261. }
  262. .markdown-content sup {
  263. font-size: 0.8em;
  264. vertical-align: super;
  265. }
  266. /* Details/Summary for collapsible content */
  267. .markdown-content details {
  268. border: 1px solid var(--color-border, #d1d5db);
  269. border-radius: 0.5rem;
  270. padding: 1rem;
  271. margin: 1rem 0;
  272. background-color: var(--color-surface, #f9fafb);
  273. }
  274. .markdown-content details summary {
  275. cursor: pointer;
  276. font-weight: 600;
  277. margin-bottom: 0.5rem;
  278. color: var(--color-text, #374151);
  279. }
  280. .markdown-content details[open] {
  281. background-color: var(--color-background, #f3f4f6);
  282. }
  283. .markdown-content details[open] summary {
  284. margin-bottom: 1rem;
  285. border-bottom: 1px solid var(--color-border, #d1d5db);
  286. padding-bottom: 0.5rem;
  287. }
  288. /* Footnotes */
  289. .markdown-content sup a {
  290. font-size: 0.75em;
  291. vertical-align: super;
  292. color: var(--color-primary, #3b82f6);
  293. }
  294. .markdown-content .footnotes {
  295. font-size: 0.9rem;
  296. border-top: 1px solid var(--color-border, #4b5563);
  297. margin-top: 2rem;
  298. padding-top: 1rem;
  299. }
  300. .markdown-content .footnotes ol {
  301. list-style-type: decimal;
  302. margin-left: 1.5rem;
  303. }
  304. .markdown-content .footnotes li {
  305. margin: 0.5rem 0;
  306. }
  307. /* Standard alert/callout styling using blockquotes with emoji */
  308. .markdown-content blockquote p:first-child:before {
  309. /* This will style blockquotes that start with emoji as callouts */
  310. }
  311. /* You can use standard blockquotes for callouts:
  312. > ℹ️ **Info**: This is an info callout
  313. > ⚠️ **Warning**: This is a warning
  314. > ❌ **Error**: This is an error
  315. */
  316. /* WYSIWYG Editor Styling */
  317. .w-md-editor {
  318. background-color: white;
  319. }
  320. .w-md-editor-text-textarea,
  321. .w-md-editor-text {
  322. font-size: 14px !important;
  323. font-family:
  324. ui-monospace, SFMono-Regular, "Cascadia Code", "Roboto Mono", Menlo,
  325. Monaco, Consolas, "Noto Color Emoji", "Liberation Mono", "Courier New",
  326. monospace !important;
  327. }
  328. .w-md-editor-preview {
  329. background-color: white;
  330. }
  331. /* Custom toolbar styling */
  332. .w-md-editor-toolbar {
  333. border-bottom: 1px solid #e5e7eb;
  334. background-color: #f9fafb;
  335. }
  336. .w-md-editor-toolbar-child button {
  337. color: #374151;
  338. }
  339. .w-md-editor-toolbar-child button:hover {
  340. background-color: #e5e7eb;
  341. }
  342. /* Editor content area */
  343. .w-md-editor-text-container {
  344. border: none !important;
  345. }
  346. /* Preview styling to match our markdown content */
  347. .w-md-editor-preview .wmde-markdown {
  348. padding: 16px;
  349. color: #374151;
  350. line-height: 1.75;
  351. }
  352. .w-md-editor-preview .wmde-markdown h1,
  353. .w-md-editor-preview .wmde-markdown h2,
  354. .w-md-editor-preview .wmde-markdown h3,
  355. .w-md-editor-preview .wmde-markdown h4,
  356. .w-md-editor-preview .wmde-markdown h5,
  357. .w-md-editor-preview .wmde-markdown h6 {
  358. color: #1f2937;
  359. font-weight: 700;
  360. }
  361. .w-md-editor-preview .wmde-markdown code {
  362. background-color: #f3f4f6;
  363. padding: 2px 4px;
  364. border-radius: 4px;
  365. font-size: 0.875em;
  366. }
  367. .w-md-editor-preview .wmde-markdown pre {
  368. background-color: #f3f4f6;
  369. border-radius: 8px;
  370. padding: 16px;
  371. }
  372. .w-md-editor-preview .wmde-markdown blockquote {
  373. border-left: 4px solid #3b82f6;
  374. padding-left: 16px;
  375. margin: 16px 0;
  376. font-style: italic;
  377. color: #6b7280;
  378. }
  379. .w-md-editor-preview .wmde-markdown table {
  380. border-collapse: collapse;
  381. width: 100%;
  382. margin: 16px 0;
  383. }
  384. .w-md-editor-preview .wmde-markdown table th,
  385. .w-md-editor-preview .wmde-markdown table td {
  386. border: 1px solid #d1d5db;
  387. padding: 8px 12px;
  388. text-align: left;
  389. }
  390. .w-md-editor-preview .wmde-markdown table th {
  391. background-color: #f9fafb;
  392. font-weight: 600;
  393. }
  394. /* Tab styling */
  395. .w-md-editor-tab {
  396. background-color: #f3f4f6 !important;
  397. color: #6b7280 !important;
  398. border: 1px solid #d1d5db !important;
  399. }
  400. .w-md-editor-tab.active {
  401. background-color: white !important;
  402. color: #1f2937 !important;
  403. border-bottom-color: white !important;
  404. }
  405. /* Theme-aware utility classes */
  406. .theme-bg {
  407. background-color: var(--color-background, #ffffff);
  408. }
  409. .theme-surface {
  410. background-color: var(--color-surface, #ffffff);
  411. }
  412. .theme-text {
  413. color: var(--color-text, #1f2937);
  414. }
  415. .theme-text-secondary {
  416. color: var(--color-text-secondary, #6b7280);
  417. }
  418. .theme-primary {
  419. color: var(--color-primary, #3b82f6);
  420. }
  421. .theme-bg-primary {
  422. background-color: var(--color-primary, #3b82f6);
  423. }
  424. .theme-secondary {
  425. color: var(--color-secondary, #8b5cf6);
  426. }
  427. .theme-accent {
  428. color: var(--color-accent, #10b981);
  429. }
  430. .theme-border {
  431. border-color: var(--color-border, #d1d5db);
  432. }
  433. /* Button variants */
  434. .btn-theme-primary {
  435. background-color: var(--color-primary, #3b82f6);
  436. color: white;
  437. border: 1px solid var(--color-primary, #3b82f6);
  438. }
  439. .btn-theme-primary:hover {
  440. background-color: var(--color-secondary, #1d4ed8);
  441. border-color: var(--color-secondary, #1d4ed8);
  442. }
  443. .btn-theme-secondary {
  444. background-color: var(--color-secondary, #8b5cf6);
  445. color: white;
  446. border: 1px solid var(--color-secondary, #8b5cf6);
  447. }
  448. .btn-theme-secondary:hover {
  449. opacity: 0.9;
  450. }
  451. /* --- Image Comparison Styles --- */
  452. .image-comparison-container {
  453. width: 100%;
  454. margin-top: 2rem;
  455. margin-bottom: 2rem;
  456. border-radius: 0.5rem;
  457. overflow: hidden;
  458. }
  459. .comparison-wrapper {
  460. position: relative;
  461. width: 100%;
  462. overflow: hidden;
  463. /* Aspect ratio is determined by the bottom image (the 'after' image) */
  464. }
  465. /* The slider input is invisible but covers the whole area */
  466. .comparison-slider {
  467. -webkit-appearance: none;
  468. appearance: none;
  469. background: transparent;
  470. position: absolute;
  471. top: 0;
  472. left: 0;
  473. width: 100%;
  474. height: 100%;
  475. cursor: ew-resize;
  476. margin: 0;
  477. z-index: 20;
  478. /* above overlay */
  479. }
  480. .comparison-slider:focus {
  481. outline: none;
  482. }
  483. /* The vertical white line handle */
  484. .slider-handle {
  485. pointer-events: none;
  486. /* Let clicks pass through to slider */
  487. background-color: white;
  488. width: 2px;
  489. }
  490. /* --- Lightbox Styles --- */
  491. .lightbox-overlay {
  492. position: fixed;
  493. top: 0;
  494. left: 0;
  495. right: 0;
  496. bottom: 0;
  497. background-color: rgba(0, 0, 0, 0.9);
  498. z-index: 9999;
  499. display: flex;
  500. align-items: center;
  501. justify-content: center;
  502. animation: fadeIn 0.2s ease-out;
  503. }
  504. .lightbox-content {
  505. max-width: 95vw;
  506. max-height: 95vh;
  507. box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  508. border-radius: 4px;
  509. animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  510. }
  511. .lightbox-close {
  512. position: absolute;
  513. top: 20px;
  514. right: 30px;
  515. color: white;
  516. font-size: 3rem;
  517. cursor: pointer;
  518. line-height: 1;
  519. z-index: 10000;
  520. opacity: 0.7;
  521. transition: opacity 0.2s;
  522. }
  523. .lightbox-close:hover {
  524. opacity: 1;
  525. }
  526. @keyframes fadeIn {
  527. from {
  528. opacity: 0;
  529. }
  530. to {
  531. opacity: 1;
  532. }
  533. }
  534. @keyframes zoomIn {
  535. from {
  536. transform: scale(0.9);
  537. opacity: 0;
  538. }
  539. to {
  540. transform: scale(1);
  541. opacity: 1;
  542. }
  543. }
  544. /* Flicker Animation for Scroll Sync */
  545. @keyframes highlight-pulse-animation {
  546. 0% { background-color: rgba(59, 130, 246, 0.1); }
  547. 50% { background-color: rgba(59, 130, 246, 0.3); }
  548. 100% { background-color: transparent; }
  549. }
  550. .highlight-pulse {
  551. animation: highlight-pulse-animation 1.5s ease-out;
  552. border-radius: 4px;
  553. }