/* Global scroll & tap highlight */ html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; } :root { --bg: #f9f9f9; --text: #111; --card: #fff; --border: #ccc; --accent: #007bff; } [data-theme="dark"] { --bg: #1e1e1e; --text: #f5f5f5; --card: #2a2a2a; --border: #444; --accent: #4da3ff; } * { box-sizing: border-box; } body { margin: 0; font-family: sans-serif; background: var(--bg); color: var(--text); padding: 1rem; transition: background-color 0.4s ease, color 0.4s ease; } .container { max-width: 900px; margin: auto; } /* HEADER */ header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } header h1 { margin: 0; font-weight: 700; font-size: 1.8rem; } /* Theme Switch */ .theme-toggle { user-select: none; cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 0.3rem; font-family: monospace; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease, color 0.25s ease; } .theme-switch { position: relative; width: 48px; height: 24px; background: var(--border); border-radius: 12px; cursor: pointer; display: flex; align-items: center; padding: 0 4px; box-sizing: border-box; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease; } .theme-switch-circle { position: absolute; top: 2px; width: 20px; height: 20px; background: var(--card); border-radius: 50%; transition: left 0.3s ease, background-color 0.3s ease; box-shadow: 0 0 4px rgba(0,0,0,0.3); } [data-theme="light"] .theme-switch-circle { left: 4px; } [data-theme="dark"] .theme-switch-circle { left: 24px; } /* Text next to switch */ .theme-labels { display: flex; gap: 6px; font-size: 0.9rem; -webkit-tap-highlight-color: transparent; } .theme-label { color: var(--text); user-select: none; transition: opacity 0.3s ease; } .theme-label.light { opacity: 1; } .theme-label.dark { opacity: 0.5; } [data-theme="dark"] .theme-label.light { opacity: 0.5; } [data-theme="dark"] .theme-label.dark { opacity: 1; } /* Tabs container - horizontal scroll with snap */ .tabs { display: flex; gap: 1rem; margin-bottom: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; /* scrollbar-width: thin; */ scrollbar-width: none; scrollbar-color: var(--accent) transparent; } .tabs::-webkit-scrollbar { height: 6px; } .tabs::-webkit-scrollbar-track { background: transparent; } .tabs::-webkit-scrollbar-thumb { background-color: var(--accent); border-radius: 3px; } .tab { flex: 0 0 auto; cursor: pointer; padding: 0.5rem 1rem; border-bottom: 3px solid transparent; user-select: none; -webkit-tap-highlight-color: transparent; transition: border-color 0.3s ease, font-weight 0.3s ease; scroll-snap-align: start; white-space: nowrap; border-radius: 4px 4px 0 0; } .tab.active { border-color: var(--accent); font-weight: bold; background-color: var(--card); } /* API Container */ #api-list { overflow: auto; max-height: 450px; scrollbar-width: none; } /* API Card */ .api-card { background: var(--card); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid var(--border); transition: background-color 0.3s ease, color 0.3s ease; } .api-card button { background: var(--accent); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease; } .api-card button:focus, .api-card button:active { outline: none; background-color: #0056b3; } /* Playground Card */ .playground-card { background: var(--card); border-radius: 10px; padding: 2rem; margin-top: 1rem; box-shadow: 0 0 20px rgba(0,0,0,0.1); position: relative; animation: slideIn 0.3s ease-out; display: flex; flex-direction: column; transition: background-color 0.3s ease, color 0.3s ease; } @keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } } /* Close Button */ .close-btn { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; background: #ff4d4f; color: white; border: none; border-radius: 6px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.25s ease; } .close-btn:focus, .close-btn:active { outline: none; background-color: #d9363e; } input, textarea { width: 100%; padding: 0.75rem; margin-top: 0.5rem; margin-bottom: 1rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: monospace; font-size: 1rem; transition: background-color 0.3s ease, color 0.3s ease; } textarea { min-height: 100px; resize: vertical; } /* Playground Footer with centered Send Request */ .playground-footer { display: flex; justify-content: center; margin-top: 1rem; width: 100%; } .playground-footer button { background: var(--accent); color: white; border: none; padding: 0.6rem 1.5rem; border-radius: 6px; cursor: pointer; width: 100%; max-width: 360px; font-weight: 600; font-size: 1rem; user-select: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s ease; } .playground-footer button:hover, .playground-footer button:focus, .playground-footer button:active { background: #0056b3; outline: none; } /* Response box */ .response { background: #222; color: #0f0; white-space: pre-wrap; font-family: monospace; border-radius: 6px; padding: 1rem; overflow: auto; max-height: 300px; margin-top: 1rem; border: 1px solid #333; transition: background-color 0.3s ease, color 0.3s ease; } /* Tabs fade + slide animation */ #api-list-tab, #docs-tab, #apikey-tab, #contact-tab { opacity: 1; transform: translateY(0); transition: opacity 0.3s ease, transform 0.3s ease; height: auto; pointer-events: auto; } .hidden { opacity: 0; transform: translateY(20px); pointer-events: none; height: 0 !important; overflow: hidden; transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease; } /* Responsive */ @media (max-width: 600px) { .container { padding: 0 0.5rem; } header h1 { font-size: 1.4rem; } .playground-card { padding: 1rem; } input, textarea { font-size: 0.9rem; } .playground-footer button { max-width: 100%; } }