IDP_webapp / app /static /styles.css
gb3105
added a little robot animation that reacts when pressed.
5716c01
Raw
History Blame Contribute Delete
23.7 kB
:root {
--bg-deep: #08172d;
--bg-mid: #1f2e5c;
--bg-glow: #b34f87;
--text-primary: #eff4ff;
--text-muted: #c5cdeb;
--accent: #62ffd2;
--accent-strong: #2ce6be;
--glass-bg: rgba(7, 17, 33, 0.72);
--glass-bg-soft: rgba(10, 22, 43, 0.56);
--glass-border: rgba(171, 193, 255, 0.32);
--danger: #ff6b6b;
--warning: #ffbf5f;
--success: #79dd7c;
--scene-height: 248px;
--dock-height: 172px;
--stage-ratio: 1.7768;
/* Reserved strip at the bottom of the viewport for the input bar */
--input-bar-height: 96px;
/* Screen placement knobs — all values are % of the full background image */
--screen-top: 45.45%; /* vertical centre of the three screens */
--screen-left: 33.36%; /* horizontal centre of the left screen */
--screen-right: 66.56%; /* horizontal centre of the right screen */
--screen-width: 9.69%; /* box width */
--screen-height: 24.420%; /* box height */
--screen-half-width: 4.5%;
--screen-controls-top: 62%; /* AI button row, just below the screens */
--screen-font-size: 0.85vw; /* text size inside the screens — lower = smaller */
--screen-text-pad-y: 0px; /* gap above the text in a screen box — lower = text higher */
--screen-text-pad-x: 16px; /* gap left of the text in a screen box — lower = text more left */
--history-top: 47%;
--history-width: 20%;
}
html,
body {
margin: 0;
padding: 0;
min-height: 100%;
font-family: "Poppins", sans-serif;
color: var(--text-primary);
overflow-x: hidden;
}
body.theme-app {
background: radial-gradient(circle at top center, var(--bg-glow) 0%, var(--bg-mid) 36%, var(--bg-deep) 100%);
position: relative;
}
body.theme-participant {
--bg-image: none;
}
.app-bg {
position: fixed;
inset: 0;
z-index: -2;
pointer-events: none;
background: radial-gradient(circle at top center, rgba(178, 81, 130, 0.4) 0%, transparent 46%);
}
.app-bg::before {
content: "";
position: absolute;
inset: 0;
background-image: linear-gradient(to bottom, rgba(6, 15, 30, 0.48), rgba(6, 15, 30, 0.82)), var(--bg-image, none);
background-size: cover;
background-position: center;
}
.app-shell {
min-height: 100dvh;
display: flex;
flex-direction: column;
}
.container {
width: min(1080px, 100%);
margin: 0 auto;
box-sizing: border-box;
padding: 24px;
}
.card {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 18px;
box-shadow: 0 16px 40px rgba(4, 10, 20, 0.36);
}
h1,
h2,
h3 {
margin: 0 0 14px;
color: var(--text-primary);
line-height: 1.2;
}
h1 {
font-size: clamp(1.8rem, 3vw, 2.5rem);
}
h2 {
font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}
p {
color: var(--text-muted);
line-height: 1.6;
}
a {
color: inherit;
}
input[type="text"],
textarea {
width: 100%;
border: 1px solid rgba(202, 219, 255, 0.5);
background: rgba(10, 22, 43, 0.72);
color: var(--text-primary);
border-radius: 12px;
padding: 12px 14px;
box-sizing: border-box;
font: inherit;
}
input[type="text"]:focus,
textarea:focus {
outline: 2px solid rgba(98, 255, 210, 0.45);
outline-offset: 1px;
}
textarea {
resize: vertical;
min-height: 130px;
}
button,
.button {
background: linear-gradient(120deg, var(--accent) 0%, var(--accent-strong) 100%);
color: #082233;
border: none;
border-radius: 12px;
padding: 12px 22px;
font-weight: 700;
font-size: 1rem;
cursor: pointer;
transition: transform 0.18s ease, filter 0.25s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
}
button:hover,
.button:hover {
transform: translateY(-1px);
filter: brightness(1.06);
}
form label {
font-weight: 600;
display: block;
margin: 10px 0 7px;
}
.buttons {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
/* Landing / login */
.auth-shell {
flex: 1;
display: grid;
place-items: center;
padding: 28px 20px;
}
.auth-card {
width: min(700px, 100%);
padding: 30px 26px;
text-align: center;
}
.auth-card form {
margin-top: 18px;
}
/* Participant dashboard */
/* Single screen, no scrolling (scoped to the dashboard so other pages still scroll) */
body:has(.participant-dashboard) {
overflow: hidden;
height: 100dvh;
}
.participant-dashboard {
flex: 1;
display: flex;
flex-direction: column;
height: 100dvh;
overflow: hidden;
}
.participant-dashboard .dashboard-scroll {
flex: 1;
overflow: hidden;
padding-bottom: 0;
display: flex;
flex-direction: column;
gap: 18px;
}
.dashboard-stage-container {
position: relative;
width: 100%;
max-width: none;
min-height: 100dvh;
padding: 0;
overflow: hidden;
}
.dashboard-stage-container .buttons {
position: absolute;
top: 20px;
left: clamp(16px, 4vw, 32px);
z-index: 5;
}
.participant-dashboard .dashboard-main-card {
padding: 28px;
}
.rules-card {
margin: 18px 0 24px;
padding: 18px 20px;
background: var(--glass-bg-soft);
border-radius: 14px;
border: 1px solid rgba(194, 208, 247, 0.34);
}
.rules-card ol {
margin: 0;
padding-left: 20px;
color: var(--text-muted);
}
.rules-card li {
margin-bottom: 10px;
}
.message-history-card {
margin-top: 14px;
background: rgba(10, 24, 45, 0.68);
border: 1px solid rgba(164, 183, 236, 0.35);
border-radius: 14px;
padding: 20px;
}
.dashboard-stage {
position: absolute;
/* Anchor to the bottom so any extra height is cropped off the top, keeping the floor visible */
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100vw;
height: calc(100vw / var(--stage-ratio));
min-height: 100dvh;
min-width: calc(100dvh * var(--stage-ratio));
margin: 0 auto;
background-image: url("/static/img/robot_3_screens_fintan.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.response-card {
position: absolute;
top: var(--screen-top);
width: var(--screen-width);
height: var(--screen-height);
padding: var(--screen-text-pad-y) var(--screen-text-pad-x);
display: flex;
align-items: flex-start;
z-index: 2;
background: rgba(7, 17, 33, 0.22);
border: 1px solid rgba(171, 193, 255, 0.18);
border-radius: 16px;
box-shadow: 0 10px 24px rgba(4, 10, 20, 0.22);
backdrop-filter: blur(12px);
transform: translate(-50%, -50%);
}
.screen-controls {
position: absolute;
top: var(--screen-controls-top);
z-index: 3;
display: flex;
gap: 8px;
transform: translate(-50%, -50%);
}
.screen-controls--left {
left: var(--screen-left);
}
.screen-controls--right {
left: var(--screen-right);
}
.screen-btn {
border: 1px solid rgba(202, 219, 255, 0.3);
background: rgba(7, 17, 33, 0.45);
color: var(--text-primary);
padding: 6px 12px;
border-radius: 999px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s ease, border-color 0.2s ease;
}
.screen-btn:hover {
transform: none;
filter: none;
background: rgba(10, 24, 45, 0.55);
border-color: rgba(202, 219, 255, 0.5);
}
.screen-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.history-panel {
position: absolute;
top: var(--history-top);
width: var(--history-width);
max-height: 46%;
background: rgba(7, 17, 33, 0.55);
border: 1px solid rgba(171, 193, 255, 0.22);
border-radius: 16px;
padding: 12px 14px;
overflow-y: auto;
transform: translateY(-50%);
z-index: 2;
backdrop-filter: blur(10px);
}
.history-panel--left {
left: calc(var(--screen-left) - var(--screen-half-width) - 1%);
transform: translate(-100%, -50%);
}
.history-panel--right {
left: calc(var(--screen-right) + var(--screen-half-width) + 1%);
}
.history-panel h4 {
margin: 0 0 8px;
font-size: 0.9rem;
}
.history-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 8px;
font-size: 0.85rem;
}
.pending-banner {
position: absolute;
top: 6%;
right: 6%;
background: rgba(7, 17, 33, 0.7);
border: 1px solid rgba(171, 193, 255, 0.25);
padding: 8px 14px;
border-radius: 999px;
font-size: 0.85rem;
z-index: 4;
}
.result-banner {
position: absolute;
top: 14%;
left: 50%;
transform: translate(-50%, -50%);
padding: 10px 18px;
border-radius: 999px;
font-weight: 700;
z-index: 4;
background: rgba(7, 17, 33, 0.8);
border: 1px solid rgba(171, 193, 255, 0.25);
}
.result-banner--victory {
color: #3bf7c8;
}
.result-banner--defeat {
color: #ff9b9b;
}
.result-banner--left {
left: var(--screen-left);
}
.result-banner--right {
left: var(--screen-right);
}
.response-card--left {
left: var(--screen-left);
}
.response-card--right {
left: var(--screen-right);
}
.response-screen {
width: 100%;
height: 100%;
overflow-y: auto;
font-size: clamp(0.7rem, var(--screen-font-size), 0.82rem);
line-height: 1.5;
color: var(--text-primary);
}
.response-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
flex: 1;
overflow-y: auto;
padding-right: 4px;
}
.response-list li {
background: rgba(8, 19, 39, 0.4);
border: 1px solid rgba(172, 189, 235, 0.18);
border-radius: 10px;
padding: 10px 12px;
line-height: 1.5;
}
.response-empty {
color: var(--text-muted);
}
#message-list,
#message-history {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
}
#message-list li,
#message-history li {
background: rgba(14, 31, 61, 0.74);
border: 1px solid rgba(172, 189, 235, 0.22);
border-radius: 10px;
padding: 10px 12px;
line-height: 1.5;
}
.compose-dock {
position: relative;
z-index: 30;
margin: 0 auto;
padding: 0;
width: min(960px, 100%);
}
.compose-dock--stage {
position: fixed;
left: 0;
right: 0;
bottom: 0;
transform: none;
width: 100%;
min-height: var(--input-bar-height);
box-sizing: border-box;
padding: 12px clamp(12px, 3vw, 28px);
display: flex;
align-items: center;
background: transparent;
/* Let the empty area around the controls pass clicks through to the stage */
pointer-events: none;
}
.compose-dock--stage .compose-form {
width: 100%;
pointer-events: auto;
}
.compose-form {
display: flex;
align-items: stretch;
gap: 12px;
}
.question-counter {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 0 0 auto;
min-width: 78px;
min-height: 88px;
padding: 8px 10px;
border-radius: 14px;
background: rgba(7, 17, 33, 0.4);
border: 1px solid rgba(171, 193, 255, 0.22);
font-weight: 700;
}
.question-counter--admin {
margin-left: auto;
}
.question-label {
font-size: 0.7rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.compose-input {
flex: 1;
min-height: 88px;
margin: 0;
background: rgba(10, 22, 43, 0.12);
border-color: rgba(202, 219, 255, 0.22);
backdrop-filter: blur(8px);
}
.compose-dock--stage .compose-input {
min-height: 64px;
resize: none;
background: rgba(10, 22, 43, 0.45);
}
.compose-dock--stage .question-counter {
min-height: 64px;
min-width: 70px;
}
.compose-send {
min-width: 120px;
align-self: stretch;
}
.game-actions {
position: absolute;
left: 50%;
bottom: 16%;
transform: translateX(-50%);
display: flex;
gap: 12px;
z-index: 4;
}
.modal {
position: fixed;
inset: 0;
background: rgba(4, 10, 20, 0.72);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.modal-card {
width: min(420px, 90vw);
background: rgba(8, 19, 39, 0.88);
border: 1px solid rgba(171, 193, 255, 0.3);
border-radius: 18px;
padding: 20px;
text-align: center;
}
.modal-card .buttons {
display: flex;
justify-content: center;
margin-top: 14px;
}
.button-ghost {
background: transparent;
border: 1px solid rgba(171, 193, 255, 0.4);
color: var(--text-primary);
}
.hidden {
display: none;
}
.robot-scene {
position: relative;
left: 0;
right: 0;
height: calc(var(--scene-height) + env(safe-area-inset-bottom));
z-index: 10;
pointer-events: none;
overflow: hidden;
background: linear-gradient(
to top,
rgba(5, 11, 24, 0.97) 0%,
rgba(5, 11, 24, 0.72) 42%,
rgba(5, 11, 24, 0.15) 82%,
rgba(5, 11, 24, 0) 100%
);
}
.robot-scene__art {
position: relative;
left: 50%;
bottom: -8px;
transform: translateX(-50%);
width: min(1320px, 145vw);
height: calc(100% + 24px);
object-fit: cover;
object-position: bottom center;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
}
.robot-scene::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(
ellipse 55% 38% at 50% calc(100% - 36px),
rgba(255, 171, 102, 0.28),
transparent 72%
);
mix-blend-mode: screen;
}
/* Admin dashboard */
.theme-admin .admin-dashboard-container {
min-height: 100dvh;
padding-bottom: 36px;
}
.admin-sticky-nav {
position: sticky;
top: 10px;
z-index: 12;
margin: 8px 0 18px;
padding: 12px;
border-radius: 14px;
background: rgba(8, 19, 39, 0.88);
border: 1px solid rgba(175, 194, 246, 0.35);
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.admin-sticky-nav a {
padding: 8px 12px;
border-radius: 999px;
border: 1px solid rgba(182, 199, 243, 0.3);
color: var(--text-primary);
text-decoration: none;
background: rgba(15, 30, 56, 0.88);
}
.admin-top-bar {
align-items: center;
}
.ai-options {
display: grid;
gap: 10px;
margin: 12px 0 16px;
}
.ai-option {
display: grid;
grid-template-columns: auto 1fr;
gap: 10px;
align-items: start;
padding: 10px 12px;
border-radius: 12px;
background: rgba(11, 24, 45, 0.66);
border: 1px solid rgba(170, 189, 237, 0.25);
cursor: pointer;
}
select {
width: 100%;
border: 1px solid rgba(202, 219, 255, 0.5);
background: rgba(10, 22, 43, 0.72);
color: var(--text-primary);
border-radius: 12px;
padding: 12px 14px;
box-sizing: border-box;
font: inherit;
}
button[disabled] {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.admin-section {
padding: 20px;
margin-bottom: 20px;
}
.pending-message {
margin-bottom: 16px;
padding: 16px;
background: rgba(10, 24, 45, 0.8);
border: 1px solid rgba(159, 178, 230, 0.34);
border-radius: 10px;
}
.pending-message p {
margin: 0 0 10px;
}
.button-container {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.button.approve,
button.approve {
background: var(--success);
color: #14301a;
}
.button.delete,
button.delete {
background: var(--danger);
color: #321212;
}
.button.regenerate,
button.regenerate {
background: var(--warning);
color: #352300;
}
.message-history {
background: rgba(11, 25, 47, 0.8);
border-radius: 12px;
border: 1px solid rgba(164, 182, 231, 0.35);
padding: 18px;
}
.pending-message-list,
.profile-list {
list-style: none;
margin: 0;
padding: 0;
}
.profile-list li {
background: rgba(11, 24, 45, 0.66);
border: 1px solid rgba(170, 189, 237, 0.25);
border-radius: 10px;
padding: 12px;
margin-bottom: 10px;
line-height: 1.45;
}
@media (max-width: 900px) {
:root {
--scene-height: 170px;
--dock-height: 180px;
}
.container {
padding: 16px;
}
.participant-dashboard .dashboard-main-card {
padding: 18px;
}
.compose-dock {
padding: 8px 10px;
}
.dashboard-stage-container {
min-height: 100dvh;
padding: 0;
}
.dashboard-stage {
width: 100vw;
height: calc(100vw / var(--stage-ratio));
min-height: 100dvh;
min-width: calc(100dvh * var(--stage-ratio));
}
.response-card {
position: absolute;
width: min(32%, 180px);
height: min(44%, 320px);
}
.compose-dock--stage {
position: fixed;
left: 0;
right: 0;
bottom: 0;
transform: none;
width: 100%;
}
.screen-controls {
top: var(--screen-controls-top);
}
.history-panel {
position: static;
transform: none;
width: 100%;
max-height: none;
margin-top: 12px;
}
.game-actions {
position: static;
transform: none;
margin-top: 12px;
justify-content: center;
}
}
/* Third screen — middle, aligned with left/right */
:root {
--screen-middle: 49.8%; /* horizontal centre of the middle screen */
--screen-middle-top: 45.45%; /* same vertical centre as the others */
--screen-controls-middle-top: 62%;
}
.response-card--middle {
left: var(--screen-middle);
top: var(--screen-middle-top);
}
.screen-controls--middle {
left: var(--screen-middle);
top: var(--screen-controls-middle-top);
}
/* Result colours */
.result-banner--victory { color: #3bf7c8; }
.result-banner--partial { color: #ffbf5f; }
.result-banner--defeat { color: #ff9b9b; }
.button-selected {
opacity: 0.5;
cursor: default;
filter: grayscale(40%);
}
.auth-card ol, .auth-card p {
text-align: left;
}
.history-round {
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(171, 193, 255, 0.15);
}
.history-round:last-child {
border-bottom: none;
margin-bottom: 0;
}
.history-question {
font-size: 0.8rem;
color: var(--text-muted);
margin: 0 0 4px;
font-style: italic;
}
.history-answer {
color: var(--text-primary);
margin: 0;
line-height: 1.5;
}
.result-banner {
grid-column: 1 / -1;
text-align: center;
padding: 16px 24px;
border-radius: 12px;
font-size: 1.1rem;
margin-top: 100px;
}
.result-banner--victory { background: rgba(0, 200, 100, 0.15); color: #00e676; }
.result-banner--partial { background: rgba(255, 180, 0, 0.15); color: #ffb300; }
.result-banner--defeat { background: rgba(255, 60, 60, 0.15); color: #ff5252; }
.history-round--latest .history-question {
display: none;
}
.history-round--latest .history-answer {
font-size: 1.05rem;
}
.accordion-group {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 8px;
}
.accordion-item {
border: 1px solid rgba(255,255,255,0.2);
border-radius: 8px;
overflow: hidden;
}
.accordion-item input[type="radio"] {
display: none;
}
.accordion-header {
display: block;
padding: 10px 14px;
cursor: pointer;
font-weight: bold;
}
.accordion-item input[type="radio"]:checked + .accordion-header {
background: rgba(255,255,255,0.15);
}
.accordion-body {
display: none;
padding: 8px 14px 12px;
font-size: 0.9em;
opacity: 0.85;
}
.accordion-item:hover .accordion-body,
.accordion-item input[type="radio"]:checked ~ .accordion-body {
display: block;
}
.prompt-description {
margin-top: 8px;
padding: 10px 14px;
border-left: 3px solid rgba(255,255,255,0.3);
font-size: 0.9em;
opacity: 0.8;
font-style: italic;
}
.hulp-panel {
position: fixed;
top: 70px;
right: clamp(16px, 4vw, 32px);
width: 280px;
max-height: calc(100vh - 160px);
overflow-y: auto;
background: rgba(20, 20, 40, 0.75);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 16px;
padding: 14px;
z-index: 99;
display: flex;
flex-direction: column;
gap: 8px;
transition: opacity 0.2s, transform 0.2s;
}
.hulp-panel--hidden {
display: none;
}
.hulp-tabs {
display: flex;
gap: 6px;
margin-bottom: 4px;
}
.hulp-tab {
flex: 1;
padding: 6px;
border-radius: 10px;
border: 1px solid rgba(255,255,255,0.2);
background: transparent;
color: rgba(255,255,255,0.6);
font-size: 0.8rem;
cursor: pointer;
transition: background 0.15s;
}
.hulp-tab--active {
background: rgba(100, 220, 200, 0.2);
color: #7eeedd;
border-color: rgba(100, 220, 200, 0.4);
}
.hulp-hint {
font-size: 0.75rem;
opacity: 0.5;
margin-bottom: 4px;
color: white;
}
.hulp-section {
display: flex;
flex-direction: column;
gap: 6px;
}
.hulp-section--hidden {
display: none;
}
.hint-chip {
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
color: white;
padding: 7px 10px;
border-radius: 10px;
cursor: pointer;
font-size: 0.82rem;
text-align: left;
transition: background 0.15s;
line-height: 1.3;
}
.hint-chip:hover {
background: rgba(255,255,255,0.2);
}
.hint-chip--topic {
background: rgba(100, 220, 200, 0.08);
border-color: rgba(100, 220, 200, 0.2);
color: #c0f0ea;
cursor: default; /* ← add this */
pointer-events: none; /* ← add this */
}
.hint-chip--topic:hover {
background: rgba(100, 220, 200, 0.2);
}
.walking-robot {
position: fixed;
bottom: 90px;
left: 0;
font-size: 2.5rem;
z-index: 50;
cursor: pointer;
filter: drop-shadow(0 0 6px rgba(100, 220, 200, 0.6));
transition: opacity 0.3s;
opacity: 1;
animation: robotWalk 18s linear infinite;
}
.walking-robot--hidden {
opacity: 0;
pointer-events: none;
}
.walking-robot--dance {
animation: robotDance 0.6s ease forwards !important;
}
@keyframes robotWalk {
0% { transform: translateX(-50px) scaleX(1); }
10% { transform: translateX(10vw) translateY(-4px) scaleX(1); }
20% { transform: translateX(20vw) scaleX(1); }
30% { transform: translateX(30vw) translateY(-4px) scaleX(1); }
40% { transform: translateX(40vw) scaleX(1); }
49% { transform: translateX(110vw) scaleX(1); }
50% { transform: translateX(110vw) scaleX(-1); }
60% { transform: translateX(90vw) translateY(-4px) scaleX(-1); }
70% { transform: translateX(70vw) scaleX(-1); }
80% { transform: translateX(50vw) translateY(-4px) scaleX(-1); }
90% { transform: translateX(20vw) scaleX(-1); }
99% { transform: translateX(-50px) scaleX(-1); }
100% { transform: translateX(-50px) scaleX(1); }
}
@keyframes robotDance {
0% { transform: translateY(0) rotate(0deg) scale(1); }
15% { transform: translateY(-20px) rotate(-20deg) scale(1.4); filter: drop-shadow(0 0 18px #7eeedd); }
30% { transform: translateY(-10px) rotate(20deg) scale(1.4); }
45% { transform: translateY(-20px) rotate(-15deg) scale(1.5); }
60% { transform: translateY(-5px) rotate(10deg) scale(1.3); }
75% { transform: translateY(-15px) rotate(-5deg) scale(1.2); }
100% { transform: translateY(0) rotate(0deg) scale(1); }
}
@keyframes popUp {
0% { opacity: 1; transform: translateY(0) scale(1); }
100% { opacity: 0; transform: translateY(-50px) scale(1.8); }
}