EverWrite / frontend /static /css /style.css
kushagraagrawal178's picture
Upload 3 files
b17318a verified
/* ═══════════════════════════════════════════════════════════════════════
EVERWRITE β€” Retro Pixel UI Stylesheet
═══════════════════════════════════════════════════════════════════════ */
/* ── Google Font import (fallback β€” also loaded via HTML link) ───────── */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
/* ── CSS Variables ───────────────────────────────────────────────────── */
:root {
--bg: #05050f;
--panel-bg: #08081a;
--green: #00ff41;
--green-dim: #005c18;
--green-glow: rgba(0, 255, 65, 0.25);
--cyan: #00e5ff;
--cyan-dim: rgba(0, 229, 255, 0.15);
--cyan-glow: rgba(0, 229, 255, 0.4);
--amber: #ffb800;
--amber-dim: rgba(255, 184, 0, 0.15);
--amber-glow: rgba(255, 184, 0, 0.4);
--red: #ff2244;
--purple: #c084fc;
--text-dim: #3a7a4a;
--text-muted: #6abf85;
--border-dim: #0d3318;
--shadow-green: 0 0 8px var(--green), 0 0 24px var(--green-glow);
--shadow-cyan: 0 0 6px var(--cyan), 0 0 18px var(--cyan-glow);
--shadow-amber: 0 0 6px var(--amber), 0 0 18px var(--amber-glow);
--font: 'Press Start 2P', monospace;
}
/* ── Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
background: var(--bg);
color: var(--green);
font-family: var(--font);
font-size: 14px;
overflow: hidden;
cursor: default;
user-select: none;
}
/* Allow text selection inside narrative */
.narrative-area { user-select: text; }
/* ── CRT Scanlines ───────────────────────────────────────────────────── */
.scanlines {
position: fixed;
inset: 0;
z-index: 9999;
pointer-events: none;
background: repeating-linear-gradient(
to bottom,
transparent 0px,
transparent 3px,
rgba(0,0,0,0.18) 3px,
rgba(0,0,0,0.18) 4px
);
animation: crt-flicker 12s step-end infinite;
}
@keyframes crt-flicker {
0%, 85%, 88%, 90%, 92%, 100% { opacity: 1; }
86%, 89%, 91% { opacity: 0.82; }
}
/* ═══════════════════════════════════════════════════════════════════════
START SCREEN
═══════════════════════════════════════════════════════════════════════ */
#start-screen {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
}
.start-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 22px;
width: 100%;
max-width: 700px;
padding: 40px 20px;
}
/* Pixel border decorations */
.pixel-deco {
font-size: 12px;
color: var(--green-dim);
letter-spacing: 0px;
white-space: nowrap;
overflow: hidden;
width: 100%;
text-align: center;
}
/* Big title */
.logo-text {
font-size: 44px;
color: var(--green);
text-shadow: var(--shadow-green);
letter-spacing: 8px;
animation: pulse-glow 2.5s ease-in-out infinite alternate;
}
.logo-sub {
font-size: 14px;
color: var(--cyan);
text-shadow: var(--shadow-cyan);
letter-spacing: 3px;
}
.logo-divider {
color: var(--green-dim);
font-size: 12px;
letter-spacing: 1px;
text-shadow: none;
}
.start-desc {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.start-desc p {
font-size: 12px;
color: var(--text-muted);
letter-spacing: 2px;
animation: blink-slow 3s step-end infinite;
}
.start-desc p:nth-child(2) { animation-delay: 0.5s; }
.start-desc p:nth-child(3) { animation-delay: 1s; }
.logo-version {
font-size: 10px;
color: var(--text-muted);
letter-spacing: 1px;
}
/* ── Start Button ─────────────────────────────────────────────────────── */
#btn-start {
margin-top: 10px;
padding: 18px 36px;
font-family: var(--font);
font-size: 15px;
background: transparent;
color: var(--green);
border: 2px solid var(--green);
box-shadow: 5px 5px 0 var(--green-dim), var(--shadow-green);
cursor: pointer;
letter-spacing: 3px;
transition: all 0.08s;
outline: none;
position: relative;
}
#btn-start::before {
content: '';
position: absolute;
inset: 3px;
border: 1px solid var(--green-dim);
pointer-events: none;
}
#btn-start:hover {
background: var(--green);
color: var(--bg);
box-shadow: 6px 6px 0 var(--green-dim), 0 0 40px var(--green), 0 0 80px var(--green-glow);
transform: translate(-2px, -2px);
}
#btn-start:active {
transform: translate(3px, 3px);
box-shadow: 2px 2px 0 var(--green-dim);
}
#btn-start:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
/* Blinking "press start" hint */
.blink-text {
font-size: 10px;
color: var(--amber);
text-shadow: var(--shadow-amber);
animation: blink 1s step-end infinite;
}
/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
@keyframes blink-slow {
0%, 100% { opacity: 0.8; }
50% { opacity: 0.3; }
}
@keyframes pulse-glow {
from { text-shadow: 0 0 8px var(--green), 0 0 20px var(--green-glow); }
to { text-shadow: 0 0 18px var(--green), 0 0 50px var(--green), 0 0 80px var(--green-glow); }
}
@keyframes fade-out-screen {
0% { opacity: 1; }
100% { opacity: 0; pointer-events: none; }
}
#start-screen.fade-out {
animation: fade-out-screen 0.6s ease-in forwards;
}
/* ═══════════════════════════════════════════════════════════════════════
GAME UI
═══════════════════════════════════════════════════════════════════════ */
#game-ui {
display: flex;
flex-direction: column;
height: 100vh;
border: 2px solid var(--green-dim);
box-shadow:
inset 0 0 60px rgba(0,255,65,0.03),
0 0 30px rgba(0,255,65,0.15);
}
#game-ui.hidden { display: none; }
/* ── Header / HUD ────────────────────────────────────────────────────── */
.game-header {
display: flex;
align-items: center;
padding: 10px 18px;
background: var(--panel-bg);
border-bottom: 2px solid var(--border-dim);
flex-shrink: 0;
gap: 14px;
position: relative;
/* inner top border highlight */
box-shadow: inset 0 -1px 0 var(--green-dim);
}
/* Subtle scanline stripe at top */
.game-header::after {
content: '';
position: absolute;
bottom: 0; left: 0; right: 0;
height: 1px;
background: linear-gradient(to right, transparent, var(--green), transparent);
opacity: 0.4;
}
.header-logo {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.logo-diamond {
color: var(--amber);
font-size: 18px;
text-shadow: var(--shadow-amber);
animation: pulse-glow 3s ease-in-out infinite alternate;
}
.logo-name {
font-size: 14px;
color: var(--green);
text-shadow: var(--shadow-green);
letter-spacing: 2px;
}
/* HUD centre */
.header-hud {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
flex-wrap: wrap;
}
.hud-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.hud-label {
font-size: 9px;
color: var(--text-muted);
letter-spacing: 1px;
}
.hud-value {
font-size: 11px;
color: var(--amber);
max-width: 220px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Phase-specific colours */
.hud-value.phase-intro { color: var(--green); text-shadow: var(--shadow-green); }
.hud-value.phase-equipment { color: var(--cyan); text-shadow: var(--shadow-cyan); }
.hud-value.phase-story { color: var(--amber); text-shadow: var(--shadow-amber); }
.hud-value.phase-ended { color: var(--red); text-shadow: 0 0 8px var(--red); }
.hud-sep {
color: var(--border-dim);
font-size: 18px;
line-height: 1;
}
.btn-icon {
font-family: var(--font);
font-size: 9px;
padding: 8px 12px;
background: transparent;
color: var(--text-muted);
border: 1px solid var(--border-dim);
cursor: pointer;
flex-shrink: 0;
letter-spacing: 1px;
transition: all 0.1s;
outline: none;
}
.btn-icon:hover {
color: var(--green);
border-color: var(--green);
box-shadow: var(--shadow-green);
}
/* ── Narrative Area ──────────────────────────────────────────────────── */
.narrative-area {
flex: 1;
overflow-y: auto;
padding: 20px 22px;
display: flex;
flex-direction: column;
gap: 16px;
background: var(--bg);
/* subtle inner glow */
box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
scroll-behavior: smooth;
}
/* Custom scrollbar */
.narrative-area::-webkit-scrollbar { width: 5px; }
.narrative-area::-webkit-scrollbar-track { background: var(--panel-bg); }
.narrative-area::-webkit-scrollbar-thumb { background: var(--green-dim); }
.narrative-area::-webkit-scrollbar-thumb:hover { background: var(--green); }
/* ── Message Bubbles ─────────────────────────────────────────────────── */
.message {
max-width: 88%;
padding: 20px 18px;
font-size: 13px;
line-height: 2.4;
letter-spacing: 0.4px;
border: 1px solid;
position: relative;
word-break: break-word;
white-space: pre-wrap;
animation: msg-appear 0.2s ease-out;
}
@keyframes msg-appear {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
/* ── AI Message (Weaver) ─── */
.message.ai {
align-self: flex-start;
color: var(--cyan);
border-color: rgba(0, 229, 255, 0.35);
background: var(--cyan-dim);
/* 3-D pixel shadow */
box-shadow:
3px 3px 0 rgba(0,229,255,0.12),
inset 0 0 20px rgba(0,229,255,0.04);
}
.message.ai::before {
content: 'β—† WEAVER';
position: absolute;
top: -13px;
left: 0;
font-size: 9px;
color: var(--cyan);
background: var(--bg);
padding: 0 6px;
text-shadow: var(--shadow-cyan);
letter-spacing: 1px;
}
/* ── User Message (Traveler) ─── */
.message.user {
align-self: flex-end;
color: var(--amber);
border-color: rgba(255, 184, 0, 0.4);
background: var(--amber-dim);
box-shadow:
-3px 3px 0 rgba(255,184,0,0.12),
inset 0 0 20px rgba(255,184,0,0.04);
}
.message.user::before {
content: 'β–Ά TRAVELER';
position: absolute;
top: -13px;
right: 0;
font-size: 9px;
color: var(--amber);
background: var(--bg);
padding: 0 6px;
text-shadow: var(--shadow-amber);
letter-spacing: 1px;
}
/* ── System Message ─── */
.message.system {
align-self: center;
max-width: 100%;
color: var(--text-muted);
border-color: var(--border-dim);
border-style: dashed;
background: transparent;
font-size: 10px;
text-align: center;
letter-spacing: 2px;
box-shadow: none;
}
.message.system::before { display: none; }
/* ── Streaming cursor ─── */
.stream-cursor {
display: inline-block;
width: 10px;
height: 18px;
background: var(--cyan);
margin-left: 4px;
vertical-align: text-bottom;
animation: blink 0.55s step-end infinite;
}
/* ── Loading indicator ───────────────────────────────────────────────── */
.loading-msg {
align-self: flex-start;
display: flex;
align-items: center;
gap: 14px;
font-size: 11px;
color: var(--text-muted);
padding: 12px 16px;
border: 1px dashed var(--border-dim);
animation: msg-appear 0.2s ease-out;
letter-spacing: 2px;
}
.spinner::before {
content: attr(data-frame);
color: var(--green);
font-size: 16px;
text-shadow: var(--shadow-green);
}
/* ═══════════════════════════════════════════════════════════════════════
INPUT AREA
═══════════════════════════════════════════════════════════════════════ */
.input-area {
display: flex;
align-items: center;
padding: 12px 18px;
background: var(--panel-bg);
border-top: 2px solid var(--border-dim);
flex-shrink: 0;
gap: 10px;
/* top highlight line */
box-shadow: inset 0 1px 0 var(--green-dim);
position: relative;
}
.input-area::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 1px;
background: linear-gradient(to right, transparent, var(--green), transparent);
opacity: 0.3;
}
.input-caret {
color: var(--green);
font-size: 16px;
flex-shrink: 0;
text-shadow: var(--shadow-green);
animation: blink 1s step-end infinite;
}
.player-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--green);
font-family: var(--font);
font-size: 13px;
caret-color: var(--green);
letter-spacing: 1px;
}
.player-input::placeholder {
color: var(--text-muted);
font-size: 11px;
}
.player-input:disabled {
color: var(--text-dim);
}
/* ── Send Button ──────────────────────────────────────────────────────── */
.btn-send {
font-family: var(--font);
font-size: 11px;
padding: 12px 20px;
background: var(--green-dim);
color: var(--green);
border: 2px solid var(--green);
box-shadow: 4px 4px 0 rgba(0,255,65,0.18), var(--shadow-green);
cursor: pointer;
letter-spacing: 1px;
flex-shrink: 0;
transition: all 0.08s;
outline: none;
position: relative;
}
.btn-send::before {
content: '';
position: absolute;
inset: 2px;
border: 1px solid var(--green-dim);
pointer-events: none;
opacity: 0.5;
}
.btn-send:hover {
background: var(--green);
color: var(--bg);
box-shadow: 5px 5px 0 rgba(0,255,65,0.3), 0 0 30px var(--green), 0 0 60px var(--green-glow);
transform: translate(-2px, -2px);
}
.btn-send:active {
transform: translate(3px, 3px);
box-shadow: 1px 1px 0 rgba(0,255,65,0.2);
}
.btn-send:disabled {
opacity: 0.35;
cursor: not-allowed;
transform: none;
box-shadow: 4px 4px 0 rgba(0,255,65,0.05);
}
/* ═══════════════════════════════════════════════════════════════════════
RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
.logo-text { font-size: 28px; }
.logo-sub { font-size: 10px; }
#btn-start { font-size: 11px; padding: 14px 22px; }
.game-header { padding: 8px 10px; gap: 8px; }
.logo-name { font-size: 11px; }
.header-hud { gap: 6px; }
.hud-label { font-size: 8px; }
.hud-value { font-size: 9px; max-width: 120px; }
.message { font-size: 11px; max-width: 96%; }
.narrative-area { padding: 14px 12px; }
.input-area { padding: 10px 12px; }
.player-input { font-size: 11px; }
.btn-send { font-size: 9px; padding: 10px 14px; }
}