/* events_style.css - Стиль карточек как в настольных играх с улучшенными фонами */
@import url('https://fonts.googleapis.com/css2?family=Ysabeau+SC:wght@1..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Nunito", sans-serif;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elements);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffae5d;
}

:root {
    --bg-dark: #121212;
    --bg-elements: #1e1e1e;
    --bg-elements-light: #2a2a2a;
    --primary: #ff9e44;
    --primary-glow: rgba(255, 158, 68, 0.15);
    --text-primary: #f5f5f5;
    --text-secondary: #aaaaaa;
    --transition: all 0.3s ease;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Анимации */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 158, 68, 0.2), 0 0 40px rgba(255, 158, 68, 0.1); }
    50% { box-shadow: 0 0 30px rgba(255, 158, 68, 0.4), 0 0 60px rgba(255, 158, 68, 0.2); }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(255, 158, 68, 0.3); }
    50% { border-color: rgba(255, 158, 68, 0.8); }
}

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

.animate {
    animation: slideInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* Основные стили страницы ивентов */
.events-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    margin-bottom: 4rem;
}

/* Главный баннер ивента */
.main-event-link {
    text-decoration: none;
}

.main-event-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.8), rgba(30, 30, 30, 0.7)), 
                url('group_christmas_tree/timergif_v1.gif') no-repeat center center;
    background-size: cover;
    border-radius: 20px;
    padding: 4rem 2rem;
    margin: 2rem auto 3rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(255, 158, 68, 0.1);
    border: 2px solid rgba(255, 158, 68, 0.3);
    overflow: hidden;
    animation: glow 3s ease-in-out infinite;
}

.main-event-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 158, 68, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.event-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(30, 30, 30, 0.8) 0%, 
                rgba(30, 30, 30, 0.6) 50%,
                rgba(255, 158, 68, 0.1) 100%);
    border-radius: 20px;
    z-index: 1;
}

.event-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.event-title {
    font-family: 'Ysabeau SC', Georgia, serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    text-shadow: 0 0 20px rgba(255, 158, 68, 0.5),
                 0 4px 10px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 0 30px rgba(255, 158, 68, 0.3));
}

.event-description {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.event-timer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-item {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: auto;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.timer-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(255, 158, 68, 0.6),
                 0 0 40px rgba(255, 158, 68, 0.3),
                 0 4px 15px rgba(0, 0, 0, 0.5);
    line-height: 1;
    letter-spacing: 2px;
}

.timer-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    opacity: 0.9;
}

/* ОБЪЕДИНЕННЫЙ БЛОК ЗАДАНИЙ БЕЗ ФОНА */
.unified-quests-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    position: relative;
}

.unified-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%) 
                bottom / 100% 3px no-repeat;
}

.unified-title {
    font-family: 'Ysabeau SC', Georgia, serif;
    font-size: 2.5rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 15px rgba(255, 158, 68, 0.4);
}

.unified-timer .timer-item {
    gap: 0.7rem;
}

.unified-timer .timer-value {
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(255, 158, 68, 0.6),
                 0 0 30px rgba(255, 158, 68, 0.3);
}

.unified-timer .timer-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* СЕТКА КАРТОЧЕК В СТИЛЕ НАСТОЛЬНЫХ ИГР */
.unified-quests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    justify-items: center;
}

/* ОСНОВНОЙ СТИЛЬ КАРТОЧКИ КАК В НАСТОЛЬНОЙ ИГРЕ С ФОНОВЫМ ИЗОБРАЖЕНИЕМ */
.boardgame-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    min-height: 480px;
    background: linear-gradient(145deg, 
                rgba(40, 40, 40, 0.85) 0%, 
                rgba(60, 60, 60, 0.8) 50%,
                rgba(30, 30, 30, 0.9) 100%);
    /* Фоновое изображение будет добавлено через инлайн-стиль */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 80px rgba(255, 158, 68, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 158, 68, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    overflow: visible;
    transform-style: preserve-3d;
    perspective: 1000px;
    z-index: 1;
}

/* Градиентный оверлей для фонового изображения */
.boardgame-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(18, 18, 18, 0.4) 0%,
        rgba(30, 30, 30, 0.5) 50%,
        rgba(40, 40, 40, 0.6) 100%
    );
    border-radius: 20px;
    z-index: 1;
    pointer-events: none;
}

/* Декоративная рамка */
.card-border {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid rgba(255, 158, 68, 0.2);
    border-radius: 15px;
    pointer-events: none;
    z-index: 2;
}

.boardgame-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
                transparent, 
                rgba(255, 158, 68, 0.1), 
                transparent);
    border-radius: 22px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ПРИ НАВЕДЕНИИ */
.boardgame-card:hover {
    transform: translateY(-15px) rotate(0.5deg);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.6),
                0 0 120px rgba(255, 158, 68, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 158, 68, 0.6);
    z-index: 10;
}

.boardgame-card:hover::after {
    opacity: 1;
}

.boardgame-card:hover .card-border {
    border-color: rgba(255, 158, 68, 0.6);
    transition: border-color 0.4s ease;
}

