/* Эльфийская палитра и основные стили */
body {
    background: #0B1F22;
    color: #E5DCC5;
}

h1, h2, h3, h4 {
    color: #A7D1C9;
    font-family: "Cinzel", serif;
}

.navbar {
    background-color: rgba(11, 31, 34, 0.8);
}

.navbar a {
    color: #E5DCC5;
}

.navbar a:hover {
    color: #64A7A1;
    opacity: 1;
}

.line {
    background: #A7D1C9;
}

.navbar .menu-items {
    background: #0B1F22;
}

/* Заголовки и текст */
h1 {
    text-shadow: 0 0 15px #64A7A1;
}

.header-text p {
    color: #CCC5AA;
}

/* Кнопки и интерактивные элементы */
.catalog-btn {
    background: linear-gradient(135deg, #64A7A1 0%, #406E77 100%);
    color: #0B1F22;
    box-shadow: 0 0 10px rgba(101, 167, 161, 0.5);
}

.catalog-btn:hover {
    background: linear-gradient(135deg, #5A968F 0%, #345962 100%);
    box-shadow: 0 0 15px rgba(101, 167, 161, 0.7);
    opacity: 1;
}

/* Элементы форм */
.feedback-field {
    background-color: #132C2F;
    color: #E5DCC5;
    border: 1px solid #64A7A1;
}

.feedback-btn {
    background: linear-gradient(135deg, #64A7A1 0%, #406E77 100%);
    color: #0B1F22;
    box-shadow: 0 0 10px rgba(101, 167, 161, 0.5);
}

.feedback-btn:hover {
    background: linear-gradient(135deg, #5A968F 0%, #345962 100%);
    box-shadow: 0 0 15px rgba(101, 167, 161, 0.7);
    opacity: 1;
}

/* Карточки и контейнеры */
.category-card {
    background: #132C2F;
    box-shadow: 0 4px 10px rgba(100, 167, 161, 0.2);
    border: 1px solid rgba(167, 209, 201, 0.3);
}

.game-card.large, .game-card.medium {
    border: 1px solid rgba(167, 209, 201, 0.3);
    box-shadow: 0 4px 10px rgba(100, 167, 161, 0.2);
}

/* Футер */
footer {
    background: #0A1A1C;
}

footer a {
    color: #E5DCC5;
}

footer a:hover {
    color: #64A7A1;
    opacity: 1;
}

.copyright {
    color: #A7D1C9;
}

/* Таймлайн */
.timeline-item {
    background: #132C2F;
    border: 1px solid rgba(167, 209, 201, 0.3);
    box-shadow: 0 4px 10px rgba(100, 167, 161, 0.2);
}

/* Дополнительные декоративные элементы */
.about h2::after, .catalog h2::after, #feedback h2::after, #contacts h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #64A7A1, transparent);
    margin: 15px auto 0;
}

.about-left-col {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(100, 167, 161, 0.3);
}

.catalog-img img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(100, 167, 161, 0.3);
}

/* Улучшенная анимация и эффекты */
.navbar a {
    position: relative;
    overflow: hidden;
}

.navbar a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #64A7A1;
    transition: width 0.4s ease;
}

.navbar a:hover::after {
    width: 100%;
}

/* Особые эффекты для заголовка */
.header {
    background-image: radial-gradient(circle at center, rgba(100, 167, 161, 0.1) 0%, rgba(11, 31, 34, 0) 70%);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2364A7A1' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Гамбургер-меню улучшения */
.navbar-container .hamburger-lines .line {
    background: #A7D1C9;
}

.navbar-container input[type="checkbox"]:checked ~ .hamburger-lines .line1,
.navbar-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
    background: #64A7A1;
}

/* Карточки с играми */
.game-card.large, .game-card.medium {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.game-card.large:hover, .game-card.medium:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(100, 167, 161, 0.3);
}

.game-card.large::before, .game-card.medium::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64A7A1, #A7D1C9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.game-card.large:hover::before, .game-card.medium:hover::before {
    transform: scaleX(1);
}

/* Статистика */
.stats-grid {
    background: rgba(19, 44, 47, 0.5);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: inset 0 0 20px rgba(100, 167, 161, 0.1);
}

/* Категории */
.category-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(100, 167, 161, 0.3);
}

/* Таймлайн */
.timeline-item {
    position: relative;
    transition: transform 0.4s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 140px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #64A7A1, transparent);
}

/* Форма обратной связи */
.feedback-field:focus {
    border-color: #64A7A1;
    box-shadow: 0 0 0 2px rgba(100, 167, 161, 0.3);
}

