feat: implement MenuButton component and home page layout with global glassmorphism styles

This commit is contained in:
Michael committed 2026-04-10 10:47:02 +02:00
1 parent 5ff4784596
commit ca99378348
6 files changed
+198 -302

No files matched your search

+70 -107
View File
@@ -1,44 +1,43 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
--duration: 280ms;
--duration: 260ms;
/* Light */
--bg-base: #f2f2f7;
--fg: #1c1c1e;
--fg-secondary: #6c6c70;
--glass-bg: rgba(255, 255, 255, 0.62);
--glass-border: rgba(255, 255, 255, 0.8);
--glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255,255,255,0.9) inset;
--glass-hover-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255,255,255,0.9) inset;
--accent: #007AFF;
--accent-glow: rgba(0, 122, 255, 0.25);
--error: #FF3B30;
--success: #34C759;
/* ─── Dark (Default: Purple → Wine) ─── */
--bg-from: #3a0f3c;
--bg-to: #7b1535;
--fg: #ffffff;
--fg-secondary: rgba(255, 255, 255, 0.55);
--orb-1: radial-gradient(ellipse at 20% 20%, rgba(0, 122, 255, 0.15) 0%, transparent 60%);
--orb-2: radial-gradient(ellipse at 80% 80%, rgba(88, 86, 214, 0.12) 0%, transparent 60%);
--orb-3: radial-gradient(ellipse at 60% 10%, rgba(52, 199, 89, 0.08) 0%, transparent 50%);
--card-bg: rgba(255, 255, 255, 0.10);
--card-border: rgba(255, 255, 255, 0.12);
--card-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
--card-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
--card-hover-bg: rgba(255, 255, 255, 0.15);
--accent: #ffffff;
--accent-btn: rgba(255, 255, 255, 0.18);
--error: #FF6B7A;
}
[data-theme='dark'] {
--bg-base: #000000;
--fg: #f5f5f7;
--fg-secondary: #8e8e93;
--glass-bg: rgba(28, 28, 30, 0.72);
--glass-border: rgba(255, 255, 255, 0.08);
--glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255,255,255,0.05) inset;
--glass-hover-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 122, 255, 0.3);
--accent: #0A84FF;
--accent-glow: rgba(10, 132, 255, 0.35);
--error: #FF453A;
--success: #30D158;
[data-theme='light'] {
/* ─── Light: Lavender → Pink ─── */
--bg-from: #e8d5f5;
--bg-to: #f5c2d0;
--fg: #1c1c2e;
--fg-secondary: rgba(28, 28, 46, 0.55);
--orb-1: radial-gradient(ellipse at 20% 20%, rgba(10, 132, 255, 0.18) 0%, transparent 60%);
--orb-2: radial-gradient(ellipse at 80% 80%, rgba(94, 92, 230, 0.18) 0%, transparent 60%);
--orb-3: radial-gradient(ellipse at 60% 10%, rgba(48, 209, 88, 0.08) 0%, transparent 50%);
--card-bg: rgba(255, 255, 255, 0.45);
--card-border: rgba(255, 255, 255, 0.8);
--card-shadow: 0 4px 24px rgba(100, 30, 60, 0.10);
--card-hover-shadow: 0 12px 40px rgba(100, 30, 60, 0.18);
--card-hover-bg: rgba(255, 255, 255, 0.65);
--accent: #1c1c2e;
--accent-btn: rgba(28, 28, 46, 0.12);
--error: #e0334e;
}
*, *::before, *::after {
@@ -47,127 +46,91 @@
padding: 0;
}
html {
html, body {
height: 100%;
}
body {
min-height: 100vh;
background-color: var(--bg-base);
color: var(--fg);
font-family: var(--font);
color: var(--fg);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
background: linear-gradient(145deg, var(--bg-from) 0%, var(--bg-to) 100%);
background-attachment: fixed;
transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
/* Ambient background orbs */
body::before {
content: '';
position: fixed;
inset: 0;
background: var(--orb-1), var(--orb-2), var(--orb-3);
pointer-events: none;
z-index: 0;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font); }
#__next, main {
position: relative;
z-index: 1;
}
/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
background: rgba(128, 128, 128, 0.25);
background: rgba(255,255,255,0.2);
border-radius: 10px;
border: 2px solid transparent;
background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(128, 128, 128, 0.4); background-clip: padding-box; }
/* Glass utility */
.glass {
background: var(--glass-bg);
backdrop-filter: blur(24px) saturate(1.8);
-webkit-backdrop-filter: blur(24px) saturate(1.8);
border: 1px solid var(--glass-border);
box-shadow: var(--glass-shadow);
border-radius: 20px;
}
/* Page layout */
.page-container {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
}
/* Forms */
/* ── Input ── */
input[type="text"],
input[type="password"],
input[type="url"],
input[type="email"] {
width: 100%;
padding: 0.85rem 1rem;
background: var(--glass-bg);
border: 1px solid var(--glass-border);
background: var(--card-bg);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid var(--card-border);
border-radius: 12px;
color: var(--fg);
font-family: var(--font);
font-size: 0.95rem;
transition: all var(--duration) var(--ease);
backdrop-filter: blur(12px);
outline: none;
transition: all var(--duration) var(--ease);
}
input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
border-color: rgba(255,255,255,0.5);
box-shadow: 0 0 0 3px rgba(255,255,255,0.10);
}
input::placeholder {
color: var(--fg-secondary);
}
input::placeholder { color: var(--fg-secondary); }
button {
cursor: pointer;
border: none;
outline: none;
font-family: var(--font);
/* ── Glass card ── */
.glass-card {
background: var(--card-bg);
backdrop-filter: blur(24px) saturate(1.4);
-webkit-backdrop-filter: blur(24px) saturate(1.4);
border: 1px solid var(--card-border);
box-shadow: var(--card-shadow);
border-radius: 20px;
transition: all var(--duration) var(--ease);
}
a {
text-decoration: none;
color: inherit;
}
/* Btn primary */
/* ── Btn primary ── */
.btn-primary {
background: var(--accent);
color: white;
padding: 0.85rem 1.5rem;
border-radius: 12px;
font-size: 0.95rem;
background: rgba(255,255,255,0.18);
color: var(--fg);
border: 1px solid rgba(255,255,255,0.25);
padding: 0.75rem 1.4rem;
border-radius: 50px;
font-size: 0.88rem;
font-weight: 600;
letter-spacing: -0.01em;
backdrop-filter: blur(12px);
transition: all var(--duration) var(--ease);
}
.btn-primary:hover {
filter: brightness(1.1);
background: rgba(255,255,255,0.28);
transform: translateY(-1px);
box-shadow: 0 8px 20px var(--accent-glow);
}
.btn-primary:active {
transform: translateY(0);
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-primary:disabled {
opacity: 0.6;
opacity: 0.5;
pointer-events: none;
}