/* Содержимое карточки */
.card-content {
    position: relative;
    z-index: 3; /* Повышаем z-index чтобы контент был над градиентным оверлеем */
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1.5rem;
}

/* Заголовок карточки */
.card-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 158, 68, 0.3);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, 
                transparent, 
                var(--primary), 
                transparent);
}

.card-title {
    font-family: 'Cinzel', 'Ysabeau SC', serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.3;
}

.card-type {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.periodic-type {
    background: linear-gradient(135deg, var(--primary), #ff7b00);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(255, 158, 68, 0.4);
}

.exclusive-type {
    background: linear-gradient(135deg, var(--gold), #ffaa00);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Тело карточки */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.card-description {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* Футер карточки */
.card-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

/* Награда */
.quest-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    background: linear-gradient(135deg, 
                rgba(255, 158, 68, 0.15), 
                rgba(255, 158, 68, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(255, 158, 68, 0.3);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.boardgame-card:hover .quest-reward {
    background: linear-gradient(135deg, 
                rgba(255, 158, 68, 0.25), 
                rgba(255, 158, 68, 0.15));
    border-color: rgba(255, 158, 68, 0.5);
    transform: translateY(-2px);
}

.reward-icon {
    color: #ffae5d;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 174, 93, 0.6));
    flex-shrink: 0;
}

.reward-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Статус выполненного задания */
.quest-completed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quest-completed i {
    font-size: 1.1rem;
}

/* Специфические стили для типов карточек */

/* Периодические задания */
.boardgame-card.periodic {
    background: linear-gradient(145deg, 
                rgba(40, 40, 40, 0.85) 0%, 
                rgba(70, 50, 30, 0.8) 50%,
                rgba(30, 30, 30, 0.9) 100%);
}

.boardgame-card.periodic::before {
    background: linear-gradient(
        135deg,
        rgba(18, 18, 18, 0.4) 0%,
        rgba(40, 30, 10, 0.5) 50%,
        rgba(50, 35, 10, 0.6) 100%
    );
}

/* Эксклюзивные задания */
.boardgame-card.exclusive {
    background: linear-gradient(145deg, 
                rgba(60, 45, 0, 0.85) 0%, 
                rgba(90, 67, 0, 0.8) 50%,
                rgba(40, 30, 0, 0.9) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.boardgame-card.exclusive::before {
    background: linear-gradient(
        135deg,
        rgba(30, 22, 0, 0.4) 0%,
        rgba(50, 37, 0, 0.5) 50%,
        rgba(60, 45, 0, 0.6) 100%
    );
}

.boardgame-card.exclusive:hover {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.6),
                0 0 120px rgba(255, 215, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.boardgame-card.exclusive .quest-reward {
    background: linear-gradient(135deg, 
                rgba(255, 215, 0, 0.15), 
                rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.3);
}

.boardgame-card.exclusive .reward-icon {
    color: var(--gold);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
}

/* Состояние выполненного задания */
.boardgame-card.completed {
    opacity: 0.9;
    filter: saturate(0.8);
}

.boardgame-card.completed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(76, 175, 80, 0.1), 
                transparent 50%);
    border-radius: 18px;
    pointer-events: none;
    z-index: 1;
}

/* Бейдж "Скоро" для upcoming заданий */
.upcoming-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 4; /* Выше градиентного оверлея */
    backdrop-filter: blur(2px);
}

.upcoming-overlay i {
    font-size: 3rem;
    color: var(--gold);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.upcoming-overlay span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .unified-quests-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 992px) {
    .unified-quests-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .boardgame-card {
        min-height: 450px;
        padding: 1.8rem;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .main-event-banner {
        padding: 2.5rem 1.5rem;
        min-height: 300px;
    }
    
    .event-title {
        font-size: 2.2rem;
    }
    
    .event-description {
        font-size: 1.1rem;
    }
    
    .unified-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .unified-title {
        font-size: 2rem;
    }
    
    .unified-quests-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .boardgame-card {
        min-height: 420px;
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-description {
        font-size: 1rem;
    }
    
    .timer-item {
        gap: 0.6rem;
    }
    
    .timer-value {
        font-size: 2rem;
    }
    
    .timer-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .main-event-banner {
        padding: 2rem 1rem;
        min-height: 250px;
    }
    
    .event-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .event-description {
        font-size: 1rem;
    }
    
    .boardgame-card {
        padding: 1.2rem;
        min-height: 380px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card-description {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
    
    .unified-title {
        font-size: 1.8rem;
    }
    
    .timer-value {
        font-size: 1.8rem;
    }
    
    .main-event-banner .timer-value {
        font-size: 2rem;
    }
    
    .unified-timer .timer-value {
        font-size: 1.6rem;
    }
    
    .timer-text {
        font-size: 0.8rem;
    }
    
    .reward-icon {
        font-size: 1.3rem;
    }
    
    .reward-name {
        font-size: 0.9rem;
    }
    
    .quest-completed {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}