/* Футер */
.info-links a {
    position: relative;
    display: inline-block;
    padding: 5px 0;
}

.info-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #64A7A1;
    transition: width 0.3s ease;
}

.info-links a:hover::after {
    width: 100%;
}

/* О нас секция */
.about {
    position: relative;
    z-index: 1;
}

.about::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 0h2v20H9V0zm25.134.84l1.732 1-10 17.32-1.732-1 10-17.32zm-20 20l1.732 1-10 17.32-1.732-1 10-17.32zM58.16 4.134l1 1.732-17.32 10-1-1.732 17.32-10zm-40 40l1 1.732-17.32 10-1-1.732 17.32-10zM80 9v2H60V9h20zM20 69v2H0v-2h20zm79.32-55l-1 1.732-17.32-10L82 4l17.32 10zm-80 80l-1 1.732-17.32-10L2 84l17.32 10zm96.546-75.84l-1.732 1-10-17.32 1.732-1 10 17.32zm-100 100l-1.732 1-10-17.32 1.732-1 10 17.32zM38.16 24.134l1 1.732-17.32 10-1-1.732 17.32-10zM60 29v2H40v-2h20zm19.32 5l-1 1.732-17.32-10L62 24l17.32 10zm16.546 4.16l-1.732 1-10-17.32 1.732-1 10 17.32zM111 40h-2V20h2v20zm3.134.84l1.732 1-10 17.32-1.732-1 10-17.32zM40 49v2H20v-2h20zm19.32 5l-1 1.732-17.32-10L42 44l17.32 10zm16.546 4.16l-1.732 1-10-17.32 1.732-1 10 17.32zM91 60h-2V40h2v20zm3.134.84l1.732 1-10 17.32-1.732-1 10-17.32zm24.026 3.294l1 1.732-17.32 10-1-1.732 17.32-10zM39.32 74l-1 1.732-17.32-10L22 64l17.32 10zm16.546 4.16l-1.732 1-10-17.32 1.732-1 10 17.32zM71 80h-2V60h2v20zm3.134.84l1.732 1-10 17.32-1.732-1 10-17.32zm24.026 3.294l1 1.732-17.32 10-1-1.732 17.32-10zM120 89v2h-20v-2h20zm-84.134 9.16l-1.732 1-10-17.32 1.732-1 10 17.32zM51 100h-2V80h2v20zm3.134.84l1.732 1-10 17.32-1.732-1 10-17.32zm24.026 3.294l1 1.732-17.32 10-1-1.732 17.32-10zM100 109v2H80v-2h20zm19.32 5l-1 1.732-17.32-10 1-1.732 17.32 10zM31 120h-2v-20h2v20z' fill='%2364A7A1' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.2;
}

.about-right-col {
    position: relative;
}

.about-right-col::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%2364A7A1' stroke-width='1' d='M50,50 C75,25 75,75 100,50 C75,25 75,75 50,100 C25,75 25,25 0,50 C25,75 25,25 50,0 C75,25 75,75 100,50 Z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.3;
}

/* Каталог */
.catalog-wrapper {
    position: relative;
}

.catalog-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 167, 161, 0.3), transparent);
}

.films-item-wrapper {
    position: relative;
}

.films-item-wrapper:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -47.5px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 167, 161, 0.2), transparent);
}

/* Мерцающие звезды и магические элементы */
.header {
    position: relative;
    overflow: hidden;
}

.header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(167, 209, 201, 0.4) 0%, rgba(167, 209, 201, 0) 5%),
        radial-gradient(circle at 70% 60%, rgba(167, 209, 201, 0.3) 0%, rgba(167, 209, 201, 0) 3%),
        radial-gradient(circle at 40% 80%, rgba(167, 209, 201, 0.4) 0%, rgba(167, 209, 201, 0) 4%),
        radial-gradient(circle at 80% 10%, rgba(167, 209, 201, 0.3) 0%, rgba(167, 209, 201, 0) 3%),
        radial-gradient(circle at 10% 40%, rgba(167, 209, 201, 0.4) 0%, rgba(167, 209, 201, 0) 4%),
        radial-gradient(circle at 90% 90%, rgba(167, 209, 201, 0.3) 0%, rgba(167, 209, 201, 0) 3%);
    animation: starTwinkle 10s infinite alternate;
    pointer-events: none;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Светящийся эффект для заголовков */
h1, h2, h3 {
    position: relative;
}

