This repository has been archived on 2026-09-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
swr/examples/vite-solid/src/App.css
T
2026-09-05 04:33:55 +05:30

189 lines
3.2 KiB
CSS

:root {
--primary: #58c4dc;
--bg: #0f172a;
--card-bg: rgba(30, 41, 59, 0.7);
--text: #f8fafc;
--text-muted: #94a3b8;
--border: rgba(255, 255, 255, 0.1);
}
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: radial-gradient(circle at top right, #1e293b, #0f172a);
color: var(--text);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
padding: 2rem;
}
header {
text-align: center;
margin-bottom: 3rem;
}
header h1 {
font-size: 3.5rem;
font-weight: 800;
margin: 0;
letter-spacing: -0.02em;
}
header h1 span {
color: var(--primary);
}
header p {
color: var(--text-muted);
font-size: 1.25rem;
margin-top: 0.5rem;
}
.controls {
display: flex;
align-items: center;
gap: 1.5rem;
margin-bottom: 2rem;
justify-content: center;
}
button {
background: var(--primary);
color: var(--bg);
border: none;
padding: 0.75rem 1.5rem;
border-radius: 9999px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(88, 196, 220, 0.3);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.id-badge {
font-family: monospace;
font-size: 1.2rem;
background: rgba(255, 255, 255, 0.05);
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: 1px solid var(--border);
}
.card-container {
perspective: 1000px;
}
.card {
width: 320px;
background: var(--card-bg);
backdrop-filter: blur(12px);
border: 1px solid var(--border);
border-radius: 1.5rem;
overflow: hidden;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
transition: all 0.5s ease;
position: relative;
}
.card.loading {
opacity: 0.7;
transform: scale(0.98);
}
.image-wrapper {
position: relative;
height: 320px;
}
.image-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
}
.status-badge {
position: absolute;
top: 1rem;
right: 1rem;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
backdrop-filter: blur(8px);
background: rgba(0, 0, 0, 0.5);
}
.status-badge.alive { color: #4ade80; }
.status-badge.dead { color: #f87171; }
.status-badge.unknown { color: #94a3b8; }
.content {
padding: 1.5rem;
}
.content h2 {
margin: 0;
font-size: 1.5rem;
}
.species {
color: var(--text-muted);
margin: 0.25rem 0 1rem 0;
}
.info label {
display: block;
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.25rem;
}
.info p {
margin: 0;
font-weight: 500;
}
.refresh-indicator {
position: absolute;
bottom: 0.5rem;
right: 1rem;
font-size: 0.7rem;
color: var(--primary);
animation: pulse 2s infinite;
}
.skeleton {
height: 480px;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
@keyframes pulse {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}
footer {
margin-top: 4rem;
color: var(--text-muted);
}