

.content {
    position: relative;
    z-index: 5;
    padding: 2rem 3rem;
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.content__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: center;
    align-items: stretch;
    gap: 2vw;
    flex-wrap: wrap;
    margin-top: 2rem;
    max-width: 1121px;
    width: 100%;           /* Добавить */
}

.content__item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    min-width: 0;          /* Добавить - важно для грида */
    gap: 2vh;
    padding: 2rem 1.5rem;
    border: 0px solid #00ff41;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 255, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;      /* Убедись что есть */
    border-radius: 30px;
    background: rgb(255 255 255 / 10%);
    box-sizing: border-box; /* Добавить */
    backdrop-filter: blur(6px);
}

/* Сканирующая полоса */
.content__item::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 255, 65, 0.15) 30%,
        rgba(0, 255, 65, 0.25) 50%,
        rgba(0, 255, 65, 0.15) 70%,
        transparent 100%);
    transition: top 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    pointer-events: none;
    z-index: 1;
}

.content__item:hover::before {
    top: 100%;
}

/* Матричный дождь */
.content__item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: repeating-linear-gradient(0deg,
        rgba(0, 255, 65, 0) 0px,
        rgba(0, 255, 65, 0) 2px,
        rgba(0, 255, 65, 0.08) 2px,
        rgba(0, 255, 65, 0.08) 4px);
    pointer-events: none;
    transition: height 0.3s ease;
    z-index: 0;
}

.content__item:hover::after {
    height: 100%;
    animation: matrixRainCard 0.4s linear infinite;
}

/* Hover эффекты */
.content__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 21px rgba(0, 255, 65, 1);
    border-color: #00ffaa;
    background: #0a1a0a;
    animation: borderPulse rgba(0, 255, 65, 1) 0.8s ease infinite;
    background-image: repeating-radial-gradient(
        circle at 20% 30%,
        rgba(0, 255, 65, 1) 0px,
        rgba(0, 255, 65, 1) 2px,
        transparent 2px,
        transparent 4px
    );
    background-blend-mode: overlay;
}

/* Глитч заголовка */
.content__item:hover h2 {
    animation: glitchText 0.3s ease-in-out infinite;
    text-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41;
}

/* Мерцание текста */
.content__item:hover p {
    animation: textFlicker 0.2s ease-in-out 2;
}

/* Иконка */
.content__item svg path,
.content__item svg g {
    fill: #fff !important;
    transition: fill 0.3s ease;
}

.content__item svg {
    filter: drop-shadow(0 0 3px #00ff41);
}

.content__item:hover svg {
    filter: drop-shadow(0 0 8px #00ff41);
    transform: scale(1.05);
    animation: iconGlitch 0.4s ease-in-out;
}

.content__item:hover svg path,
.content__item:hover svg g {
    fill: #00ffaa !important;
}

/* Код в углах */
.content__item .matrix-code-hover {
    position: absolute;
    bottom: 8px;
    right: 8px;
    
    font-size: 7px;
    color: rgba(0, 255, 65, 0);
    transition: color 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.content__item:hover .matrix-code-hover {
    color: rgba(0, 255, 65, 0.5);
    animation: blinkCode 0.8s step-end infinite;
}

.content__item .hover-code {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 8px;
    font-family: monospace;
    color: transparent;
    transition: color 0.2s;
    pointer-events: none;
    z-index: 3;
}

.content__item:hover .hover-code {
    color: rgba(0, 255, 65, 0.4);
    animation: codeBlink 0.5s step-end infinite;
}

/* Стили текста */
.content__item h2 {
    color: #ffffff;
    font-size: 1.15rem;
    
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.4);
    padding-bottom: 0.5rem;
    width: 100%;
    text-align: center;
}

.content__item p {
    color: #b8ffb8;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    
}

/* Четные карточки - другой глитч */
.content__item:nth-child(even):hover h2 {
    animation: glitchTextAlt 0.25s ease-in-out infinite;
}

/* Анимации */
@keyframes borderPulse {
    0%, 100% {
        border-color: #00ff41;
        box-shadow: 0 0 5px rgba(0, 255, 65, 0.3), inset 0 0 5px rgba(0, 255, 65, 0.1);
    }
    50% {
        border-color: #00ffaa;
        box-shadow: 0 0 20px rgba(0, 255, 170, 0.5), inset 0 0 15px rgba(0, 255, 170, 0.2);
    }
}

@keyframes glitchText {
    0%, 100% { transform: translate(0); text-shadow: -1px 0 #ff00cc, 1px 0 #00ffcc; }
    20% { transform: translate(-1px, 0); text-shadow: -2px 0 #ff00cc, 2px 0 #00ffcc; }
    40% { transform: translate(1px, 0); text-shadow: 1px -1px #ff00cc, -1px 1px #00ffcc; }
    60% { transform: translate(0, 0); text-shadow: 0 0 #ff00cc, 0 0 #00ffcc; }
    80% { transform: translate(0, -1px); text-shadow: -1px 1px #ff00cc, 1px -1px #00ffcc; }
}

@keyframes glitchTextAlt {
    0% { transform: skew(0deg); }
    25% { transform: skew(2deg); text-shadow: -2px 0 #ff00cc; }
    50% { transform: skew(-2deg); text-shadow: 2px 0 #00ffcc; }
    75% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

@keyframes textFlicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 0 #00ff41; }
    25% { opacity: 0.8; text-shadow: 0 0 3px #00ff41; }
    50% { opacity: 1; text-shadow: 0 0 0 #00ff41; }
    75% { opacity: 0.9; text-shadow: 0 0 5px #00ff41; }
}

@keyframes iconGlitch {
    0% { transform: scale(1.05) translate(0); }
    20% { transform: scale(1.08) translate(-1px, 0); filter: drop-shadow(0 0 10px #ff00cc); }
    40% { transform: scale(1.08) translate(1px, 0); filter: drop-shadow(0 0 10px #00ffcc); }
    60% { transform: scale(1.08) translate(0, -1px); }
    80% { transform: scale(1.08) translate(0, 1px); }
    100% { transform: scale(1.08) translate(0); filter: drop-shadow(0 0 8px #00ff41); }
}

@keyframes matrixRainCard {
    0% { background-position: 0 0; }
    100% { background-position: 0 20px; }
}

@keyframes blinkCode {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.2; }
}

@keyframes codeBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.1; }
}

/* Адаптив */
@media (max-width: 768px) {
    .content {
        padding: 0;
        margin: 10px;
    }
    
    .content__item {
        width: 100%;
        padding: 1.5rem;
    }
    .content__container {
        gap: 20px;
        grid-template-columns: 1fr;
    }
}