h1::before, h2::before, h3::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    filter: blur(8px);
    color: rgba(167, 209, 201, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

h1:hover::before, h2:hover::before, h3:hover::before {
    opacity: 1;
}

/* Магический разделитель секций */
main > section:not(:last-child)::after {
    content: "";
    display: block;
    width: 80%;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 167, 161, 0.2),
        rgba(100, 167, 161, 0.5),
        rgba(100, 167, 161, 0.2),
        transparent);
    position: relative;
}

main > section:not(:last-child)::after {
    position: relative;
}

main > section:not(:last-child)::after::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #64A7A1;
    border-radius: 50%;
    box-shadow: 0 0 10px #64A7A1;
}

/* Кристальный эффект для кнопок */
.catalog-btn, .feedback-btn {
    position: relative;
    overflow: hidden;
}

.catalog-btn::before, .feedback-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: transform 0.7s;
}

.catalog-btn:hover::before, .feedback-btn:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Эффект свечения и пульсации для навигации */
.navbar {
    box-shadow: 0 0 15px rgba(100, 167, 161, 0.2);
}

.navbar-container {
    position: relative;
}

.navbar-container::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 167, 161, 0.3),
        rgba(167, 209, 201, 0.5),
        rgba(100, 167, 161, 0.3),
        transparent);
    animation: pulseGlow 4s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Древний эльфийский узор для фона категорий */
.category-card {
    position: relative;
    z-index: 1;
}

.category-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50 L75 25 L50 0 L25 25 Z M50 50 L25 75 L50 100 L75 75 Z M50 50 L100 50 L75 25 Z M50 50 L0 50 L25 75 Z' stroke='%2364A7A1' stroke-width='0.5' fill='none' stroke-opacity='0.1'/%3E%3C/svg%3E");
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 0.2;
}

/* Магические следы курсора для интерактивных элементов */
.catalog-btn, .feedback-btn, .navbar a, .info-links a {
    position: relative;
    overflow: hidden;
}

.catalog-btn:active::after, .feedback-btn:active::after, .navbar a:active::after, .info-links a:active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(167, 209, 201, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: magicRipple 0.8s ease-out;
}

@keyframes magicRipple {
    0% {
        width: 5px;
        height: 5px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Эффект древней рукописи для форм */
.feedback-field {
    background-image: linear-gradient(0deg,
        rgba(100, 167, 161, 0.05) 1px,
        transparent 1px);
    background-size: 100% 24px;
    line-height: 24px;
}

/* Туманный эффект для футера */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 100px;
    background: linear-gradient(to bottom,
        rgba(11, 31, 34, 0) 0%,
        rgba(11, 31, 34, 1) 100%);
    transform: translateY(-80px);
}

/* Эльфийские руны по краям */
body::before, body::after {
    content: "";
    position: fixed;
    width: 30px;
    top: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='30' height='500' viewBox='0 0 30 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 5 L25 15 L15 25 L5 15 Z M15 35 L5 45 L15 55 L25 45 Z M15 65 L25 75 L15 85 L5 75 Z M15 95 L5 105 L15 115 L25 105 Z M15 125 L25 135 L15 145 L5 135 Z M15 155 L5 165 L15 175 L25 165 Z M15 185 L25 195 L15 205 L5 195 Z M15 215 L5 225 L15 235 L25 225 Z M15 245 L25 255 L15 265 L5 255 Z M15 275 L5 285 L15 295 L25 285 Z M15 305 L25 315 L15 325 L5 315 Z M15 335 L5 345 L15 355 L25 345 Z M15 365 L25 375 L15 385 L5 375 Z M15 395 L5 405 L15 415 L25 405 Z M15 425 L25 435 L15 445 L5 435 Z M15 455 L5 465 L15 475 L25 465 Z' stroke='%2364A7A1' fill='none' stroke-opacity='0.1'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    z-index: -1;
    opacity: 0.1;
}

body::before {
    left: 0;
}

body::after {
    right: 0;
    transform: scaleX(-1);
}

/* Эффект вращающихся звезд */
.about-left-col, .contacts-wrapper-left-col {
    position: relative;
}

.about-left-col::before, .contacts-wrapper-left-col::before {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    top: -25px;
    left: -25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M25,0 L27,23 L50,25 L27,27 L25,50 L23,27 L0,25 L23,23 Z' fill='none' stroke='%2364A7A1' stroke-opacity='0.2'/%3E%3C/svg%3E");
    animation: rotateStar 20s linear infinite;
}

@keyframes rotateStar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}