style.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
  2. /* CSS Variables for Theme Support - Dark Theme Default */
  3. :root {
  4. --bg-primary: #1a1a1a;
  5. --bg-secondary: #2d2d2d;
  6. --bg-tertiary: #404040;
  7. --text-primary: #e0e0e0;
  8. --text-secondary: #b0b0b0;
  9. --text-tertiary: #808080;
  10. --border-primary: #404040;
  11. --border-secondary: #555;
  12. --accent-primary: #4dabf7;
  13. --accent-primary-hover: #339af0;
  14. --accent-secondary: #868e96;
  15. --overlay-bg: rgba(0,0,0,0.7);
  16. --shadow: rgba(0,0,0,0.5);
  17. }
  18. /* Light Theme Variables */
  19. [data-theme="light"] {
  20. --bg-primary: #fafafa;
  21. --bg-secondary: white;
  22. --bg-tertiary: #f5f5f5;
  23. --text-primary: #333;
  24. --text-secondary: #666;
  25. --text-tertiary: #999;
  26. --border-primary: #e0e0e0;
  27. --border-secondary: #ddd;
  28. --accent-primary: #007bff;
  29. --accent-primary-hover: #0056b3;
  30. --accent-secondary: #6c757d;
  31. --overlay-bg: rgba(0,0,0,0.5);
  32. --shadow: rgba(0,0,0,0.3);
  33. }
  34. * {
  35. margin: 0;
  36. padding: 0;
  37. box-sizing: border-box;
  38. }
  39. body {
  40. font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  41. background-color: var(--bg-primary);
  42. color: var(--text-primary);
  43. height: 100vh;
  44. height: calc(var(--vh, 1vh) * 100); /* Fallback for mobile browsers */
  45. display: flex;
  46. flex-direction: column;
  47. transition: background-color 0.3s ease, color 0.3s ease;
  48. overflow-x: hidden;
  49. }
  50. .header {
  51. background: var(--bg-secondary);
  52. border-bottom: 1px solid var(--border-primary);
  53. padding: 15px 20px;
  54. display: flex;
  55. justify-content: space-between;
  56. align-items: center;
  57. min-height: 60px;
  58. transition: background-color 0.3s ease, border-color 0.3s ease;
  59. }
  60. .title {
  61. font-size: 18px;
  62. color: var(--text-primary);
  63. font-weight: 500;
  64. display: flex;
  65. align-items: center;
  66. gap: 8px;
  67. }
  68. .title img {
  69. height: 28px;
  70. width: 28px;
  71. border-radius: 6px;
  72. vertical-align: middle;
  73. flex-shrink: 0;
  74. object-fit: contain;
  75. background: var(--bg-tertiary);
  76. transition: all 0.3s ease;
  77. }
  78. /* Fallback when logo fails to load */
  79. .title img[alt]:empty::before,
  80. .title img[alt]:not([src])::before {
  81. content: "📝";
  82. display: block;
  83. font-size: 16px;
  84. text-align: center;
  85. line-height: 28px;
  86. }
  87. .note-id {
  88. font-family: monospace;
  89. font-size: 12px;
  90. color: var(--text-secondary);
  91. background: var(--bg-tertiary);
  92. padding: 4px 8px;
  93. border-radius: 3px;
  94. transition: background-color 0.2s, color 0.2s;
  95. }
  96. .note-id:hover {
  97. background: var(--accent-primary);
  98. color: white;
  99. }
  100. .note-id:active {
  101. background: var(--accent-primary-hover);
  102. color: white;
  103. }
  104. .header-right {
  105. display: flex;
  106. align-items: center;
  107. gap: 10px;
  108. }
  109. /* Update toast message */
  110. .update-toast {
  111. position: fixed;
  112. bottom: 20px;
  113. right: 20px;
  114. background: var(--accent-primary);
  115. color: white;
  116. padding: 12px 18px;
  117. border-radius: 8px;
  118. font-size: 14px;
  119. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  120. z-index: 1000;
  121. animation: slideInUp 0.3s ease-out;
  122. }
  123. .update-toast.hidden {
  124. display: none;
  125. }
  126. @keyframes slideInUp {
  127. from {
  128. transform: translateY(100%);
  129. opacity: 0;
  130. }
  131. to {
  132. transform: translateY(0);
  133. opacity: 1;
  134. }
  135. }
  136. .new-btn {
  137. background: var(--accent-primary);
  138. color: white;
  139. border: none;
  140. padding: 8px 16px;
  141. border-radius: 4px;
  142. cursor: pointer;
  143. font-size: 14px;
  144. transition: background-color 0.2s ease;
  145. }
  146. .new-btn:hover {
  147. background: var(--accent-primary-hover);
  148. }
  149. .content {
  150. flex: 1;
  151. display: flex;
  152. }
  153. .note-area {
  154. flex: 1;
  155. border: none;
  156. outline: none;
  157. padding: 30px;
  158. font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  159. font-size: 16px;
  160. line-height: 1.6;
  161. resize: none;
  162. background: var(--bg-secondary);
  163. color: var(--text-primary);
  164. transition: background-color 0.3s ease, color 0.3s ease;
  165. }
  166. .note-area::placeholder {
  167. color: var(--text-tertiary);
  168. }
  169. .id-input-overlay {
  170. position: fixed;
  171. top: 0;
  172. left: 0;
  173. right: 0;
  174. bottom: 0;
  175. background: var(--overlay-bg);
  176. display: flex;
  177. justify-content: center;
  178. align-items: center;
  179. z-index: 1000;
  180. }
  181. .id-input-dialog {
  182. background: var(--bg-secondary);
  183. padding: 30px;
  184. border-radius: 8px;
  185. box-shadow: 0 4px 20px var(--shadow);
  186. max-width: 400px;
  187. width: 90%;
  188. transition: background-color 0.3s ease;
  189. }
  190. .id-input-dialog h3 {
  191. margin-bottom: 15px;
  192. color: var(--text-primary);
  193. }
  194. .id-input {
  195. width: 100%;
  196. padding: 12px;
  197. border: 1px solid var(--border-secondary);
  198. border-radius: 4px;
  199. font-size: 14px;
  200. margin-bottom: 15px;
  201. background: var(--bg-secondary);
  202. color: var(--text-primary);
  203. transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  204. }
  205. .dialog-buttons {
  206. display: flex;
  207. gap: 10px;
  208. justify-content: flex-end;
  209. }
  210. .dialog-btn {
  211. padding: 8px 16px;
  212. border: none;
  213. border-radius: 4px;
  214. cursor: pointer;
  215. font-size: 14px;
  216. transition: background-color 0.2s ease;
  217. }
  218. .dialog-btn.primary {
  219. background: var(--accent-primary);
  220. color: white;
  221. }
  222. .dialog-btn.primary:hover {
  223. background: var(--accent-primary-hover);
  224. }
  225. .dialog-btn.secondary {
  226. background: var(--accent-secondary);
  227. color: white;
  228. }
  229. .dialog-btn.secondary:hover {
  230. opacity: 0.9;
  231. }
  232. /* Theme Switch Styles */
  233. .theme-switch {
  234. background: var(--bg-tertiary);
  235. border: 1px solid var(--border-primary);
  236. border-radius: 20px;
  237. padding: 6px;
  238. cursor: pointer;
  239. width: 36px;
  240. height: 36px;
  241. position: relative;
  242. transition: all 0.3s ease;
  243. display: flex;
  244. align-items: center;
  245. justify-content: center;
  246. font-size: 16px;
  247. }
  248. .theme-switch:hover {
  249. background: var(--border-primary);
  250. transform: scale(1.05);
  251. }
  252. .theme-switch::before {
  253. content: '☀️';
  254. transition: all 0.3s ease;
  255. filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  256. }
  257. .theme-switch.dark::before {
  258. content: '🌙';
  259. }
  260. .hidden {
  261. display: none;
  262. }
  263. /* Mobile-First Responsive Design */
  264. /* Base styles are already mobile-friendly, now add tablet and desktop improvements */
  265. /* Small smartphones (portrait) */
  266. @media screen and (max-width: 480px) {
  267. .header {
  268. padding: 12px 15px;
  269. min-height: 56px;
  270. flex-wrap: nowrap;
  271. }
  272. .title {
  273. font-size: 16px;
  274. font-weight: 600;
  275. gap: 6px;
  276. }
  277. .title img {
  278. height: 24px;
  279. width: 24px;
  280. border-radius: 4px;
  281. }
  282. .header-right {
  283. gap: 8px;
  284. flex-shrink: 0;
  285. }
  286. .note-id {
  287. font-size: 10px;
  288. padding: 3px 6px;
  289. max-width: 80px;
  290. overflow: hidden;
  291. text-overflow: ellipsis;
  292. white-space: nowrap;
  293. }
  294. /* Make theme switch more touch-friendly */
  295. .theme-switch {
  296. width: 44px;
  297. height: 44px;
  298. padding: 8px;
  299. min-width: 44px;
  300. min-height: 44px;
  301. display: flex;
  302. align-items: center;
  303. justify-content: center;
  304. font-size: 18px;
  305. }
  306. /* Touch-friendly buttons */
  307. .new-btn {
  308. padding: 10px 14px;
  309. font-size: 13px;
  310. min-height: 44px;
  311. touch-action: manipulation;
  312. -webkit-tap-highlight-color: transparent;
  313. }
  314. /* Optimize text area for mobile */
  315. .note-area {
  316. padding: 20px 15px;
  317. font-size: 16px; /* Prevents zoom on iOS */
  318. line-height: 1.5;
  319. -webkit-appearance: none;
  320. border-radius: 0;
  321. }
  322. /* Mobile-optimized modal */
  323. .id-input-overlay {
  324. padding: 20px 15px;
  325. align-items: flex-start;
  326. padding-top: 25vh;
  327. }
  328. .id-input-dialog {
  329. padding: 24px 20px;
  330. margin: 0;
  331. border-radius: 12px;
  332. width: 100%;
  333. max-width: 320px;
  334. }
  335. .id-input-dialog h3 {
  336. font-size: 18px;
  337. margin-bottom: 16px;
  338. }
  339. .id-input {
  340. padding: 14px 12px;
  341. font-size: 16px; /* Prevents zoom on iOS */
  342. border-radius: 8px;
  343. margin-bottom: 20px;
  344. -webkit-appearance: none;
  345. }
  346. .dialog-buttons {
  347. gap: 12px;
  348. flex-direction: row;
  349. }
  350. .dialog-btn {
  351. flex: 1;
  352. padding: 12px 16px;
  353. font-size: 14px;
  354. font-weight: 500;
  355. min-height: 44px;
  356. border-radius: 8px;
  357. touch-action: manipulation;
  358. -webkit-tap-highlight-color: transparent;
  359. }
  360. }
  361. /* Larger smartphones and small tablets (landscape phones) */
  362. @media screen and (min-width: 481px) and (max-width: 768px) {
  363. .header {
  364. padding: 15px 20px;
  365. }
  366. .title {
  367. font-size: 18px;
  368. gap: 7px;
  369. }
  370. .title img {
  371. height: 26px;
  372. width: 26px;
  373. border-radius: 5px;
  374. }
  375. .note-area {
  376. padding: 25px 20px;
  377. font-size: 16px;
  378. }
  379. .id-input-dialog {
  380. max-width: 400px;
  381. padding: 28px 24px;
  382. }
  383. .theme-switch {
  384. width: 38px;
  385. height: 38px;
  386. font-size: 17px;
  387. }
  388. }
  389. /* Tablets and small desktops */
  390. @media screen and (min-width: 769px) and (max-width: 1024px) {
  391. .header {
  392. padding: 16px 24px;
  393. min-height: 64px;
  394. }
  395. .title {
  396. font-size: 20px;
  397. gap: 8px;
  398. }
  399. .title img {
  400. height: 28px;
  401. width: 28px;
  402. border-radius: 6px;
  403. }
  404. .note-area {
  405. padding: 32px 28px;
  406. font-size: 17px;
  407. }
  408. .new-btn {
  409. padding: 10px 18px;
  410. font-size: 15px;
  411. }
  412. }
  413. /* Large screens and desktops */
  414. @media screen and (min-width: 1025px) {
  415. .header {
  416. padding: 18px 32px;
  417. min-height: 68px;
  418. }
  419. .title {
  420. font-size: 22px;
  421. gap: 10px;
  422. }
  423. .title img {
  424. height: 32px;
  425. width: 32px;
  426. border-radius: 7px;
  427. }
  428. .note-area {
  429. padding: 40px 36px;
  430. font-size: 18px;
  431. }
  432. .id-input-dialog {
  433. max-width: 480px;
  434. padding: 36px 32px;
  435. }
  436. }
  437. /* Touch-specific improvements */
  438. @media (hover: none) and (pointer: coarse) {
  439. /* This targets touch devices specifically */
  440. .new-btn:hover,
  441. .dialog-btn:hover,
  442. .theme-switch:hover {
  443. /* Remove hover effects on touch devices */
  444. background: var(--accent-primary);
  445. opacity: 1;
  446. }
  447. .dialog-btn.secondary:hover {
  448. background: var(--accent-secondary);
  449. opacity: 1;
  450. }
  451. .theme-switch:hover {
  452. background: var(--bg-tertiary);
  453. }
  454. /* Add active states for touch feedback */
  455. .new-btn:active {
  456. background: var(--accent-primary-hover);
  457. transform: scale(0.98);
  458. }
  459. /* Toast mobile styles */
  460. .update-toast {
  461. bottom: 15px;
  462. right: 15px;
  463. padding: 10px 15px;
  464. font-size: 13px;
  465. border-radius: 6px;
  466. }
  467. .dialog-btn:active {
  468. transform: scale(0.98);
  469. }
  470. .theme-switch:active {
  471. transform: scale(0.95);
  472. }
  473. }
  474. /* High-DPI displays */
  475. @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  476. .theme-switch::before {
  477. box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  478. }
  479. .id-input-dialog {
  480. box-shadow: 0 8px 32px var(--shadow);
  481. }
  482. }
  483. /* Landscape orientation optimizations */
  484. @media screen and (max-height: 500px) and (orientation: landscape) {
  485. .header {
  486. min-height: 48px;
  487. padding: 10px 15px;
  488. }
  489. .title {
  490. font-size: 14px;
  491. gap: 4px;
  492. }
  493. .title img {
  494. height: 20px;
  495. width: 20px;
  496. border-radius: 3px;
  497. }
  498. .new-btn {
  499. padding: 8px 12px;
  500. font-size: 12px;
  501. min-height: 36px;
  502. }
  503. .theme-switch {
  504. width: 36px;
  505. height: 36px;
  506. min-height: 36px;
  507. font-size: 14px;
  508. }
  509. .note-area {
  510. padding: 15px;
  511. font-size: 15px;
  512. }
  513. .id-input-overlay {
  514. padding-top: 10vh;
  515. }
  516. .id-input-dialog {
  517. padding: 20px;
  518. max-width: 400px;
  519. }
  520. }
  521. /* Accessibility improvements */
  522. @media (prefers-reduced-motion: reduce) {
  523. * {
  524. animation-duration: 0.01ms !important;
  525. animation-iteration-count: 1 !important;
  526. transition-duration: 0.01ms !important;
  527. }
  528. .theme-switch::before {
  529. transition: none;
  530. }
  531. body {
  532. transition: none;
  533. }
  534. }
  535. /* Dark theme specific mobile adjustments */
  536. [data-theme="dark"] {
  537. /* Better contrast for mobile screens */
  538. --text-primary: #f0f0f0;
  539. --text-secondary: #c0c0c0;
  540. --border-primary: #4a4a4a;
  541. }
  542. @media screen and (max-width: 480px) {
  543. [data-theme="dark"] {
  544. --bg-primary: #0d1117;
  545. --bg-secondary: #1c2128;
  546. --bg-tertiary: #2d333b;
  547. }
  548. }
  549. /* 404 Error Page Styles */
  550. .error-content {
  551. display: flex;
  552. flex-direction: column;
  553. align-items: center;
  554. justify-content: center;
  555. text-align: center;
  556. padding: 40px 20px;
  557. height: 100%;
  558. max-width: 500px;
  559. margin: 0 auto;
  560. }
  561. .error-icon {
  562. font-size: 64px;
  563. margin-bottom: 24px;
  564. opacity: 0.8;
  565. }
  566. .error-title {
  567. font-size: 32px;
  568. font-weight: 600;
  569. color: var(--text-primary);
  570. margin-bottom: 16px;
  571. line-height: 1.2;
  572. }
  573. .error-message {
  574. font-size: 16px;
  575. color: var(--text-secondary);
  576. line-height: 1.6;
  577. margin-bottom: 32px;
  578. max-width: 400px;
  579. }
  580. .error-actions {
  581. display: flex;
  582. gap: 16px;
  583. flex-wrap: wrap;
  584. justify-content: center;
  585. }
  586. .error-actions .dialog-btn {
  587. min-width: 140px;
  588. padding: 12px 24px;
  589. font-size: 14px;
  590. font-weight: 500;
  591. border-radius: 8px;
  592. cursor: pointer;
  593. border: none;
  594. transition: all 0.2s ease;
  595. text-decoration: none;
  596. display: inline-block;
  597. }
  598. /* Mobile optimizations for 404 page */
  599. @media screen and (max-width: 480px) {
  600. .error-content {
  601. padding: 30px 15px;
  602. }
  603. .error-icon {
  604. font-size: 48px;
  605. margin-bottom: 20px;
  606. }
  607. .error-title {
  608. font-size: 24px;
  609. margin-bottom: 12px;
  610. }
  611. .error-message {
  612. font-size: 14px;
  613. margin-bottom: 24px;
  614. }
  615. .error-actions {
  616. flex-direction: column;
  617. width: 100%;
  618. gap: 12px;
  619. }
  620. .error-actions .dialog-btn {
  621. width: 100%;
  622. min-width: unset;
  623. }
  624. }
  625. /* Tablet optimizations for 404 page */
  626. @media screen and (min-width: 481px) and (max-width: 768px) {
  627. .error-content {
  628. padding: 36px 24px;
  629. }
  630. .error-icon {
  631. font-size: 56px;
  632. }
  633. .error-title {
  634. font-size: 28px;
  635. }
  636. }
  637. /* Desktop optimizations for 404 page */
  638. @media screen and (min-width: 1025px) {
  639. .error-content {
  640. padding: 60px 40px;
  641. }
  642. .error-icon {
  643. font-size: 72px;
  644. margin-bottom: 28px;
  645. }
  646. .error-title {
  647. font-size: 36px;
  648. margin-bottom: 20px;
  649. }
  650. .error-message {
  651. font-size: 18px;
  652. margin-bottom: 40px;
  653. }
  654. }