Files
ckeproekt/app/globals.css

356 lines
6.6 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
body {
font-family: Arial, Helvetica, sans-serif;
}
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
html {
scroll-behavior: smooth;
}
/* Компенсация фиксированной шапки при переходе по якорям */
html :target {
scroll-margin-top: 80px;
}
/* Анимация для прелоадера */
@keyframes loading-bar {
0% {
width: 0;
left: 0;
}
50% {
width: 100%;
left: 0;
}
100% {
width: 0;
left: 100%;
}
}
.animate-loading-bar {
animation: loading-bar 2s ease-in-out infinite;
}
/* Анимация появления для карточек новостей */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-in-up {
animation: fadeInUp 0.6s ease-out forwards;
}
/* Плавающие анимации для фона */
@keyframes float {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
50% {
transform: translateY(-20px) rotate(180deg);
}
}
@keyframes float-delayed {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
50% {
transform: translateY(-30px) rotate(-180deg);
}
}
@keyframes float-slow {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
50% {
transform: translateY(-15px) rotate(90deg);
}
}
.animate-float {
animation: float 6s ease-in-out infinite;
}
.animate-float-delayed {
animation: float-delayed 8s ease-in-out infinite;
animation-delay: 2s;
}
.animate-float-slow {
animation: float-slow 10s ease-in-out infinite;
animation-delay: 4s;
}
/* Градиентная анимация */
@keyframes gradient-shift {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
.animate-gradient {
background-size: 200% 200%;
animation: gradient-shift 3s ease infinite;
}
/* Пульсирующий эффект */
@keyframes pulse-glow {
0%, 100% {
box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}
50% {
box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
}
}
.animate-pulse-glow {
animation: pulse-glow 2s ease-in-out infinite;
}
/* Эффект появления текста */
@keyframes typewriter {
from {
width: 0;
}
to {
width: 100%;
}
}
.animate-typewriter {
overflow: hidden;
border-right: 2px solid;
white-space: nowrap;
animation: typewriter 3s steps(40, end);
}
/* Эффект мерцания */
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
.animate-shimmer {
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
/* Стили для обрезки текста */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Стили для контента новостей */
.prose {
max-width: none;
}
.prose h3 {
@apply text-xl font-semibold text-gray-900 mt-6 mb-3;
}
.prose p {
@apply mb-4 text-gray-700 leading-relaxed;
}
.prose ul {
@apply list-disc list-inside mb-4 text-gray-700;
}
.prose li {
@apply mb-2;
}
/* Стили для контента статей */
.article-content {
font-size: 1.25rem;
line-height: 1.8;
color: #374151;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
color: #111827;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1.5rem;
}
.article-content h1 { font-size: 2.5rem; }
.article-content h2 { font-size: 2rem; }
.article-content h3 { font-size: 1.75rem; }
.article-content h4 { font-size: 1.5rem; }
.article-content p {
margin-bottom: 2rem;
line-height: 1.8;
}
.article-content strong {
color: #111827;
font-weight: 600;
}
.article-content a {
color: #2563eb;
text-decoration: none;
font-weight: 500;
border-bottom: 1px solid #93c5fd;
transition: all 0.3s ease;
}
.article-content a:hover {
color: #1d4ed8;
border-bottom-color: #1d4ed8;
}
.article-content ul,
.article-content ol {
margin: 2rem 0;
padding-left: 2rem;
}
.article-content li {
margin-bottom: 0.75rem;
}
.article-content blockquote {
border-left: 4px solid #3b82f6;
padding-left: 2rem;
margin: 3rem 0;
font-style: italic;
color: #4b5563;
font-size: 1.125rem;
background: #f8fafc;
padding: 2rem;
border-radius: 0.5rem;
}
.article-content img {
border-radius: 1rem;
margin: 3rem 0;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.article-content pre {
background: #1f2937;
color: #f9fafb;
padding: 2rem;
border-radius: 1rem;
overflow-x: auto;
margin: 2rem 0;
}
.article-content code {
background: #f3f4f6;
color: #1f2937;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.875rem;
}
.article-content pre code {
background: transparent;
color: inherit;
padding: 0;
}