@tailwind base;
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&family=Orbitron:wght@500;600;700&display=swap');

/* ГЛОБАЛЬНЫЙ ФОН */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #050505;
    background-image: url('/static/images/yg9wd8fj9yp41.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    position: relative;
}

/* Тёмный оверлей для читаемости */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Киберпанк-сетка */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.04) 1px, transparent 1px);
    background-size: 70px 70px;
    pointer-events: none;
    z-index: -1;
}

.container, .relative, .absolute {
    background: transparent !important;
}

/* Неоновые эффекты */
.neon-glow {
    position: relative;
}

.neon-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #ff00c8, #00f9ff, #39ff14, #ff00c8);
    background-size: 400% 400%;
    z-index: -1;
    filter: blur(25px);
    opacity: 0.45;
    animation: neonFlow 12s ease infinite;
    border-radius: inherit;
}

@keyframes neonFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Типографика */
.title-font {
    font-family: 'Orbitron', sans-serif;
}

.neon-text {
    text-shadow:
        0 0 10px #00f9ff,
        0 0 25px #00f9ff,
        0 0 45px #ff00c8;
}

.neon-pink  { text-shadow: 0 0 15px #ff00c8, 0 0 35px #ff00c8; }
.neon-cyan  { text-shadow: 0 0 15px #00f9ff, 0 0 35px #00f9ff; }

/* Карточки */
.card, .file-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 10, 20, 0.8) !important;
    backdrop-filter: blur(8px);
}

.card:hover, .file-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 45px rgba(255, 0, 200, 0.55);
}

.glitch:hover {
    animation: glitch 0.35s linear infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-4px, 4px); }
    40% { transform: translate(4px, -4px); }
    60% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Анимация разделителя */
@keyframes neonDivider {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-neonDivider {
    animation: neonDivider 8s linear infinite;
}

/* Фоны элементов */
.bg-zinc-900, .bg-black, .bg-zinc-950 {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
}

/* ========== НАВИГАЦИОННЫЕ ПЛИТКИ ========== */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1.5px solid #00f9ff;
    border-radius: 9999px;
    color: #00f9ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 15px rgba(0, 249, 255, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.nav a::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff00c8, #00f9ff, #39ff14, #ff00c8);
    background-size: 400% 400%;
    border-radius: 9999px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: neonFlow 12s ease infinite;
}

.nav a:hover::before {
    opacity: 1;
}

.nav a:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.9);
    border-color: transparent;
    box-shadow: 0 0 30px #ff00c8;
    transform: translateY(-3px);
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 640px) {
    body {
        background-attachment: scroll !important;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .logo {
        font-size: 2rem;
        white-space: normal;
        word-break: break-word;
        line-height: 1.2;
    }
    
    .motto {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .nav {
        justify-content: center;
        gap: 8px;
    }
    
    .nav a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 16px;
    }
    
    .grid-2col,
    .grid-cols-1.md\:grid-cols-2,
    .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .chat-messages {
        height: 200px;
        padding: 12px;
    }
    
    .chat-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .chat-form input {
        padding: 12px;
        font-size: 1rem;
    }
    
    .chat-form button {
        padding: 12px;
        font-size: 1rem;
    }
    
    input, button, textarea {
        padding: 12px;
        font-size: 1rem;
    }
    
    .h-screen {
        height: 100vh;
        min-height: 600px;
    }
    
    .h-\[calc\(100vh-180px\)\] {
        height: calc(100vh - 140px);
    }
    
    .neon-text {
        font-size: 2.2rem !important;
    }
    
    .text-2xl {
        font-size: 1.2rem !important;
    }
    
    .px-10 {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .py-5 {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .footer {
        font-size: 0.75rem;
    }
    
    .neon-glow::before {
        filter: blur(15px);
        opacity: 0.3;
    }
    
    body::before {
        background: rgba(0, 0, 0, 0.65);
    }
    
    .flex-col.sm\:flex-row {
        flex-direction: column !important;
    }
    
    .sm\:flex-row .gap-4 {
        gap: 12px;
    }
/* ========== NEURO INTERFACE ========== */

.neuro-console {
    position: relative;
}

.neuro-console::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(45deg, #00f9ff, #ff00c8, #00f9ff);
    opacity: 0.2;
    filter: blur(10px);
    z-index: -1;
}

/* курсор */
.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00f9ff;
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1 }
    50% { opacity: 0 }
} #chat-box {
    font-family: monospace;
    background: radial-gradient(circle at center, rgba(0,255,255,0.05), transparent 70%);
}

#chat-box div {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
    0% { transform: translate(0,0); }
    25% { transform: translate(2px,-2px); }
    50% { transform: translate(-2px,2px); }
    75% { transform: translate(2px,2px); }
    100% { transform: translate(0,0); }
}