Szabo Ivan c168da359e implement complete frontend:
- add lobby, game, leaderboard, results pages
- add scripts: storage, lobby, game, drawing, scoring, countries
- add styles: main, lobby, game
- unify header/footer across all pages
- show lobby name in lobby view
- remove clear board from leaderboard
2026-05-05 13:01:14 +02:00

345 lines
7.1 KiB
CSS

/* main.css — shared design tokens & base */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600&display=swap');
:root {
--ink: #0b1f2a;
--ink-soft: #3d5563;
--ink-muted: #7a9aaa;
--sea: #1a7fc4;
--sea-light: #4faae0;
--sea-dim: rgba(26,127,196,.12);
--leaf: #41b869;
--leaf-dim: rgba(65,184,105,.13);
--gold: #f0b429;
--danger: #e05c5c;
--cream: #f4f9f6;
--white: #ffffff;
--glass: rgba(255,255,255,.72);
--line: rgba(11,31,42,.09);
--shadow: 0 24px 60px rgba(11,31,42,.10);
--shadow-sm: 0 4px 20px rgba(11,31,42,.07);
--r-xl: 32px;
--r-lg: 22px;
--r-md: 14px;
--r-sm: 8px;
--hh: 72px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: 'DM Sans', sans-serif;
color: var(--ink);
background: var(--cream);
overflow-x: hidden;
position: relative;
min-width: 320px;
}
body::before {
content: '';
position: fixed;
inset: 0;
background:
radial-gradient(ellipse 60% 50% at 10% 0%, rgba(65,184,105,.10) 0%, transparent 60%),
radial-gradient(ellipse 50% 60% at 90% 100%, rgba(26,127,196,.10) 0%, transparent 60%);
pointer-events: none;
z-index: 0;
}
body::after {
content: '';
position: fixed;
inset: 0;
background-image:
linear-gradient(var(--line) 1px, transparent 1px),
linear-gradient(90deg, var(--line) 1px, transparent 1px);
background-size: 60px 60px;
pointer-events: none;
z-index: 0;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
.wrap { position: relative; z-index: 1; }
.container {
width: 100%;
max-width: 1280px;
margin: 0 auto;
padding: 0 28px;
}
.header {
position: sticky;
top: 0;
z-index: 100;
height: var(--hh);
display: flex;
align-items: center;
backdrop-filter: blur(16px) saturate(1.4);
-webkit-backdrop-filter: blur(16px) saturate(1.4);
background: rgba(244, 249, 246, 0.82);
border-bottom: 1px solid var(--line);
}
.header__inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
}
.logo {
display: inline-flex;
align-items: center;
gap: 12px;
}
.logo__mark {
width: 44px;
height: 44px;
border-radius: 50%;
background: linear-gradient(135deg, var(--sea) 0%, var(--leaf) 100%);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
position: relative;
overflow: hidden;
}
.logo__mark svg {
width: 22px;
height: 22px;
}
.logo__text {
font-family: "Syne", sans-serif;
font-weight: 800;
font-size: 1.25rem;
letter-spacing: -0.02em;
}
.nav {
display: flex;
align-items: center;
gap: 4px;
}
.nav__link {
padding: 9px 16px;
border-radius: 999px;
font-size: 0.92rem;
font-weight: 500;
color: var(--ink-soft);
transition:
background 0.18s,
color 0.18s;
}
.nav__link:hover {
background: var(--sea-dim);
color: var(--sea);
}
.nav__cta {
margin-left: 8px;
padding: 9px 20px;
border-radius: 999px;
font-size: 0.92rem;
font-weight: 600;
color: var(--white);
background: var(--ink);
transition:
opacity 0.18s,
transform 0.18s;
}
.nav__cta:hover {
opacity: 0.82;
transform: translateY(-1px);
}
/* ─── BUTTONS ─── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 15px 28px;
border-radius: var(--r-lg);
font-family: 'DM Sans', sans-serif;
font-size: 1rem;
font-weight: 600;
border: none;
cursor: pointer;
transition: transform .2s, box-shadow .2s, opacity .2s;
line-height: 1;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary {
color: var(--white);
background: linear-gradient(135deg, var(--sea) 0%, #159fd4 50%, var(--leaf) 100%);
background-size: 200% 200%;
box-shadow: 0 8px 24px rgba(26,127,196,.28);
animation: gradShift 4s ease infinite;
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 12px 32px rgba(26,127,196,.4); }
@keyframes gradShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.btn--ghost {
color: var(--ink-soft);
background: transparent;
border: 1.5px solid var(--line);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-muted); color: var(--ink); }
.btn--danger {
color: var(--white);
background: var(--danger);
box-shadow: 0 6px 18px rgba(224,92,92,.25);
}
.btn--full { width: 100%; }
.btn--sm { padding: 10px 20px; font-size: .88rem; border-radius: var(--r-md); }
/* ─── CARD ─── */
.card {
background: var(--glass);
backdrop-filter: blur(12px);
border: 1px solid rgba(255,255,255,.8);
border-radius: var(--r-xl);
box-shadow: var(--shadow);
}
/* ─── SECTION LABELS ─── */
.section-label {
display: inline-block;
padding: 5px 13px;
border-radius: 999px;
background: var(--sea-dim);
color: var(--sea);
font-size: .78rem;
font-weight: 600;
letter-spacing: .06em;
text-transform: uppercase;
margin-bottom: 16px;
}
.section-title {
font-family: 'Syne', sans-serif;
font-weight: 800;
font-size: clamp(2rem, 4vw, 3.6rem);
line-height: 1.04;
letter-spacing: -.03em;
margin-bottom: 16px;
}
/* ─── FOOTER ─── */
.footer {
border-top: 1px solid var(--line);
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(12px);
padding: 40px 0;
}
.footer__inner {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 24px;
}
.footer__brand {
font-family: "Syne", sans-serif;
font-weight: 800;
font-size: 1.5rem;
letter-spacing: -0.02em;
}
.footer__sub {
font-size: 0.86rem;
color: var(--ink-muted);
margin-top: 4px;
}
.footer__center {
text-align: center;
}
.footer__label {
font-size: 0.7rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--ink-muted);
margin-bottom: 10px;
}
.footer__right {
justify-self: end;
display: flex;
gap: 22px;
flex-wrap: wrap;
justify-content: flex-end;
}
.footer__link {
font-size: 0.9rem;
color: var(--ink-muted);
transition: color 0.18s;
}
.footer__link:hover {
color: var(--ink);
}
/* ─── SCROLL REVEAL ─── */
.reveal {
opacity: 0;
transform: translateY(24px);
transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .32s; }
/* ─── RESPONSIVE BASE ─── */
@media (max-width: 680px) {
.container { padding: 0 18px; }
.nav__link { display: none; }
.footer__inner { grid-template-columns: 1fr; }
.footer__center, .footer__right { justify-self: start; text-align: left; }
.socials { justify-content: flex-start; }
.footer__right { justify-content: flex-start; }
}
@media (max-width: 360px) {
:root { --r-xl: 22px; --r-lg: 16px; }
.container { padding: 0 14px; }
.logo__mark { width: 34px; height: 34px; }
.logo__text { font-size: 1.05rem; }
.nav__cta { padding: 7px 12px; font-size: .82rem; }
}