/* ====================================================================== */
/* ===          ЦЕНТР СОБЫТИЙ (EVENT CENTER)                          === */
/* ====================================================================== */

/* Общая обертка центрирования */
.event-center-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 0 60px;
}

/* Шапка страницы */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.event-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    letter-spacing: -0.5px;
}

.event-title svg {
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.4));
}

.btn-profile-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: 0.2s;
    cursor: pointer;
}

.btn-profile-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Вкладки навигации (Мои темы / Голосование) */
.event-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 24px;
    list-style: none;
    padding-left: 0;
}

.event-tab-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.event-tab-link.active {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.event-tab-link.locked {
    color: #64748b;
    border: 1px solid transparent;
    cursor: not-allowed;
}

/* Главная карточка с формой */
.event-form-card {
    background: rgba(15, 18, 25, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.event-desc-text {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Переключатель "Тема дня / Челлендж" */
.event-type-switcher {
    display: flex;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    position: relative;
}

.event-type-switcher input[type="radio"] {
    display: none;
}

.event-type-label {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Активное состояние для радиокнопок */
.event-type-switcher input[type="radio"]:checked + .event-type-label {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.3);
}

/* Поля формы */
.event-form-group {
    margin-bottom: 20px;
}

.event-form-label {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.event-form-control {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

/* Красивый фокус на текстовом поле */
.event-form-control:focus {
    border-color: #facc15;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
    background: #0f111a;
}

textarea.event-form-control {
    resize: vertical;
    min-height: 100px;
}

/* Стилизация File Input */
.event-file-input::-webkit-file-upload-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    margin-right: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.event-file-input::-webkit-file-upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Кнопка отправки */
.event-submit-btn {
    background: #facc15;
    color: #000;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
}

.event-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.5);
    background: #fde047;
}

.event-submit-btn:disabled {
    background: #475569;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.event-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-item-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.event-item-body {
    padding: 15px;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    font-size: 0.75rem;
    color: #94a3b8;
}

@media (max-width: 576px) {
    .event-form-card { padding: 20px; }
    .event-submit-btn { width: 100%; }
}

/* ====================================================================== */
/* ===          СЕТКА КАРТОЧЕК ИВЕНТОВ (NEW DESIGN)                   === */
/* ====================================================================== */

.event-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); /* Оптимальная ширина для квадратных карточек */
    gap: 20px;
}

/* Карточка темы */
.evt-card {
    background: rgba(20, 24, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.evt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Блок с картинкой (СТРОГО КВАДРАТНЫЙ) */
.evt-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Делает блок квадратным 1:1 */
    background: linear-gradient(45deg, #0f172a, #1e293b); /* Фон, если картинки нет */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.evt-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезает картинку, чтобы она заполнила квадрат без искажений */
}

/* Плашки поверх картинки */
.evt-badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.evt-btn-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.evt-btn-delete:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Тело карточки */
.evt-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 14px;
}

.evt-card-text {
    font-size: 0.95rem;
    color: #f1f5f9;
    line-height: 1.5;
    margin: 0;
    /* Обрезает длинный текст на 4 строке и ставит троеточие */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Статусы (Прижимаются к низу карточки) */
.evt-status-badge {
    margin-top: auto; 
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Цвета для разных статусов */
.evt-status-pending { background: rgba(245, 158, 11, 0.1); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.2); }
.evt-status-ready { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.2); }
.evt-status-published { background: rgba(168, 85, 247, 0.1); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.2); }
.evt-status-failed { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Кнопки для админки */
.evt-admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}
.evt-author-info {
    font-size: 0.75rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* ====================================================================== */
/* ===          ИНФОРМАЦИОННЫЙ БАННЕР (TELEGRAM INFO)                 === */
/* ====================================================================== */

.evt-info-banner {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Боковая неоновая полоска */
.evt-info-banner::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0;
    width: 4px;
    height: 100%;
    background: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.8);
}

.evt-tg-icon {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(56, 189, 248, 0.2);
}