:root {
    --bg-color: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #bb86fc;
    /* Нежный фиолетовый для акцентов */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ambient Background Particles */
.bg-visuals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, #111 0%, #0a0a0c 100%);
    overflow: hidden;
}

.particle-wrapper {
    position: absolute;
    animation: drift linear infinite;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
    transition: transform 0.8s ease-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(20px, -30px);
    }

    66% {
        transform: translate(-20px, 15px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Nav */
nav a {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
}

nav a:hover {
    color: var(--accent-color);
}

/* Fancybox */
.f-panzoom__viewport {
    border-radius: 24px;
    overflow: hidden;
}

/* Layout Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Header & Navigation */
header {
    padding: 2rem 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: var(--accent-color);
    text-decoration: none;
}

/* Main content */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
}

.main-content {
    width: 100%;
    min-width: 40%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.main-content main {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Hero Section (New Arrivals) */
.hero-section {
    padding: 4rem 0 2rem;
}

.character-layout .hero-section {
    padding: 2rem 0;
}


.hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.hero-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    cursor: pointer;
    aspect-ratio: 1 / 1;
    /* Делаем их квадратными */
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-card:hover img {
    transform: scale(1.05);
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hero-side .card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.hero-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-side .card:hover img {
    transform: scale(1.1);
}

/* Overlay Labels */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Universe Sections */
.universe-section {
    padding: 2rem 0;

}

.universe-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 100% !important;
}

.breadcrumbs {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 100%;
}

.universe-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.universe-header h2 {
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
}

.universe-title-group .line {
    height: 2px;
    flex-grow: 1;
    background: linear-gradient(to right, var(--accent-color), transparent);
}

.universe-title-group .line-rev {
    height: 2px;
    flex-grow: 1;
    background: linear-gradient(to left, var(--accent-color), transparent);
}

.view-all,
.crumb {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 100px;
    white-space: nowrap;
}

.view-all span,
.crumb span {
    transition: transform 0.3s ease;
}

.view-all:hover,
.crumb:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(187, 134, 252, 0.05);
}

.view-all:hover span,
.crumb:hover span {
    transform: translateX(5px);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /*grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));*/
    gap: 25px;
}

.char-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.char-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(187, 134, 252, 0.15);
}

.char-img {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.char-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.char-card:hover .char-img img {
    transform: scale(1.1);
}

.char-info {
    padding: 20px;
    text-align: center;
}

.char-info h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.char-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* SEO Text Block */
.seo-block {
    padding: 2rem 5%;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.95rem;
    border-top: 1px solid var(--glass-border);
}

.seo-block h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .character-grid {
        grid-template-columns: 1fr;
        /*grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));*/
    }

    .prev-crumb span {
        display: none;
    }

    .prev-crumb::before {
        content: "←";
        font-weight: bold;
    }

    .view-all span {
        display: none;
    }

    .view-all::before {
        content: "→";
        font-weight: bold;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .universe-header h2 {
        font-size: 1.5rem;
        white-space: nowrap;
    }

    nav a {
        font-size: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }
}

/* Footer */

footer {
    opacity: .5;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

footer .disclaimer {
    padding-left: 1rem;
    text-align: right;
    font-size: .9rem;
}

.cards-section {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.card-item {
    display: flex;
    align-items: stretch;
    background-color: #121214;
    border: 1px solid #202024;
    border-radius: 1rem;
    position: relative;
}

.card-img-wrapper {
    flex-shrink: 0;
    width: 150px;
    overflow: hidden;

}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1rem 0 0 1rem;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
}

.card-text {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-buttons {
    display: flex;
    justify-content: flex-end;
    /* Сдвигает кнопку в правый нижний угол */
    width: 100%;
    gap: 20px;
}

.card-buttons a {
    display: inline-block;
    background-color: #202024;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #2e2e33;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

.card-buttons a:hover {
    background: #2a2a2a;
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.card-img-rating {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 45px;
}

.card-question {
    color: var(--text-muted);
    font-size: .8rem;
    margin-top: -.5rem;
    margin-left: auto;
}

@media (max-width: 800px) {
    .card-item {
        flex-direction: column;
        align-items: stretch;
    }

    .card-img-wrapper {
        width: 100%;
        height: 250px;
    }

    .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 0 30%;
        border-radius: 1rem 1rem 0 0;
    }

    .card-content {
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .card-text {
        text-align: left;
    }

    .card-buttons {
        justify-content: center;
        display: flex;
        flex-direction: column;
    }

    .card-buttons a {
        width: 100%;
        text-align: center;
    }

    .card-question {
        margin: auto;
    }
}