| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- :root {
- --bg-color: #111;
- --text-color: #9b9b9b;
- --highlight-color: #ff4b4b;
- --secondary-color: #2a2a2e;
- --accent-color: #ff9f43;
- --code-bg: #000;
- --orange: #FF8F42;
- --border-color: #222;
- --panel-bg: #171717;
- --panel-bg-2: #141414;
- --muted-1: #666;
- --muted-2: #888;
- --text-strong: #e6e6e6;
- --shadow-1: 0 10px 40px rgba(0,0,0,0.25);
- }
- body {
- background-color: var(--bg-color);
- color: var(--text-color);
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
- margin: 0;
- padding: 60px 60px;
- display: flex;
- justify-content: center;
- overflow-y: auto;
- }
- /* Auto-hide scrollbar (shown only on scroll/hover via parent) */
- html, body {
- scrollbar-width: none; /* Firefox (hidden by default) */
- -ms-overflow-style: none; /* IE/old Edge */
- }
- html::-webkit-scrollbar,
- body::-webkit-scrollbar {
- width: 0 !important;
- height: 0 !important;
- }
- /* Some pages may scroll a nested container; hide vertical scrollbars by default */
- *::-webkit-scrollbar:vertical {
- width: 0 !important;
- }
- /* Shown when scrolling (class is toggled by doc/index.html) */
- html.scrolling,
- body.scrolling {
- scrollbar-width: thin; /* Firefox */
- scrollbar-color: rgba(0, 0, 0, 0.9) transparent;
- }
- html.scrolling::-webkit-scrollbar,
- body.scrolling::-webkit-scrollbar {
- width: 6px !important;
- height: 6px !important;
- }
- html.scrolling::-webkit-scrollbar-track,
- body.scrolling::-webkit-scrollbar-track {
- background: transparent;
- }
- html.scrolling::-webkit-scrollbar-thumb,
- body.scrolling::-webkit-scrollbar-thumb {
- background: rgba(0, 0, 0, 0.95) !important;
- border-radius: 999px;
- }
- html.scrolling::-webkit-scrollbar-thumb:hover,
- body.scrolling::-webkit-scrollbar-thumb:hover {
- background: rgba(0, 0, 0, 1);
- }
- /* Show vertical scrollbars (narrow + black) for any scrolled container while scrolling */
- html.scrolling *::-webkit-scrollbar:vertical,
- body.scrolling *::-webkit-scrollbar:vertical {
- width: 6px !important;
- }
- html.scrolling *::-webkit-scrollbar-thumb,
- body.scrolling *::-webkit-scrollbar-thumb {
- background: rgba(0, 0, 0, 0.95) !important;
- border-radius: 999px;
- }
- html.scrolling *::-webkit-scrollbar-track,
- body.scrolling *::-webkit-scrollbar-track {
- background: transparent !important;
- }
- .container {
-
- width: 100%;
- }
- h1 {
- color: var(--orange);
- font-size: 42px;
- margin-bottom: 15px;
- font-weight: 600;
- letter-spacing: -1px;
- }
- .description {
- font-size: 18px;
- line-height: 1.5;
- margin-bottom: 40px;
- color: #ccc;
- }
- h2 {
- font-size: 24px;
- color: #fff;
- margin-bottom: 10px;
- font-weight: 500;
- }
- p {
- margin-top: 0;
- margin-bottom: 20px;
- line-height: 1.6;
- }
- code.inline {
- background: rgba(255,255,255,0.1);
- color: #e6e6e6;
- padding: 2px 6px;
- border-radius: 3px;
- font-family: 'Roboto Mono', monospace;
- font-size: 0.9em;
- }
- /* Page top meta (breadcrumb + since) */
- .page-top {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 18px;
- }
- .crumb {
- font-size: 10px;
- font-weight: 800;
- letter-spacing: 1px;
- color: var(--highlight-color);
- text-transform: uppercase;
- }
- .since {
- font-size: 10px;
- font-weight: 700;
- letter-spacing: 1px;
- color: #7a6a55;
- text-transform: uppercase;
- }
- /* Code & Demo Box */
- .box-container {
- margin-top: 50px;
- background: var(--panel-bg);
- border-radius: 6px;
- overflow: hidden;
- box-shadow: var(--shadow-1);
- }
- .box-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20px;
- height: 50px;
- background: rgba(255,255,255,0.02);
- border-bottom: 1px solid var(--border-color);
- }
- .box-title {
- color: var(--orange);
- font-weight: 600;
- font-size: 14px;
- }
- .box-right {
- display: flex;
- align-items: center;
- gap: 14px;
- height: 100%;
- }
- .tabs {
- display: flex;
- gap: 20px;
- height: 100%;
- }
- .tab {
- display: flex;
- align-items: center;
- height: 100%;
- cursor: pointer;
- color: #666;
- font-weight: 600;
- font-size: 13px;
- border-bottom: 2px solid transparent;
- transition: color 0.2s;
- }
- .tab:hover {
- color: #999;
- }
- .tab.active {
- color: var(--orange);
- border-bottom-color: var(--orange);
- }
- /* Code Views */
- .code-view, .html-view, .css-view {
- background: var(--code-bg);
- padding: 20px;
- font-family: 'Roboto Mono', 'Monaco', monospace;
- font-size: 13px;
- line-height: 1.6;
- color: #abb2bf;
- overflow-x: auto;
- display: none;
- white-space: pre; /* Use pre to respect indentation */
- margin: 0;
- }
- .code-view.active, .html-view.active, .css-view.active {
- display: block;
- }
- /* Reduce background paint cost while a layer is open */
- .layer-open .box-header,
- .layer-open .code-view,
- .layer-open .html-view,
- .layer-open .css-view,
- .layer-open .feature-desc {
- visibility: hidden;
- }
- /* Syntax Highlighting */
- .kwd { color: #c678dd; }
- .str { color: #98c379; }
- .fun { color: #61afef; }
- .num { color: #d19a66; }
- .tag { color: #e06c75; }
- .attr { color: #d19a66; }
- .val { color: #98c379; }
- .punc { color: #abb2bf; }
- .com { color: #5c6370; font-style: italic; }
- /* Header icon buttons (copy, etc.) */
- .icon-btn {
- appearance: none;
- border: 1px solid transparent;
- background: transparent;
- color: #777;
- width: 28px;
- height: 28px;
- border-radius: 8px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: border-color 0.15s, background 0.15s, color 0.15s;
- }
- .icon-btn:hover {
- color: #b0b0b0;
- border-color: #2a2a2a;
- background: rgba(255,255,255,0.03);
- }
- .icon-btn:active {
- transform: translateY(1px);
- }
- .icon-btn svg {
- width: 16px;
- height: 16px;
- display: block;
- }
- /* Visual Demo Area */
- .demo-visual {
- padding: 30px;
- background: #1a1a1a;
- border-top: 1px solid var(--border-color);
- min-height: 150px;
- /* Flex alignment defaults, can be overridden by specific page styles */
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .action-bar {
- padding: 15px 30px;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- gap: 10px;
- border-top: 1px solid var(--border-color);
- }
- .play-btn {
- background: transparent;
- border: 1px solid #444;
- color: #fff;
- padding: 6px 14px;
- border-radius: 100px;
- font-size: 12px;
- font-weight: 600;
- cursor: pointer;
- transition: all 0.2s;
- }
- .play-btn:hover {
- border-color: var(--orange);
- color: var(--orange);
- }
- /* Secondary action button (pause/resume) */
- .play-btn.secondary {
- border-color: #2f2f2f;
- color: #c8c8c8;
- background: rgba(255, 255, 255, 0.02);
- }
- .play-btn.secondary:hover {
- border-color: #5a5a5a;
- color: #e6e6e6;
- }
- /* Small per-demo note block (feature description) */
- .feature-desc {
- padding: 14px 20px;
- border-top: 1px solid var(--border-color);
- background: rgba(255, 255, 255, 0.01);
- color: #9a9a9a;
- font-size: 12px;
- line-height: 1.6;
- }
- .feature-desc strong {
- color: #ddd;
- font-weight: 700;
- }
- /* Toast */
- .toast {
- position: fixed;
- right: 16px;
- bottom: 16px;
- background: rgba(20,20,20,0.95);
- border: 1px solid #2a2a2a;
- color: #ddd;
- padding: 10px 12px;
- border-radius: 10px;
- font-size: 12px;
- box-shadow: 0 12px 30px rgba(0,0,0,0.35);
- opacity: 0;
- transform: translateY(10px);
- transition: opacity 0.18s, transform 0.18s;
- pointer-events: none;
- }
- .toast.show {
- opacity: 1;
- transform: translateY(0);
- }
- /* Previous / Next nav */
- .doc-nav {
- margin-top: 28px;
- padding-top: 18px;
- border-top: 1px solid var(--border-color);
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #aaa;
- font-size: 12px;
- }
- .doc-nav a {
- color: #aaa;
- text-decoration: none;
- padding: 10px 12px;
- border-radius: 10px;
- border: 1px solid transparent;
- min-width: 180px;
- display: inline-flex;
- align-items: center;
- justify-content: space-between;
- gap: 14px;
- background: rgba(255,255,255,0.02);
- }
- .doc-nav a:hover {
- border-color: #2a2a2a;
- background: rgba(255,255,255,0.03);
- color: #ddd;
- }
- .doc-nav .nav-label {
- color: #777;
- font-weight: 700;
- text-transform: uppercase;
- letter-spacing: 0.8px;
- font-size: 10px;
- }
- .doc-nav .nav-title {
- color: #cfcfcf;
- font-weight: 600;
- font-size: 12px;
- }
- .doc-nav .nav-center {
- color: #7a7a7a;
- font-weight: 600;
- letter-spacing: 0.4px;
- }
|