243 lines
5.3 KiB
CSS
243 lines
5.3 KiB
CSS
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=TikTok+Sans:opsz,wght@12..36,300..900&display=swap');
|
|
|
|
/* reset and base styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.body-container {
|
|
--demo-background: radial-gradient(
|
|
125% 125% at 50% 90%,
|
|
#fff 40%,
|
|
#7c3aed 100%
|
|
);
|
|
--demo-border: rgba(255, 255, 255, 0.2);
|
|
--demo-card-background: #fff;
|
|
--demo-card-shadow: rgba(0, 0, 0, 0.1);
|
|
--demo-docsearch-button-background: #f7fafc;
|
|
--demo-docsearch-button-border: #e2e8f0;
|
|
--demo-docsearch-button-hover-border: #667eea;
|
|
--demo-docsearch-button-hover-shadow: rgba(102, 126, 234, 0.15);
|
|
--demo-docsearch-button-placeholder: #718096;
|
|
--demo-divider: #e2e8f0;
|
|
--demo-text-primary: #111;
|
|
--demo-text-secondary: #666;
|
|
--demo-theme-button-background: #fff;
|
|
--demo-theme-button-border: #d6d6e7;
|
|
--demo-theme-button-hover-border: #7c3aed;
|
|
min-height: 100vh;
|
|
background: var(--demo-background);
|
|
color: var(--demo-text-primary);
|
|
}
|
|
|
|
.body-container[data-theme='dark'] {
|
|
--demo-background: radial-gradient(
|
|
125% 125% at 50% 90%,
|
|
#161025 40%,
|
|
#4c1d95 100%
|
|
);
|
|
--demo-border: rgba(255, 255, 255, 0.1);
|
|
--demo-card-background: #1f1b2e;
|
|
--demo-card-shadow: rgba(0, 0, 0, 0.35);
|
|
--demo-docsearch-button-background: #15111f;
|
|
--demo-docsearch-button-border: #3b3550;
|
|
--demo-docsearch-button-hover-border: #a78bfa;
|
|
--demo-docsearch-button-hover-shadow: rgba(167, 139, 250, 0.2);
|
|
--demo-docsearch-button-placeholder: #c4b5fd;
|
|
--demo-divider: #3b3550;
|
|
--demo-text-primary: #f8f7ff;
|
|
--demo-text-secondary: #c9c3dc;
|
|
--demo-theme-button-background: #2d2540;
|
|
--demo-theme-button-border: #5b4a78;
|
|
--demo-theme-button-hover-border: #c4b5fd;
|
|
}
|
|
|
|
body {
|
|
font-family: 'TikTok Sans', 'sans-serif';
|
|
min-height: 100vh;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* container styles */
|
|
.app-container {
|
|
max-width: 1024px;
|
|
margin: 0 auto;
|
|
padding: 2rem 1rem;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* header styles */
|
|
.app-header {
|
|
text-align: center;
|
|
margin-block-end: 3rem;
|
|
}
|
|
|
|
.app-title {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: var(--demo-text-primary);
|
|
margin-block-end: 0;
|
|
}
|
|
|
|
.app-subtitle {
|
|
font-size: 1rem;
|
|
color: var(--demo-text-secondary);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.theme-switcher {
|
|
margin-block-start: 1rem;
|
|
border: 1px solid var(--demo-theme-button-border);
|
|
border-radius: 100vw;
|
|
background: var(--demo-theme-button-background);
|
|
color: var(--demo-text-primary);
|
|
cursor: pointer;
|
|
font: inherit;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
inline-size: 2.5rem;
|
|
block-size: 2.5rem;
|
|
position: absolute;
|
|
top: 2rem;
|
|
right: 4rem;
|
|
}
|
|
|
|
.theme-switcher svg {
|
|
inline-size: 1.25rem;
|
|
block-size: 1.25rem;
|
|
}
|
|
|
|
.theme-switcher:hover {
|
|
border-color: var(--demo-theme-button-hover-border);
|
|
}
|
|
|
|
main {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
grid-template-rows: repeat(3, 1fr);
|
|
gap: 8px;
|
|
}
|
|
|
|
/* demo section styles */
|
|
.demo-section {
|
|
background: var(--demo-card-background);
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
box-shadow: 0 10px 30px var(--demo-card-shadow);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid var(--demo-border);
|
|
}
|
|
|
|
.section-description {
|
|
text-align: center;
|
|
color: var(--demo-text-secondary);
|
|
font-family: 'Source Code Pro', monospace;
|
|
font-size: 0.9rem;
|
|
margin-block-end: 1rem;
|
|
margin-block-start: -1rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.ai-powered {
|
|
text-decoration: underline;
|
|
text-decoration-color: #f2e8ff;
|
|
text-underline-offset: 4px;
|
|
text-decoration-thickness: 2px;
|
|
}
|
|
|
|
/* search component wrapper */
|
|
.search-wrapper,
|
|
.default-wrapper {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 60px;
|
|
}
|
|
|
|
.search-wrapper.column {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* divider styles */
|
|
.divider {
|
|
border: none;
|
|
height: 1px;
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent,
|
|
var(--demo-divider),
|
|
transparent
|
|
);
|
|
margin: 0;
|
|
}
|
|
|
|
/* responsive design */
|
|
@media (max-width: 768px) {
|
|
.app-container {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.app-title {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.demo-section {
|
|
padding: 1.5rem;
|
|
}
|
|
.section-description {
|
|
font-size: 0.8rem;
|
|
}
|
|
}
|
|
|
|
/* docsearch button customization */
|
|
.search-wrapper .DocSearch-Button {
|
|
margin: 0 !important;
|
|
background: var(--demo-docsearch-button-background) !important;
|
|
border: 2px solid var(--demo-docsearch-button-border) !important;
|
|
border-radius: 12px !important;
|
|
padding: 12px 16px !important;
|
|
font-size: 16px !important;
|
|
transition: all 0.2s ease !important;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
|
|
}
|
|
|
|
.search-wrapper .DocSearch-Button:hover {
|
|
border-color: var(--demo-docsearch-button-hover-border) !important;
|
|
box-shadow: 0 4px 12px var(--demo-docsearch-button-hover-shadow) !important;
|
|
transform: translateY(-1px) !important;
|
|
}
|
|
|
|
.search-wrapper .DocSearch-Button-Placeholder {
|
|
color: var(--demo-docsearch-button-placeholder) !important;
|
|
}
|
|
|
|
/* add subtle animations */
|
|
.demo-section {
|
|
animation: fadeInUp 0.6s ease forwards;
|
|
}
|
|
|
|
.demo-section:nth-child(2) {
|
|
animation-delay: 0.1s;
|
|
}
|
|
|
|
.demo-section:nth-child(3) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|