Files
2026-07-13 12:58:18 +08:00

818 lines
15 KiB
CSS

/**
* MCP Apps Design System
* Glassmorphism theme with CopilotKit brand colors
*
* This is a REFERENCE file - styles are inlined into each HTML app.
* Update this file, then copy relevant sections to each app.
*/
/* ============================================
FONTS
============================================ */
/* Google Fonts import - works in sandboxed iframes */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");
/* ============================================
COLOR PALETTE (CopilotKit Brand)
============================================ */
:root {
/* Primary accents */
--color-lilac: #bec2ff;
--color-lilac-light: #d4d7ff;
--color-lilac-dark: #9599e0;
--color-mint: #85e0ce;
--color-mint-light: #a8ebe0;
--color-mint-dark: #1b936f;
/* Surfaces */
--color-surface: #dedee9;
--color-surface-light: #f7f7f9;
--color-surface-darker: #dbdbe5;
--color-container: #ffffff;
--color-container-glass: rgba(255, 255, 255, 0.7);
/* Text */
--color-text-primary: #010507;
--color-text-secondary: #57575b;
--color-text-disabled: #838389;
--color-text-invert: #ffffff;
/* Borders */
--color-border: #dbdbe5;
--color-border-glass: rgba(255, 255, 255, 0.3);
/* Status colors */
--color-success: #22c55e;
--color-success-light: #dcfce7;
--color-warning: #f59e0b;
--color-warning-light: #fef3c7;
--color-error: #ef4444;
--color-error-light: #fee2e2;
--color-info: #3b82f6;
--color-info-light: #dbeafe;
}
/* ============================================
TYPOGRAPHY
============================================ */
:root {
--font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
/* Type scale */
--text-xs: 0.75rem; /* 12px */
--text-sm: 0.875rem; /* 14px */
--text-base: 1rem; /* 16px */
--text-lg: 1.125rem; /* 18px */
--text-xl: 1.25rem; /* 20px */
--text-2xl: 1.5rem; /* 24px */
--text-3xl: 2rem; /* 32px */
--text-4xl: 2.5rem; /* 40px */
/* Font weights */
--font-normal: 400;
--font-medium: 500;
--font-semibold: 600;
--font-bold: 700;
/* Line heights */
--leading-tight: 1.25;
--leading-normal: 1.5;
--leading-relaxed: 1.625;
}
/* ============================================
SPACING
============================================ */
:root {
--space-1: 0.25rem; /* 4px */
--space-2: 0.5rem; /* 8px */
--space-3: 0.75rem; /* 12px */
--space-4: 1rem; /* 16px */
--space-5: 1.25rem; /* 20px */
--space-6: 1.5rem; /* 24px */
--space-8: 2rem; /* 32px */
--space-10: 2.5rem; /* 40px */
--space-12: 3rem; /* 48px */
}
/* ============================================
SHADOWS
============================================ */
:root {
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
--shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);
--shadow-glow-lilac: 0 0 20px rgba(190, 194, 255, 0.4);
--shadow-glow-mint: 0 0 20px rgba(133, 224, 206, 0.4);
}
/* ============================================
BORDER RADIUS
============================================ */
:root {
--radius-sm: 0.375rem; /* 6px */
--radius-md: 0.5rem; /* 8px */
--radius-lg: 0.75rem; /* 12px */
--radius-xl: 1rem; /* 16px */
--radius-2xl: 1.5rem; /* 24px */
--radius-full: 9999px;
}
/* ============================================
ANIMATIONS
============================================ */
:root {
--transition-fast: 150ms ease;
--transition-base: 200ms ease;
--transition-slow: 300ms ease;
--transition-slower: 500ms ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@keyframes blob {
0%,
100% {
transform: translate(0, 0) scale(1);
}
25% {
transform: translate(20px, -30px) scale(1.1);
}
50% {
transform: translate(-20px, 20px) scale(0.9);
}
75% {
transform: translate(30px, 10px) scale(1.05);
}
}
/* ============================================
GLASSMORPHISM BASE CLASSES
============================================ */
.glass {
background: var(--color-container-glass);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--color-border-glass);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-glass);
}
.glass-subtle {
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: var(--radius-lg);
}
.glass-dark {
background: rgba(1, 5, 7, 0.7);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--radius-xl);
color: var(--color-text-invert);
}
/* ============================================
ABSTRACT SHAPES BACKGROUND
============================================ */
.abstract-bg {
position: fixed;
inset: 0;
overflow: hidden;
background: var(--color-surface);
z-index: -1;
}
.abstract-bg::before,
.abstract-bg::after {
content: "";
position: absolute;
border-radius: 50%;
filter: blur(80px);
opacity: 0.6;
animation: blob 20s ease-in-out infinite;
}
.abstract-bg::before {
width: 500px;
height: 500px;
background: var(--color-lilac);
top: -100px;
right: -100px;
animation-delay: 0s;
}
.abstract-bg::after {
width: 400px;
height: 400px;
background: var(--color-mint);
bottom: -50px;
left: -50px;
animation-delay: -7s;
}
/* Third blob via additional element */
.abstract-blob {
position: absolute;
width: 350px;
height: 350px;
background: var(--color-lilac-light);
border-radius: 50%;
filter: blur(80px);
opacity: 0.5;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: blob 25s ease-in-out infinite;
animation-delay: -14s;
}
/* ============================================
BUTTON STYLES
============================================ */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
padding: var(--space-2) var(--space-4);
font-family: var(--font-family);
font-size: var(--text-sm);
font-weight: var(--font-medium);
line-height: var(--leading-normal);
border-radius: var(--radius-lg);
border: none;
cursor: pointer;
transition: all var(--transition-fast);
}
.btn:focus-visible {
outline: 2px solid var(--color-lilac);
outline-offset: 2px;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary {
background: var(--color-lilac);
color: var(--color-text-primary);
}
.btn-primary:hover:not(:disabled) {
background: var(--color-lilac-dark);
box-shadow: var(--shadow-glow-lilac);
}
.btn-primary:active:not(:disabled) {
transform: scale(0.98);
}
.btn-secondary {
background: var(--color-container-glass);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid var(--color-border);
color: var(--color-text-primary);
}
.btn-secondary:hover:not(:disabled) {
background: var(--color-container);
border-color: var(--color-lilac);
}
.btn-ghost {
background: transparent;
color: var(--color-text-secondary);
}
.btn-ghost:hover:not(:disabled) {
background: rgba(0, 0, 0, 0.05);
color: var(--color-text-primary);
}
.btn-success {
background: var(--color-mint);
color: var(--color-text-primary);
}
.btn-success:hover:not(:disabled) {
background: var(--color-mint-dark);
color: var(--color-text-invert);
box-shadow: var(--shadow-glow-mint);
}
.btn-danger {
background: var(--color-error);
color: var(--color-text-invert);
}
.btn-danger:hover:not(:disabled) {
background: #dc2626;
}
/* ============================================
CARD STYLES
============================================ */
.card {
background: var(--color-container-glass);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--color-border-glass);
border-radius: var(--radius-xl);
padding: var(--space-4);
box-shadow: var(--shadow-glass);
}
.card-header {
display: flex;
align-items: center;
gap: var(--space-3);
margin-bottom: var(--space-4);
}
.card-title {
font-size: var(--text-lg);
font-weight: var(--font-semibold);
color: var(--color-text-primary);
}
.card-subtitle {
font-size: var(--text-sm);
color: var(--color-text-secondary);
}
/* ============================================
FORM ELEMENTS
============================================ */
.input {
width: 100%;
padding: var(--space-2) var(--space-3);
font-family: var(--font-family);
font-size: var(--text-sm);
background: var(--color-container-glass);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
transition: all var(--transition-fast);
}
.input:focus {
outline: none;
border-color: var(--color-lilac);
box-shadow: 0 0 0 3px rgba(190, 194, 255, 0.2);
}
.input::placeholder {
color: var(--color-text-disabled);
}
/* ============================================
UTILITY CLASSES
============================================ */
/* Display */
.hidden {
display: none;
}
.block {
display: block;
}
.flex {
display: flex;
}
.inline-flex {
display: inline-flex;
}
.grid {
display: grid;
}
/* Flex */
.flex-col {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.items-center {
align-items: center;
}
.items-start {
align-items: flex-start;
}
.items-end {
align-items: flex-end;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.justify-end {
justify-content: flex-end;
}
.flex-1 {
flex: 1;
}
.flex-shrink-0 {
flex-shrink: 0;
}
/* Gap */
.gap-1 {
gap: var(--space-1);
}
.gap-2 {
gap: var(--space-2);
}
.gap-3 {
gap: var(--space-3);
}
.gap-4 {
gap: var(--space-4);
}
.gap-6 {
gap: var(--space-6);
}
/* Padding */
.p-2 {
padding: var(--space-2);
}
.p-3 {
padding: var(--space-3);
}
.p-4 {
padding: var(--space-4);
}
.p-6 {
padding: var(--space-6);
}
.px-2 {
padding-left: var(--space-2);
padding-right: var(--space-2);
}
.px-3 {
padding-left: var(--space-3);
padding-right: var(--space-3);
}
.px-4 {
padding-left: var(--space-4);
padding-right: var(--space-4);
}
.py-1 {
padding-top: var(--space-1);
padding-bottom: var(--space-1);
}
.py-2 {
padding-top: var(--space-2);
padding-bottom: var(--space-2);
}
.py-3 {
padding-top: var(--space-3);
padding-bottom: var(--space-3);
}
/* Margin */
.m-0 {
margin: 0;
}
.mt-2 {
margin-top: var(--space-2);
}
.mt-3 {
margin-top: var(--space-3);
}
.mt-4 {
margin-top: var(--space-4);
}
.mb-2 {
margin-bottom: var(--space-2);
}
.mb-3 {
margin-bottom: var(--space-3);
}
.mb-4 {
margin-bottom: var(--space-4);
}
.ml-auto {
margin-left: auto;
}
.mr-auto {
margin-right: auto;
}
/* Width/Height */
.w-full {
width: 100%;
}
.h-full {
height: 100%;
}
.min-h-screen {
min-height: 100vh;
}
/* Position */
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.fixed {
position: fixed;
}
.inset-0 {
inset: 0;
}
/* Text */
.text-xs {
font-size: var(--text-xs);
}
.text-sm {
font-size: var(--text-sm);
}
.text-base {
font-size: var(--text-base);
}
.text-lg {
font-size: var(--text-lg);
}
.text-xl {
font-size: var(--text-xl);
}
.text-2xl {
font-size: var(--text-2xl);
}
.text-3xl {
font-size: var(--text-3xl);
}
.font-normal {
font-weight: var(--font-normal);
}
.font-medium {
font-weight: var(--font-medium);
}
.font-semibold {
font-weight: var(--font-semibold);
}
.font-bold {
font-weight: var(--font-bold);
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.leading-tight {
line-height: var(--leading-tight);
}
.leading-normal {
line-height: var(--leading-normal);
}
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Colors */
.text-primary {
color: var(--color-text-primary);
}
.text-secondary {
color: var(--color-text-secondary);
}
.text-disabled {
color: var(--color-text-disabled);
}
.text-success {
color: var(--color-success);
}
.text-error {
color: var(--color-error);
}
.text-lilac {
color: var(--color-lilac-dark);
}
.text-mint {
color: var(--color-mint-dark);
}
/* Background */
.bg-surface {
background: var(--color-surface);
}
.bg-container {
background: var(--color-container);
}
.bg-glass {
background: var(--color-container-glass);
}
.bg-lilac {
background: var(--color-lilac);
}
.bg-mint {
background: var(--color-mint);
}
.bg-success-light {
background: var(--color-success-light);
}
.bg-error-light {
background: var(--color-error-light);
}
/* Border */
.border {
border: 1px solid var(--color-border);
}
.border-glass {
border: 1px solid var(--color-border-glass);
}
.border-lilac {
border-color: var(--color-lilac);
}
.rounded-md {
border-radius: var(--radius-md);
}
.rounded-lg {
border-radius: var(--radius-lg);
}
.rounded-xl {
border-radius: var(--radius-xl);
}
.rounded-full {
border-radius: var(--radius-full);
}
/* Shadow */
.shadow-sm {
box-shadow: var(--shadow-sm);
}
.shadow-md {
box-shadow: var(--shadow-md);
}
.shadow-lg {
box-shadow: var(--shadow-lg);
}
.shadow-glass {
box-shadow: var(--shadow-glass);
}
/* Overflow */
.overflow-hidden {
overflow: hidden;
}
.overflow-auto {
overflow: auto;
}
.overflow-x-auto {
overflow-x: auto;
}
/* Cursor */
.cursor-pointer {
cursor: pointer;
}
.cursor-grab {
cursor: grab;
}
.cursor-grabbing {
cursor: grabbing;
}
/* Transitions */
.transition {
transition: all var(--transition-base);
}
.transition-fast {
transition: all var(--transition-fast);
}
/* Animation */
.animate-fadeIn {
animation: fadeIn var(--transition-base) ease;
}
.animate-slideUp {
animation: slideUp var(--transition-base) ease;
}
.animate-spin {
animation: spin 1s linear infinite;
}
.animate-pulse {
animation: pulse 2s ease-in-out infinite;
}
/* Opacity */
.opacity-0 {
opacity: 0;
}
.opacity-50 {
opacity: 0.5;
}
.opacity-75 {
opacity: 0.75;
}
.opacity-100 {
opacity: 1;
}
/* Z-index */
.z-0 {
z-index: 0;
}
.z-10 {
z-index: 10;
}
.z-20 {
z-index: 20;
}
.z-50 {
z-index: 50;
}