/* Import Manrope Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

/* Local Nekst Font for Headings */
@font-face {
    font-family: 'Nekst';
    src: local('Nekst SemiBold'), local('Nekst-SemiBold'),
        url('/fonts/Nekst-SemiBold-Web.eot') format('eot'),
        url('/fonts/Nekst-SemiBold-Web.woff2') format('woff2'),
        url('/fonts/Nekst-SemiBold-Web.woff') format('woff'),
        url('/fonts/Nekst-SemiBold-Web.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #F9FBFD;
}

/* Custom Colors */
:root {
    --bloxy-yellow: #FFC73A;
    --bloxy-orange: #FC7557;
    --bloxy-blue: #2D65F2;
    --bloxy-bg: #F9FBFD;
    --bloxy-black: #000000;
    --bloxy-gray: #6b7280;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nekst', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.2;
}

/* Nekst Font Class */
.font-nekst {
    font-family: 'Nekst', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
}

/* Ensure body text uses Manrope */
p, span, div, a, li, td, th, label, input, textarea, select {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Buttons and badges use Nekst */
button, .btn, .button, .badge, .tag, .chip, .pill,
.bloxy-button {
    font-family: 'Nekst', 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

/* Navigation menu items use Nekst */
nav a, nav button, .menu-item, header nav a, header nav button {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
}

/* Custom Components */
.bloxy-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.bloxy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Universal Button Styles */
.bloxy-button, .btn, button[class*="bg-"] {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 16px;
    font-family: 'Nekst', 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.2;
}

/* Primary Button (Yellow) */
.bloxy-button-primary, .btn-primary {
    background-color: var(--bloxy-yellow);
    color: var(--bloxy-black);
}

.bloxy-button-primary:hover, .btn-primary:hover {
    background-color: #e6b333;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 199, 58, 0.3);
}

/* Secondary Button (Black) */
.bloxy-button-secondary, .btn-secondary {
    background-color: var(--bloxy-black);
    color: white;
}

.bloxy-button-secondary:hover, .btn-secondary:hover {
    background-color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Orange Button */
.bloxy-button-orange, .btn-orange {
    background-color: var(--bloxy-orange);
    color: white;
}

.bloxy-button-orange:hover, .btn-orange:hover {
    background-color: #e55a3c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(252, 117, 87, 0.3);
}

/* Blue Button */
.bloxy-button-blue, .btn-blue {
    background-color: var(--bloxy-blue);
    color: white;
}

.bloxy-button-blue:hover, .btn-blue:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(45, 101, 242, 0.3);
}

/* Green Button */
.bloxy-button-green, .btn-green {
    background-color: #10b981;
    color: white;
}

.bloxy-button-green:hover, .btn-green:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* Small Button */
.bloxy-button-sm, .btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Large Button */
.bloxy-button-lg, .btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Gradient Backgrounds */
.bloxy-gradient-yellow {
    background: linear-gradient(135deg, var(--bloxy-yellow) 0%, var(--bloxy-orange) 100%);
}

.bloxy-gradient-blue {
    background: linear-gradient(135deg, var(--bloxy-blue) 0%, #1e40af 100%);
}

.bloxy-gradient-bg {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Custom Borders */
.bloxy-border-yellow {
    border: 4px solid var(--bloxy-yellow);
}

.bloxy-border-orange {
    border: 4px solid var(--bloxy-orange);
}

.bloxy-border-blue {
    border: 4px solid var(--bloxy-blue);
}

.bloxy-border-green {
    border: 4px solid #10b981;
}

/* Emoji Stickers */
.emoji-sticker {
    display: inline-block;
    background: white;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    position: absolute;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bloxy-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 2rem;
    }

    /* Уменьшение вертикальных отступов на мобильных */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-8 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .mb-16 {
        margin-bottom: 2.5rem !important;
    }

    .mb-12 {
        margin-bottom: 2rem !important;
    }

    .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    .mb-6 {
        margin-bottom: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .mt-16 {
        margin-top: 2.5rem !important;
    }

    .mt-12 {
        margin-top: 2rem !important;
    }

    .mt-8 {
        margin-top: 1.5rem !important;
    }

    .mt-6 {
        margin-top: 1rem !important;
    }

    .mt-4 {
        margin-top: 0.75rem !important;
    }
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Focus States */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--bloxy-yellow);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--bloxy-yellow);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e6b333;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bloxy-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bloxy-button-primary {
        background-color: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .bloxy-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bloxy-bg: #1f2937;
    }
    
    body {
        background-color: var(--bloxy-bg);
        color: #f9fafb;
    }
    
    .bloxy-card {
        background: #374151;
        color: #f9fafb;
    }
}

/* ========== HI-TECH AI CARD ANIMATIONS ========== */

/* Матричный дождь эффект */
@keyframes matrix-rain {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Неоновое свечение */
@keyframes neon-glow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(45, 101, 242, 0.5),
            0 0 40px rgba(147, 51, 234, 0.3),
            0 0 60px rgba(59, 130, 246, 0.2),
            inset 0 0 20px rgba(147, 51, 234, 0.1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(45, 101, 242, 0.8),
            0 0 60px rgba(147, 51, 234, 0.6),
            0 0 90px rgba(59, 130, 246, 0.4),
            inset 0 0 30px rgba(147, 51, 234, 0.2);
    }
}

/* Пульсирующие частицы */
@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(10px, -15px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translate(-5px, -25px) scale(0.8);
        opacity: 0.5;
    }
    75% {
        transform: translate(-15px, -10px) scale(1.1);
        opacity: 0.9;
    }
}

/* Голографический эффект */
@keyframes hologram {
    0%, 100% {
        background-position: 0% 0%;
        filter: hue-rotate(0deg);
    }
    25% {
        background-position: 100% 0%;
        filter: hue-rotate(90deg);
    }
    50% {
        background-position: 100% 100%;
        filter: hue-rotate(180deg);
    }
    75% {
        background-position: 0% 100%;
        filter: hue-rotate(270deg);
    }
}

/* Сканирующая линия */
@keyframes scan-line {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        transform: translateY(400%);
        opacity: 0;
    }
}

/* Цифровой глитч */
@keyframes digital-glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    10% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    20% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    30% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    40% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
    50% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    60% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    70% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(360deg);
    }
    90% {
        transform: translate(2px, 2px);
        filter: hue-rotate(90deg);
    }
}

