style.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. /* ==========================================================================
  2. 1. Global Styles & Variables
  3. ========================================================================== */
  4. :root {
  5. --primary-color: #0055ff;
  6. --primary-hover: #0044cc;
  7. --primary-light: #e6f0ff;
  8. --text-color: #333;
  9. --text-secondary: #666;
  10. --border-color: #ddd;
  11. --bg-color: #f5f5f5;
  12. --card-bg: #fff;
  13. --success-color: #52c41a;
  14. --disabled-color: #ccc;
  15. --header-height: 70px;
  16. }
  17. * {
  18. margin: 0;
  19. padding: 0;
  20. box-sizing: border-box;
  21. }
  22. body {
  23. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
  24. Arial, sans-serif;
  25. background-color: var(--bg-color);
  26. color: var(--text-color);
  27. line-height: 1.6;
  28. /* Prevent overall horizontal scroll; handle overflows within containers */
  29. overflow-x: hidden;
  30. width: 100%;
  31. }
  32. /* Prevent translation flicker during load */
  33. [data-i18n] {
  34. visibility: hidden;
  35. }
  36. .i18n-ready [data-i18n] {
  37. visibility: visible;
  38. }
  39. /* ==========================================================================
  40. 2. Header
  41. ========================================================================== */
  42. header {
  43. background: linear-gradient(135deg, var(--primary-color) 0%, #0066ff 100%);
  44. color: white;
  45. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  46. width: 100%;
  47. position: relative;
  48. z-index: 100;
  49. /* Fix horizontal scroll background break */
  50. display: block;
  51. }
  52. .header-content {
  53. max-width: 1400px;
  54. margin: 0 auto;
  55. padding: 12px 30px;
  56. display: flex;
  57. justify-content: space-between;
  58. align-items: center;
  59. /* Allow wrapping on narrow screens */
  60. flex-wrap: wrap;
  61. gap: 15px;
  62. }
  63. /* Logo */
  64. .logo {
  65. display: flex;
  66. align-items: center;
  67. gap: 16px;
  68. flex-shrink: 0;
  69. }
  70. .logo-wide {
  71. height: 26px;
  72. width: auto;
  73. object-fit: contain;
  74. }
  75. .logo .subtitle {
  76. font-size: 13px;
  77. font-weight: 400;
  78. opacity: 0.7;
  79. padding-left: 16px;
  80. border-left: 1px solid rgba(255, 255, 255, 0.3);
  81. margin-left: 4px;
  82. white-space: nowrap;
  83. }
  84. /* Controls */
  85. .header-controls {
  86. display: flex;
  87. align-items: center;
  88. gap: 20px;
  89. }
  90. .official-link a {
  91. color: white;
  92. text-decoration: none;
  93. font-size: 13px;
  94. opacity: 0.8;
  95. transition: opacity 0.2s;
  96. font-weight: 500;
  97. display: flex;
  98. align-items: center;
  99. gap: 4px;
  100. }
  101. .official-link a:hover {
  102. opacity: 1;
  103. }
  104. .external-icon {
  105. opacity: 0.7;
  106. }
  107. /* Language Dropdown */
  108. .language-dropdown {
  109. position: relative;
  110. display: inline-block;
  111. }
  112. .dropbtn {
  113. background: transparent;
  114. border: 1px solid rgba(255, 255, 255, 0.4);
  115. color: white;
  116. height: 32px;
  117. padding: 0 12px;
  118. border-radius: 6px;
  119. font-size: 13px;
  120. cursor: pointer;
  121. transition: all 0.2s;
  122. min-width: 80px;
  123. display: flex;
  124. align-items: center;
  125. justify-content: space-between;
  126. gap: 6px;
  127. }
  128. .dropbtn::after {
  129. content: "";
  130. width: 0;
  131. height: 0;
  132. border-left: 4px solid transparent;
  133. border-right: 4px solid transparent;
  134. border-top: 5px solid white;
  135. opacity: 0.7;
  136. }
  137. .language-dropdown:hover .dropbtn {
  138. background: rgba(255, 255, 255, 0.1);
  139. border-color: white;
  140. }
  141. .dropdown-content {
  142. display: none;
  143. position: absolute;
  144. right: 0;
  145. top: 100%;
  146. padding-top: 5px;
  147. background-color: transparent;
  148. min-width: 120px;
  149. z-index: 1001;
  150. }
  151. /* Actual content container with background and border-radius */
  152. .dropdown-inner {
  153. background-color: white;
  154. border-radius: 6px;
  155. overflow: hidden;
  156. box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  157. }
  158. /* Invisible bridge to ensure mouse path continuity */
  159. .dropdown-content::before {
  160. content: "";
  161. position: absolute;
  162. top: 0;
  163. left: 0;
  164. width: 100%;
  165. height: 10px;
  166. background: transparent;
  167. }
  168. .dropdown-inner a {
  169. color: var(--text-color);
  170. padding: 10px 16px;
  171. text-decoration: none;
  172. display: block;
  173. font-size: 13px;
  174. transition: background 0.2s;
  175. }
  176. .dropdown-inner a:hover {
  177. background-color: var(--bg-color);
  178. color: var(--primary-color);
  179. }
  180. .language-dropdown:hover .dropdown-content {
  181. display: block;
  182. }
  183. /* Version Selector */
  184. .version-selector {
  185. display: flex;
  186. align-items: center;
  187. gap: 10px;
  188. }
  189. .version-label {
  190. font-size: 14px;
  191. font-weight: 500;
  192. white-space: nowrap;
  193. }
  194. .version-select {
  195. background: rgba(255, 255, 255, 0.15);
  196. border: 1px solid rgba(255, 255, 255, 0.3);
  197. color: white;
  198. height: 32px;
  199. padding: 0 36px 0 12px;
  200. font-size: 13px;
  201. border-radius: 6px;
  202. cursor: pointer;
  203. transition: all 0.2s ease;
  204. min-width: 120px;
  205. appearance: none;
  206. -webkit-appearance: none;
  207. -moz-appearance: none;
  208. background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  209. background-repeat: no-repeat;
  210. background-position: right 12px center;
  211. }
  212. .version-select:hover {
  213. background: rgba(255, 255, 255, 0.25);
  214. }
  215. .version-select option {
  216. background: white;
  217. color: var(--text-color);
  218. }
  219. /* ==========================================================================
  220. 3. Main Layout
  221. ========================================================================== */
  222. main {
  223. max-width: 1400px;
  224. margin: 30px auto;
  225. padding: 0 30px;
  226. width: 100%;
  227. }
  228. .container {
  229. display: grid;
  230. /* Desktop: fixed 400px left, adaptive right */
  231. grid-template-columns: 400px 1fr;
  232. gap: 30px;
  233. align-items: start;
  234. }
  235. .selector-panel,
  236. .result-panel {
  237. background: var(--card-bg);
  238. border-radius: 12px;
  239. padding: 30px;
  240. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  241. min-width: 0;
  242. }
  243. .selector-panel h2,
  244. .result-panel h2 {
  245. font-size: 22px;
  246. margin-bottom: 24px;
  247. color: var(--text-color);
  248. font-weight: 600;
  249. }
  250. /* ==========================================================================
  251. 4. Components
  252. ========================================================================== */
  253. /* 4.1 Tooltip Icon */
  254. .tooltip-icon {
  255. display: inline-flex !important;
  256. align-items: center !important;
  257. justify-content: center !important;
  258. width: 16px !important;
  259. height: 16px !important;
  260. border-radius: 50% !important;
  261. background-color: var(--primary-light) !important;
  262. color: var(--primary-color) !important;
  263. font-size: 11px !important;
  264. font-weight: 700 !important;
  265. font-family: Arial, sans-serif !important;
  266. line-height: 1 !important;
  267. cursor: help !important;
  268. position: relative !important;
  269. margin: 0 !important;
  270. opacity: 1 !important;
  271. transition: all 0.2s ease !important;
  272. }
  273. .tooltip-icon:hover {
  274. background-color: var(--primary-color) !important;
  275. color: white !important;
  276. }
  277. /* Remove external interference */
  278. .option-button .tooltip-icon {
  279. flex-shrink: 0 !important;
  280. }
  281. .option-button.active .tooltip-icon {
  282. background-color: white !important;
  283. color: var(--primary-color) !important;
  284. }
  285. /* Tooltip Popup - Allow interaction */
  286. .tooltip-content {
  287. position: absolute;
  288. bottom: calc(100% + 8px);
  289. left: 0;
  290. transform: translateX(-10px);
  291. background-color: #1a1a1a !important;
  292. color: #ffffff !important;
  293. padding: 12px 16px;
  294. border-radius: 8px;
  295. font-size: 13px;
  296. font-weight: 500;
  297. white-space: normal;
  298. width: 260px;
  299. opacity: 0;
  300. visibility: hidden;
  301. /* Disable interaction when hidden to prevent premature triggering */
  302. pointer-events: none;
  303. z-index: 10000;
  304. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  305. line-height: 1.6;
  306. text-align: left;
  307. border: 1px solid rgba(255, 255, 255, 0.25);
  308. transition: opacity 0.2s ease,
  309. visibility 0.2s ease;
  310. overflow-wrap: break-word;
  311. word-wrap: break-word;
  312. }
  313. /* Connection bridge to prevent disappearance when moving to popup */
  314. .tooltip-content::before {
  315. content: "";
  316. position: absolute;
  317. top: 100%;
  318. left: 0;
  319. width: 100%;
  320. height: 10px;
  321. background: transparent;
  322. }
  323. .tooltip-icon:hover .tooltip-content {
  324. opacity: 1 !important;
  325. visibility: visible !important;
  326. /* Enable interaction only when visible */
  327. pointer-events: auto !important;
  328. }
  329. .tooltip-content a {
  330. color: #4da6ff;
  331. text-decoration: underline;
  332. font-weight: 600;
  333. }
  334. .tooltip-content a:hover {
  335. color: #80bfff;
  336. }
  337. /* 4.2 Buttons */
  338. .option-button {
  339. height: 42px;
  340. padding: 0 15px;
  341. border: 2px solid var(--border-color);
  342. background: white;
  343. border-radius: 8px;
  344. cursor: pointer;
  345. font-size: 14px;
  346. transition: all 0.3s ease;
  347. color: var(--text-color);
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. gap: 6px;
  352. /* Prevent text cut-off issues with Tooltips */
  353. overflow: visible;
  354. white-space: nowrap;
  355. }
  356. .option-button:hover:not(:disabled):not(.active) {
  357. border-color: var(--primary-color);
  358. color: var(--primary-color);
  359. }
  360. .option-button.active {
  361. background: var(--primary-color);
  362. border-color: var(--primary-color);
  363. color: white;
  364. }
  365. .option-button:disabled {
  366. cursor: not-allowed;
  367. background: var(--bg-color);
  368. color: var(--text-secondary);
  369. border-color: var(--border-color);
  370. }
  371. /* 4.3 Selector Layout */
  372. .selector-group {
  373. margin-bottom: 24px;
  374. }
  375. .selector-label {
  376. display: block;
  377. font-size: 14px;
  378. font-weight: 600;
  379. color: var(--text-color);
  380. margin-bottom: 10px;
  381. }
  382. .label-with-tooltip {
  383. display: flex;
  384. align-items: center;
  385. gap: 8px;
  386. margin-bottom: 10px;
  387. }
  388. .label-with-tooltip .selector-label {
  389. margin-bottom: 0;
  390. }
  391. /* Inline Selector Groups (2:4 ratio) */
  392. .selector-group-inline {
  393. display: flex;
  394. flex-wrap: wrap;
  395. gap: 30px;
  396. margin-bottom: 24px;
  397. }
  398. .selector-item.flex-2 {
  399. flex: 2;
  400. min-width: 200px;
  401. }
  402. .selector-item.flex-4 {
  403. flex: 4;
  404. min-width: 200px;
  405. }
  406. /* 4.4 Grids */
  407. .card-grid {
  408. display: grid;
  409. grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  410. gap: 10px;
  411. }
  412. .button-grid {
  413. display: flex;
  414. flex-wrap: wrap;
  415. gap: 10px;
  416. }
  417. .button-grid .option-button {
  418. flex: 1;
  419. min-width: 110px;
  420. }
  421. /* Inputs */
  422. .select-input {
  423. width: 100%;
  424. padding: 10px 40px 10px 15px;
  425. border: 2px solid var(--border-color);
  426. border-radius: 8px;
  427. font-size: 14px;
  428. background: white;
  429. cursor: pointer;
  430. height: 42px;
  431. appearance: none;
  432. -webkit-appearance: none;
  433. -moz-appearance: none;
  434. background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  435. background-repeat: no-repeat;
  436. background-position: right 14px center;
  437. }
  438. .select-input:focus {
  439. outline: none;
  440. border-color: var(--primary-color);
  441. }
  442. /* Checkboxes */
  443. .checkbox-group {
  444. display: flex;
  445. flex-direction: column;
  446. gap: 12px;
  447. }
  448. .checkbox-item {
  449. display: flex;
  450. align-items: center;
  451. gap: 10px;
  452. cursor: pointer;
  453. font-size: 14px;
  454. }
  455. .checkbox-item input {
  456. width: 18px;
  457. height: 18px;
  458. accent-color: var(--primary-color);
  459. }
  460. /* 4.5 Image List Tab */
  461. .image-tabs-container {
  462. border: 2px solid var(--border-color);
  463. border-radius: 12px;
  464. overflow: visible;
  465. margin-bottom: 20px;
  466. background: #fff;
  467. overflow: hidden;
  468. }
  469. .image-tabs-header {
  470. display: flex;
  471. background: var(--bg-color);
  472. border-bottom: 2px solid var(--border-color);
  473. overflow-x: auto;
  474. scrollbar-width: none;
  475. border-radius: 10px 10px 0 0;
  476. }
  477. .image-tab {
  478. padding: 12px 30px;
  479. border: none;
  480. background: transparent;
  481. cursor: pointer;
  482. font-size: 14px;
  483. font-weight: 500;
  484. color: var(--text-secondary);
  485. border-bottom: 3px solid transparent;
  486. white-space: nowrap;
  487. text-align: center;
  488. transition: all 0.2s ease;
  489. }
  490. .image-tab.active {
  491. color: var(--primary-color);
  492. border-bottom-color: var(--primary-color);
  493. }
  494. /* Output */
  495. .commands-output {
  496. background: #1e1e1e;
  497. }
  498. .code-block-wrapper {
  499. position: relative;
  500. }
  501. .image-commands {
  502. background: #1e1e1e;
  503. color: #d4d4d4;
  504. padding: 20px;
  505. font-family: "Monaco", "Consolas", monospace;
  506. font-size: 13px;
  507. line-height: 1.6;
  508. overflow-x: auto;
  509. white-space: pre;
  510. min-height: 200px;
  511. max-height: 500px;
  512. margin: 0;
  513. border: none;
  514. }
  515. .copy-icon-btn {
  516. position: absolute;
  517. top: 12px;
  518. right: 12px;
  519. background: rgba(255, 255, 255, 0.1);
  520. border: none;
  521. border-radius: 6px;
  522. padding: 8px;
  523. cursor: pointer;
  524. color: #d4d4d4;
  525. display: flex;
  526. align-items: center;
  527. justify-content: center;
  528. }
  529. /* 4.6 Offline Guide */
  530. .offline-guide-module {
  531. margin-top: 20px;
  532. background: #fff;
  533. border-radius: 12px;
  534. border: 2px solid var(--border-color);
  535. overflow: hidden;
  536. }
  537. .guide-summary {
  538. padding: 12px 20px;
  539. cursor: pointer;
  540. font-weight: 600;
  541. list-style: none;
  542. display: flex;
  543. align-items: center;
  544. user-select: none;
  545. transition: background 0.2s;
  546. }
  547. .guide-summary:hover {
  548. background: var(--bg-color);
  549. }
  550. .guide-summary::after {
  551. content: "";
  552. border-left: 5px solid transparent;
  553. border-right: 5px solid transparent;
  554. border-top: 6px solid currentColor;
  555. margin-left: auto;
  556. transition: transform 0.2s;
  557. }
  558. details[open] .guide-summary::after {
  559. transform: rotate(180deg);
  560. }
  561. .guide-summary::-webkit-details-marker {
  562. display: none;
  563. }
  564. .guide-container {
  565. border-top: 1px solid var(--border-color);
  566. }
  567. .guide-header {
  568. background: var(--bg-color);
  569. padding: 10px 20px 0;
  570. border-bottom: 1px solid var(--border-color);
  571. }
  572. .guide-tabs {
  573. display: flex;
  574. gap: 10px;
  575. }
  576. .guide-tab {
  577. padding: 10px 15px;
  578. border: none;
  579. background: transparent;
  580. cursor: pointer;
  581. font-size: 13px;
  582. font-weight: 500;
  583. color: var(--text-secondary);
  584. border-bottom: 3px solid transparent;
  585. transition: all 0.2s;
  586. }
  587. .guide-tab:hover {
  588. color: var(--primary-color);
  589. }
  590. .guide-tab.active {
  591. color: var(--primary-color);
  592. border-bottom-color: var(--primary-color);
  593. }
  594. .guide-body {
  595. padding: 20px;
  596. }
  597. .guide-content {
  598. display: none;
  599. }
  600. .guide-content.active {
  601. display: block;
  602. }
  603. .guide-content p {
  604. font-size: 14px;
  605. margin-bottom: 15px;
  606. }
  607. .guide-content ol {
  608. padding-left: 20px;
  609. }
  610. .guide-content li {
  611. font-size: 14px;
  612. margin-bottom: 10px;
  613. color: var(--text-secondary);
  614. }
  615. .guide-content pre {
  616. background: #f8f9fa;
  617. border: 1px solid var(--border-color);
  618. padding: 12px;
  619. border-radius: 6px;
  620. margin: 8px 0;
  621. font-family: "Monaco", "Consolas", monospace;
  622. font-size: 12px;
  623. overflow-x: auto;
  624. color: var(--text-color);
  625. }
  626. .guide-footer {
  627. padding: 12px 20px;
  628. background: #fdfdfd;
  629. border-top: 1px solid var(--border-color);
  630. text-align: right;
  631. }
  632. /* Toast */
  633. .toast {
  634. position: fixed;
  635. top: 20px;
  636. right: 20px;
  637. background: var(--success-color);
  638. color: white;
  639. padding: 12px 24px;
  640. border-radius: 8px;
  641. z-index: 10000;
  642. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  643. animation: slideIn 0.3s ease;
  644. }
  645. .inline-code {
  646. background: #f5f5f5;
  647. padding: 2px 6px;
  648. border-radius: 4px;
  649. font-family: monospace;
  650. }
  651. @keyframes slideIn {
  652. from {
  653. transform: translateX(100%);
  654. opacity: 0;
  655. }
  656. to {
  657. transform: translateX(0);
  658. opacity: 1;
  659. }
  660. }
  661. /* ==========================================================================
  662. 5. Responsive Adaptation
  663. ========================================================================== */
  664. @media (max-width: 1024px) {
  665. .container {
  666. grid-template-columns: 1fr;
  667. max-width: 800px;
  668. margin: 30px auto;
  669. }
  670. }
  671. @media (max-width: 768px) {
  672. .header-content {
  673. padding: 15px 20px;
  674. }
  675. .logo-wide {
  676. height: 24px;
  677. }
  678. .logo .subtitle,
  679. .version-label {
  680. display: none;
  681. }
  682. .version-select {
  683. min-width: auto;
  684. padding: 6px 10px;
  685. }
  686. main {
  687. padding: 0 15px;
  688. margin: 20px auto;
  689. }
  690. .selector-panel,
  691. .result-panel {
  692. padding: 20px;
  693. }
  694. .selector-group-inline {
  695. flex-direction: column;
  696. gap: 20px;
  697. }
  698. .selector-item.flex-2,
  699. .selector-item.flex-4 {
  700. flex: none;
  701. width: 100%;
  702. min-width: 0;
  703. }
  704. .button-grid,
  705. .card-grid {
  706. grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
  707. gap: 8px;
  708. }
  709. .button-grid .option-button {
  710. min-width: 90px;
  711. }
  712. .option-button {
  713. height: 38px;
  714. font-size: 13px;
  715. padding: 0 8px;
  716. }
  717. .image-tabs-header {
  718. display: flex;
  719. overflow-x: auto;
  720. }
  721. .image-tab {
  722. flex: 1;
  723. padding: 10px 15px;
  724. }
  725. .guide-tabs {
  726. overflow-x: auto;
  727. white-space: nowrap;
  728. }
  729. .guide-tab {
  730. flex: 0 0 auto;
  731. }
  732. }