/* Общие настройки */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0b0b0f; /* Глубокий черный фон */
    background-image: radial-gradient(circle at 50% 0%, #1f1f2e 0%, #0b0b0f 70%);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    text-align: center;
}

/* Шапка */
header {
    margin-bottom: 60px;
    animation: fadeIn 1.5s ease-in-out;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    letter-spacing: 4px;
    background: linear-gradient(45deg, #cda45e, #f2d088, #cda45e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 10px rgba(205, 164, 94, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Сетка карточек */
.portals-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Карточка персонажа */
.portal-card {
    position: relative;
    width: 320px;
    height: 500px;
    background: #14141a;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid #2a2a35;
    animation: slideUp 1s ease-out;
}

/* Задержка анимации для каждой карточки */
.portal-card:nth-child(1) { animation-delay: 0.2s; }
.portal-card:nth-child(2) { animation-delay: 0.4s; }
.portal-card:nth-child(3) { animation-delay: 0.6s; }

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(205, 164, 94, 0.2);
    border-color: #cda45e;
}

/* Изображение */
.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portal-card:hover .image-wrapper img {
    transform: scale(1.05);
}

/* Затемнение снизу */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

/* Текст на карточке */
.card-info {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.card-info h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
    letter-spacing: 2px;
    color: #f2d088;
}

.card-info p {
    font-size: 0.9rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Подвал */
footer {
    margin-top: 60px;
    color: #555;
    font-size: 0.8rem;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .portals-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .portal-card {
        width: 100%;
        max-width: 340px;
        height: 450px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
}