/* ============================================
   InIProject — Киберпанк/Неон стиль (финальная версия)
   ============================================ */

/* ---------- Базовые сбросы и переменные ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #060608;
    --bg-secondary: #0e0e15;
    --bg-card: rgba(25, 20, 35, 0.75);
    --border-glow: rgba(229, 62, 62, 0.5);
    --accent-primary: #ff3333;
    --accent-secondary: #ff6b6b;
    --accent-tertiary: #ff9966;
    --accent-gradient: linear-gradient(135deg, #ff3333 0%, #ff6633 50%, #ff9966 100%);
    --text-primary: #ffffff;
    --text-secondary: #c0c0d0;
    --text-muted: #808090;
    --discord-color: #7289da;
    --telegram-color: #2AABEE;
    --online-color: #2ecc71;
    --wip-color: #f39c12;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Анимированный фон (сетка + градиенты) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 51, 51, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 153, 102, 0.04) 0%, transparent 50%),
        linear-gradient(rgba(255, 51, 51, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 51, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
    animation: gridMove 30s linear infinite, pulseGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes pulseGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Контейнер для контента */
main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 40px;
}

/* ---------- Кастомный скроллбар ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff3333, #ff6633);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff5555, #ff7744);
}

/* ---------- Хедер ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(6, 6, 8, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-glow);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-heading);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 0 30px rgba(255, 51, 51, 0.5);
    animation: logoPulse 4s infinite alternate;
}

@keyframes logoPulse {
    from { text-shadow: 0 0 20px rgba(255, 51, 51, 0.4); }
    to { text-shadow: 0 0 40px rgba(255, 153, 102, 0.6); }
}

.header nav {
    display: flex;
    gap: 32px;
}

.header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
    padding: 8px 0;
}

.header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    box-shadow: 0 0 15px var(--accent-primary);
}

.header nav a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--accent-primary);
}

.header nav a:hover::after {
    width: 100%;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-radius: 100px;
    font-size: 13px;
    color: var(--online-color);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--online-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--online-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* ---------- Hero секция ---------- */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    position: relative;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, #ffffff 0%, #ff9966 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 900px;
    margin: 0 auto 24px;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 0 40px rgba(255, 51, 51, 0.4);
    animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 30px rgba(255, 51, 51, 0.3); }
    to { text-shadow: 0 0 60px rgba(255, 153, 102, 0.5); }
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-line {
    width: 150px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 0 auto;
    border-radius: 3px;
    box-shadow: 0 0 30px var(--accent-primary);
}

/* ---------- Заголовки секций ---------- */
h1, h2, h3 {
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.2);
}

h2 {
    font-size: 36px;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #e0d0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ---------- Карточки (общие стили) ---------- */
.cards-grid,
.projects-grid,
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.nav-card,
.project-card,
.game-card {
    background: linear-gradient(145deg, rgba(30, 20, 40, 0.8) 0%, rgba(20, 15, 30, 0.9) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 51, 51, 0.15);
    border-radius: 20px;
    padding: 32px 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.nav-card::before,
.project-card::before,
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-card:hover,
.project-card:hover,
.game-card:hover {
    border-color: rgba(255, 102, 51, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 51, 51, 0.2);
    background: linear-gradient(145deg, rgba(40, 25, 50, 0.85) 0%, rgba(25, 18, 35, 0.95) 100%);
}

.nav-card:hover::before,
.project-card:hover::before,
.game-card:hover::before {
    opacity: 1;
}

.nav-card {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

/* ---------- Карточки проектов ---------- */
.project-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.project-card .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.badge.discord {
    background: rgba(114, 137, 218, 0.15);
    border: 1px solid rgba(114, 137, 218, 0.4);
    color: #9babf0;
}

.badge.telegram {
    background: rgba(42, 171, 238, 0.15);
    border: 1px solid rgba(42, 171, 238, 0.4);
    color: #6bc5f5;
}

.project-card p {
    color: var(--text-secondary);
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: var(--online-color);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}

.status.wip {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.4);
    color: var(--wip-color);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

/* ---------- Карточки игр ---------- */
.game-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.game-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn.discord {
    background: linear-gradient(135deg, rgba(114, 137, 218, 0.15) 0%, rgba(114, 137, 218, 0.1) 100%);
    border-color: rgba(114, 137, 218, 0.4);
    color: #9babf0;
    position: relative;
    overflow: hidden;
}

.btn.discord::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(114, 137, 218, 0.2), transparent);
    transition: left 0.5s;
}

.btn.discord:hover::before {
    left: 100%;
}

.btn.discord:hover {
    background: linear-gradient(135deg, rgba(114, 137, 218, 0.25) 0%, rgba(114, 137, 218, 0.2) 100%);
    border-color: #7289da;
    box-shadow: 0 0 25px rgba(114, 137, 218, 0.4);
    color: #ffffff;
}

.btn.telegram {
    background: rgba(42, 171, 238, 0.1);
    border-color: rgba(42, 171, 238, 0.3);
    color: var(--telegram-color);
}

.btn.telegram:hover {
    background: rgba(42, 171, 238, 0.2);
    border-color: var(--telegram-color);
    box-shadow: 0 0 15px rgba(42, 171, 238, 0.3);
}

/* ---------- Фильтр ---------- */
.filter {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.filter button {
    padding: 10px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter button:hover,
.filter button.active {
    border-color: var(--border-glow);
    color: var(--text-primary);
    background: rgba(255, 51, 51, 0.15);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.3);
}

/* ---------- Стек технологий ---------- */
.stack-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin: 40px 0;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: default;
}

.stack-item:hover {
    color: var(--text-primary);
    transform: translateY(-4px);
}

.stack-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 51, 51, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.2s ease;
}

.stack-item:hover .stack-icon {
    border-color: var(--border-glow);
    box-shadow: 0 0 25px rgba(255, 51, 51, 0.3);
    transform: scale(1.05);
}

/* ---------- Страница семьи ---------- */
.family-header {
    text-align: center;
    margin-bottom: 40px;
}

.family-header img {
    max-width: 200px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 30px rgba(255, 51, 51, 0.4));
}

.family-header h1 {
    font-size: 48px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.family-info {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 51, 51, 0.15);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
}

.family-info h2 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 24px;
}

.family-info ul {
    list-style: none;
    color: var(--text-secondary);
}

.family-info li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.family-info li:last-child {
    border-bottom: none;
}

.btn.discord.large {
    padding: 16px 32px;
    font-size: 16px;
    display: inline-block;
    margin-top: 20px;
}

/* ---------- Футер ---------- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 51, 51, 0.1);
    padding: 30px 24px;
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
}

/* ---------- Иконки Simple Icons ---------- */
.si {
    font-size: 1.3em;
    margin-right: 6px;
    vertical-align: middle;
}

.project-card h3 .si,
.game-card h3 .si {
    margin-right: 10px;
}

.btn .si {
    font-size: 1.2em;
}

.badge .si {
    font-size: 1em;
    margin-right: 4px;
}

.footer-links .si {
    font-size: 1.1em;
}

.stack-icon .si {
    font-size: 32px;
}

/* ---------- Анимации появления ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
section {
    animation: fadeInUp 0.6s ease forwards;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .header nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}