Files
test-openclaw/ui/src/styles/dreams.css
T

712 lines
13 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ===========================================
Dreams Tab – Sleeping Lobster Animation
=========================================== */
.dreams-page {
display: flex;
flex-direction: column;
height: 100%;
}
/* ---- Sub-tab bar ---- */
.dreams__tabs {
display: flex;
align-items: center;
gap: 2px;
padding: 6px 8px;
flex-shrink: 0;
}
.dreams__tab {
padding: 4px 14px;
border: none;
border-radius: 6px;
background: transparent;
color: var(--muted);
font-family: inherit;
font-size: 11px;
font-weight: 500;
letter-spacing: 0.04em;
text-transform: uppercase;
cursor: pointer;
transition:
color 140ms ease,
background 140ms ease;
}
.dreams__tab:hover {
color: var(--text);
}
.dreams__tab--active {
color: var(--text);
background: color-mix(in oklab, var(--panel) 80%, transparent);
}
.dreams {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: calc(100vh - 64px);
overflow: hidden;
user-select: none;
}
/* ---- Breathing lobster ---- */
.dreams__lobster {
animation: dreams-breathe 4s ease-in-out infinite;
filter: drop-shadow(0 0 40px rgba(255, 77, 77, 0.25));
transition: filter 0.6s ease;
}
.dreams__lobster svg {
width: 160px;
height: 160px;
}
@keyframes dreams-breathe {
0%,
100% {
transform: scale(1) translateY(0);
}
50% {
transform: scale(1.04) translateY(-4px);
}
}
/* ---- Sleeping eyes overlay ---- */
.dreams__eyes {
animation: dreams-blink 6s ease-in-out infinite;
}
@keyframes dreams-blink {
0%,
90%,
100% {
opacity: 1;
}
95% {
opacity: 0;
}
}
/* ---- Floating Z's ---- */
.dreams__z {
position: absolute;
font-family: var(--mono);
font-weight: 700;
color: var(--accent);
opacity: 0;
animation: dreams-float-z 4s ease-out infinite;
}
/* Z's originate from the lobster's head and float up-right at an angle.
Use nth-of-type because Z's are <span> while stars/moon/glow are <div>. */
.dreams__z:nth-of-type(1) {
font-size: 14px;
left: calc(50% + 70px);
top: calc(50% - 90px);
animation-delay: 0s;
}
.dreams__z:nth-of-type(2) {
font-size: 20px;
left: calc(50% + 100px);
top: calc(50% - 130px);
animation-delay: 1.2s;
}
.dreams__z:nth-of-type(3) {
font-size: 28px;
left: calc(50% + 130px);
top: calc(50% - 175px);
animation-delay: 2.4s;
}
@keyframes dreams-float-z {
0% {
opacity: 0;
transform: translate(0, 0) rotate(-10deg);
}
15% {
opacity: 0.7;
}
80% {
opacity: 0.3;
}
100% {
opacity: 0;
transform: translate(20px, -40px) rotate(15deg);
}
}
/* ---- Stars ---- */
.dreams__star {
position: absolute;
border-radius: 50%;
animation: dreams-twinkle 3s ease-in-out infinite alternate;
}
@keyframes dreams-twinkle {
0% {
opacity: 0.15;
transform: scale(0.8);
}
100% {
opacity: 0.7;
transform: scale(1.2);
}
}
/* ---- Dream thought bubble ---- */
.dreams__bubble {
position: absolute;
top: calc(50% - 260px);
left: calc(50% - 200px);
padding: 16px 20px;
background: var(--accent-subtle);
border: 1px solid rgba(255, 92, 92, 0.12);
border-radius: 20px;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
animation: dreams-bubble-float 6s ease-in-out infinite;
pointer-events: none;
}
.dreams__bubble-label {
font-size: 11px;
color: var(--accent-muted);
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 600;
}
.dreams__bubble-text {
font-size: 16px;
color: var(--accent);
font-style: italic;
opacity: 0.8;
min-width: 180px;
text-align: center;
}
@keyframes dreams-bubble-float {
0%,
100% {
transform: translateY(0);
opacity: 0.8;
}
50% {
transform: translateY(-8px);
opacity: 1;
}
}
/* Bubble trail dots */
.dreams__bubble-dot {
position: absolute;
border-radius: 50%;
background: var(--accent-subtle);
border: 1px solid rgba(255, 92, 92, 0.1);
animation: dreams-bubble-float 6s ease-in-out infinite;
}
/* ---- Moon ---- */
.dreams__moon {
position: absolute;
top: 40px;
right: 80px;
width: 64px;
height: 64px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #fef3c7, #fbbf24);
box-shadow:
0 0 40px rgba(251, 191, 36, 0.2),
0 0 80px rgba(251, 191, 36, 0.08);
opacity: 0.7;
animation: dreams-moon-glow 8s ease-in-out infinite alternate;
}
@keyframes dreams-moon-glow {
0% {
box-shadow:
0 0 40px rgba(251, 191, 36, 0.2),
0 0 80px rgba(251, 191, 36, 0.08);
opacity: 0.6;
}
100% {
box-shadow:
0 0 50px rgba(251, 191, 36, 0.3),
0 0 100px rgba(251, 191, 36, 0.12);
opacity: 0.8;
}
}
/* ---- Ambient glow under lobster ---- */
.dreams__glow {
position: absolute;
top: calc(50% + 40px);
left: 50%;
transform: translateX(-50%);
width: 240px;
height: 100px;
border-radius: 50%;
background: radial-gradient(ellipse, rgba(255, 77, 77, 0.08) 0%, transparent 70%);
pointer-events: none;
animation: dreams-glow-pulse 4s ease-in-out infinite;
}
@keyframes dreams-glow-pulse {
0%,
100% {
opacity: 0.6;
}
50% {
opacity: 1;
}
}
/* ---- Stats bar ---- */
.dreams__stats {
display: flex;
align-items: center;
gap: 48px;
margin-top: 36px;
z-index: 1;
}
.dreams__stat {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.dreams__stat-value {
font-size: 28px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.dreams__stat-label {
font-size: 11px;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.dreams__stat-divider {
width: 1px;
height: 32px;
background: var(--border);
}
/* ---- Dreaming on/off toggle (header bar) ---- */
.dreams__phase-toggle {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 14px;
border-radius: var(--radius-full);
border: 1px solid var(--border);
background: color-mix(in oklab, var(--panel) 70%, transparent);
color: var(--muted);
font-size: 11px;
font-family: inherit;
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
transition:
border-color 200ms ease,
color 200ms ease;
}
.dreams__phase-toggle:hover {
border-color: color-mix(in oklab, var(--accent) 30%, var(--border));
}
.dreams__phase-toggle-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--muted);
opacity: 0.4;
transition:
background 200ms ease,
opacity 200ms ease,
box-shadow 200ms ease;
}
.dreams__phase-toggle--on .dreams__phase-toggle-dot {
background: var(--ok);
opacity: 1;
box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}
.dreams__phase-toggle--on {
color: var(--text);
border-color: color-mix(in oklab, var(--ok) 20%, var(--border));
}
.dreams__phase-toggle-label {
font-weight: 500;
}
.dreams__controls-error {
font-size: 12px;
color: var(--danger);
}
/* ---- Status line ---- */
.dreams__status {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
margin-top: 32px;
}
.dreams__status-label {
font-size: 13px;
color: var(--muted);
letter-spacing: 0.1em;
text-transform: uppercase;
font-weight: 500;
}
.dreams__status-detail {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--ok-muted);
}
.dreams__status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--ok);
animation: dreams-dot-pulse 2s ease-in-out infinite;
}
@keyframes dreams-dot-pulse {
0%,
100% {
opacity: 1;
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}
50% {
opacity: 0.7;
box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.2);
}
}
/* ---- Idle / inactive state ---- */
.dreams--idle .dreams__lobster {
filter: drop-shadow(0 0 20px rgba(255, 77, 77, 0.1));
}
.dreams--idle .dreams__status-dot {
background: var(--muted);
animation: none;
}
.dreams--idle .dreams__status-detail {
color: var(--muted);
}
/* ===========================================
Dream Diary – Scroll section below hero
=========================================== */
.dreams-diary {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding: 48px 24px 64px;
flex: 1;
min-height: 320px;
background: linear-gradient(
180deg,
var(--bg) 0%,
color-mix(in oklab, var(--bg) 94%, #0d0818) 40%,
color-mix(in oklab, var(--bg) 88%, #0d0818) 100%
);
}
/* Ambient shimmer across the diary surface */
.dreams-diary::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
135deg,
transparent 30%,
rgba(251, 191, 36, 0.012) 45%,
rgba(255, 77, 77, 0.015) 55%,
transparent 70%
);
background-size: 400% 400%;
animation: diary-shimmer 20s ease-in-out infinite;
pointer-events: none;
}
@keyframes diary-shimmer {
0%,
100% {
background-position: 0% 0%;
}
50% {
background-position: 100% 100%;
}
}
/* ---- Diary header ---- */
.dreams-diary__header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 32px;
width: 100%;
max-width: 520px;
position: relative;
z-index: 1;
}
.dreams-diary__title {
font-size: 10px;
font-weight: 500;
color: var(--muted);
letter-spacing: 0.14em;
text-transform: uppercase;
opacity: 0.7;
flex: 1;
}
.dreams-diary__nav {
display: flex;
align-items: center;
gap: 4px;
}
.dreams-diary__page {
font-size: 11px;
color: var(--muted);
font-variant-numeric: tabular-nums;
min-width: 36px;
text-align: center;
opacity: 0.6;
}
.dreams-diary__nav-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 6px;
border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
background: transparent;
color: var(--muted);
font-size: 14px;
line-height: 1;
cursor: pointer;
transition:
color 140ms ease,
border-color 140ms ease;
padding: 0;
}
.dreams-diary__nav-btn:hover:not(:disabled) {
color: var(--text);
border-color: color-mix(in oklab, var(--accent) 30%, var(--border));
}
.dreams-diary__nav-btn:disabled {
opacity: 0.2;
cursor: default;
}
/* ---- Diary entry ---- */
.dreams-diary__entry {
position: relative;
max-width: 520px;
width: 100%;
padding: 0 0 0 20px;
z-index: 1;
animation: diary-entry-reveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes diary-entry-reveal {
0% {
opacity: 0;
transform: translateY(16px);
filter: blur(8px);
}
50% {
filter: blur(2px);
}
100% {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
}
/* Left accent glow line */
.dreams-diary__accent {
position: absolute;
top: 4px;
left: 0;
width: 2px;
height: calc(100% - 8px);
border-radius: 2px;
background: linear-gradient(
180deg,
color-mix(in oklab, var(--accent) 40%, transparent) 0%,
color-mix(in oklab, var(--accent) 8%, transparent) 100%
);
animation: diary-glow-pulse 6s ease-in-out infinite alternate;
}
@keyframes diary-glow-pulse {
0% {
opacity: 0.25;
}
100% {
opacity: 0.65;
}
}
.dreams-diary__date {
display: block;
font-size: 10px;
color: var(--accent-muted);
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 400;
margin-bottom: 16px;
opacity: 0.8;
}
.dreams-diary__prose {
/* no styling container needed, just prose spacing */
}
.dreams-diary__para {
margin: 0 0 12px;
font-size: 14px;
line-height: 1.8;
color: color-mix(in oklab, var(--text) 85%, var(--muted));
font-style: italic;
animation: diary-text-stream 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dreams-diary__para:last-child {
margin-bottom: 0;
}
@keyframes diary-text-stream {
0% {
opacity: 0;
mask-image: linear-gradient(90deg, black 0%, transparent 0%);
-webkit-mask-image: linear-gradient(90deg, black 0%, transparent 0%);
}
30% {
opacity: 1;
}
100% {
opacity: 1;
mask-image: linear-gradient(90deg, black 100%, transparent 100%);
-webkit-mask-image: linear-gradient(90deg, black 100%, transparent 100%);
}
}
/* ---- Empty / error states ---- */
.dreams-diary__empty {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 20px 0;
z-index: 1;
}
.dreams-diary__empty-moon {
color: var(--muted);
opacity: 0.4;
margin-bottom: 4px;
}
.dreams-diary__empty-text {
font-size: 13px;
font-style: italic;
color: var(--muted);
opacity: 0.7;
}
.dreams-diary__empty-hint {
font-size: 11px;
color: var(--muted);
opacity: 0.4;
}
.dreams-diary__error {
font-size: 12px;
color: var(--danger);
text-align: center;
padding: 20px 0;
z-index: 1;
}
/* ---- Responsive ---- */
@media (max-width: 880px) {
.dreams {
min-height: calc(100vh - 96px);
}
.dreams__stats {
gap: 22px;
}
.dreams__phase-bar {
flex-wrap: wrap;
gap: 8px;
padding: 10px 16px;
}
.dreams__phase-bar-phases {
gap: 10px;
}
.dreams-diary {
padding: 32px 16px 48px;
}
.dreams-diary__entry {
padding-left: 16px;
}
}