/* Энергетические волны */
@keyframes energy-wave {
    0% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* AI CARD - Основной контейнер */
.ai-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(45, 101, 242, 0.95) 0%,
        rgba(147, 51, 234, 0.95) 50%,
        rgba(59, 130, 246, 0.95) 100%);
    border-radius: 24px;
    padding: 2rem;
    overflow: hidden;
    animation: neon-glow 3s ease-in-out infinite;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-card:hover {
    
    animation: neon-glow 1.5s ease-in-out infinite;
}

/* Голографический фон */
.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%);
    background-size: 200% 200%;
    animation: hologram 4s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Сканирующая линия 
.ai-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 255, 255, 0.8),
        rgba(255, 255, 255, 1),
        rgba(0, 255, 255, 0.8),
        transparent);
    animation: scan-line 3s linear infinite;
    z-index: 2;
}*/

/* Матричные частицы */
.ai-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.ai-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    animation: particle-float 4s ease-in-out infinite;
}

.ai-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.ai-particle:nth-child(2) { top: 40%; left: 80%; animation-delay: 0.5s; }
.ai-particle:nth-child(3) { top: 60%; left: 30%; animation-delay: 1s; }
.ai-particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 1.5s; }
.ai-particle:nth-child(5) { top: 30%; left: 50%; animation-delay: 2s; }

/* Контент карточки */
.ai-card-content {
    position: relative;
    z-index: 3;
}

/* Иконка ИИ с глитч эффектом */
.ai-icon {
    font-size: 4rem;
    display: inline-block;
    animation: digital-glitch 5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

/* Заголовок с неоновым текстом */
.ai-title {
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4);
    animation: digital-glitch 6s ease-in-out infinite;
}

/* Описание */
.ai-description {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Бейджи с энергетическим свечением */
.ai-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.ai-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

/* Специальный бейдж "Топ-технология" */
.ai-badge-top {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    font-weight: bold;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Акцентный блок внизу */
.ai-highlight {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.ai-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    animation: scan-line 4s linear infinite;
}

.ai-highlight-text {
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ai-card {
        padding: 1.5rem;
    }
    
    .ai-icon {
        font-size: 3rem;
    }
    
    .ai-energy-ring {
        width: 80px;
        height: 80px;
    }
}

/* Уменьшенная анимация для пользователей с ограниченной подвижностью */
@media (prefers-reduced-motion: reduce) {
    .ai-card,
    .ai-icon,
    .ai-title,
    .ai-particle,
    .ai-energy-ring,
    .ai-card::before,
    .ai-card::after,
    .ai-highlight::before {
        animation: none !important;
    }

}
