UI: доработано оформление — тени, анимации, градиенты, iOS-стиль

This commit is contained in:
2026-05-29 11:52:04 +03:00
parent a67b8c3341
commit f8f220469c
13 changed files with 362 additions and 727 deletions

View File

@@ -2,39 +2,34 @@
@plugin "tailwindcss-animate";
:root {
--background: #f5f5f7;
--bg: #f2f2f7;
--surface: #ffffff;
--surface-hover: #f8f8fa;
--foreground: #1c1c1e;
--foreground-secondary: #8a8a8e;
--foreground-tertiary: #aeaeb2;
--fg: #1c1c1e;
--fg-secondary: #8a8a8e;
--fg-tertiary: #aeaeb2;
--primary: #007aff;
--primary-hover: #0066d6;
--primary-hover: #0056cc;
--primary-light: #e8f2ff;
--primary-foreground: #ffffff;
--primary-soft: rgba(0, 122, 255, 0.08);
--secondary: #f2f2f5;
--secondary-foreground: #1c1c1e;
--border: #e5e5ea;
--border-light: #f0f0f3;
--danger: #ff3b30;
--danger-hover: #d6342b;
--danger-light: #ffe8e6;
--success: #34c759;
--success-light: #e8f8ed;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
--shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
--shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
--radius-sm: 8px;
--radius-md: 14px;
--radius-lg: 20px;
--radius-full: 9999px;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
--shadow-md: 0 4px 12px rgba(0,0,0,0.06);
--shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
--shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
}
* { border-color: var(--border); }
body {
background: var(--background);
color: var(--foreground);
background: var(--bg);
color: var(--fg);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
@@ -43,71 +38,56 @@ body {
letter-spacing: -0.01em;
}
::selection { background: var(--primary); color: white; }
/* ── Animations ── */
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fade-in-up {
from { opacity: 0; transform: translateY(6px); }
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
from { opacity: 0; transform: scale(0.96); }
to { opacity: 1; transform: scale(1); }
}
@keyframes slide-up {
from { opacity: 0; transform: translateY(100%); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes heart-bounce {
0% { transform: scale(1); }
25% { transform: scale(1.3); }
50% { transform: scale(0.95); }
25% { transform: scale(1.35); }
50% { transform: scale(0.9); }
75% { transform: scale(1.1); }
100% { transform: scale(1); }
}
@keyframes spin-slow {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
@keyframes toast-in {
from { opacity: 0; transform: translateY(12px) scale(0.96); }
from { opacity: 0; transform: translateY(16px) scale(0.95); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
from { opacity: 1; transform: translateY(0) scale(1); }
to { opacity: 0; transform: translateY(-8px) scale(0.96); }
@keyframes skeleton-pulse {
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-4px); }
}
.animate-fade-in { animation: fade-in 0.15s ease-out; }
.animate-fade-in-up { animation: fade-in-up 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-scale-in { animation: scale-in 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-slide-up { animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-heart { animation: heart-bounce 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-spin-slow { animation: spin-slow 1s linear infinite; }
.animate-toast-in { animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-fade-in-up { animation: fade-in-up 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-scale-in { animation: scale-in 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-heart { animation: heart-bounce 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-toast-in { animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-skeleton { animation: skeleton-pulse 1.5s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
/* ── Shared UI ── */
/* ── Card ── */
.card {
background: var(--surface);
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
border-radius: 16px;
box-shadow: var(--shadow-card);
border: 1px solid var(--border);
transition: box-shadow 0.2s ease;
}
.card:hover {
box-shadow: var(--shadow-md);
transition: box-shadow 0.2s, transform 0.15s;
}
/* ── Avatar ── */
.avatar-initials {
border-radius: 50%;
display: flex;
@@ -115,105 +95,68 @@ body {
justify-content: center;
font-weight: 600;
color: white;
background: var(--primary);
background: linear-gradient(135deg, var(--primary), #5856d6);
user-select: none;
}
/* ── Buttons ── */
.btn-icon {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-full);
transition: background 0.15s ease, transform 0.1s ease;
cursor: pointer;
border: none;
}
.btn-icon:active {
transform: scale(0.92);
}
.link-blue {
color: var(--primary);
font-weight: 600;
transition: opacity 0.15s;
}
.link-blue:hover {
opacity: 0.8;
text-decoration: underline;
}
.text-secondary { color: var(--foreground-secondary); }
.text-tertiary { color: var(--foreground-tertiary); }
/* ── Utility ── */
.skeleton-shimmer {
background: linear-gradient(90deg, #e8e8ec 25%, #f2f2f5 50%, #e8e8ec 75%);
background-size: 200% 100%;
animation: shimmer 1.2s ease-in-out infinite;
}
/* ── Modal backdrop ── */
.backdrop-blur {
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
/* ── Button base ── */
.btn-primary {
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 600;
border-radius: var(--radius-full);
background: var(--primary);
color: white;
border-radius: 9999px;
transition: background 0.15s, transform 0.1s;
cursor: pointer;
border: none;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.btn-icon:active { transform: scale(0.9); }
.btn-outline {
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 500;
border-radius: var(--radius-full);
background: transparent;
color: var(--foreground);
border: 1px solid var(--border);
transition: background 0.15s, border-color 0.15s;
cursor: pointer;
.link-accent {
color: var(--primary);
font-weight: 600;
transition: opacity 0.15s;
}
.btn-outline:hover { background: var(--secondary); border-color: var(--foreground-tertiary); }
.btn-outline:active { transform: scale(0.97); }
.link-accent:hover { opacity: 0.8; text-decoration: underline; }
/* ── Scrollbar ── */
/* ── Utilities ── */
.text-secondary { color: var(--fg-secondary); }
.text-tertiary { color: var(--fg-tertiary); }
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }
/* ── Image loading ── */
/* ── Image shimmer ── */
.img-loading {
background: var(--secondary);
.img-shimmer {
position: relative;
overflow: hidden;
}
.img-loading::after {
.img-shimmer::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
animation: shimmer 1.5s infinite;
background-size: 200% 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* ── Gradient text ── */
.gradient-text {
background: linear-gradient(135deg, #007aff, #5856d6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* ── Focus ring ── */
.input-focus {
transition: border-color 0.15s, box-shadow 0.15s;
}
.input-focus:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
outline: none;
}