/* ===== clan-info.css – портальный стиль страницы клана ===== */

/* Импорт основных переменных (если не подключены глобально) */
@import url('main.css');

/* Фон страницы – прозрачный, так как основной фон задан в main.css (банк-бг) */
.bgnew {
    background: transparent !important;
    min-height: 100vh;
    position: relative;
}

/* Убираем старую декоративную сетку */
.bgnew::before {
    display: none !important;
}

/* Основной контейнер – портальная карточка */
.clan-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 25px;
    background: var(--chat-bg, rgba(26, 17, 12, 0.35));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: var(--chat-border, 1.5px solid #8b5a2b);
    box-shadow: var(--chat-shadow, 0 10px 25px rgba(0,0,0,0.7)), inset 0 0 20px rgba(212,175,55,0.08);
    color: var(--chat-text, #f5e6d3);
    font-family: var(--chat-font, 'Palatino Linotype', 'Book Antiqua', Palatino, serif);
    transition: var(--chat-transition, all 0.3s ease);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.clan-container:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.4), inset 0 0 30px rgba(212,175,55,0.12);
}

/* Декоративная линия сверху */
.clan-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, #8b4513, #d4af37, transparent);
    z-index: 1;
}

/* Заголовок клана */
.clan-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.clan-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffd966;
    margin: 0 0 8px 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.2);
    line-height: 1.2;
}

.clan-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
    margin-top: 15px;
    color: #d2b48c;
}

.clan-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.clan-meta-item i {
    color: #ffd966;
    width: 20px;
    text-align: center;
}

/* Вкладки (табы) */
.clan-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 25px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 40px;
    backdrop-filter: blur(4px);
    border: 1px solid #8b5a2b;
}

.clan-tab-btn {
    flex: 1 0 auto;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 30px;
    color: #c0b09a;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clan-tab-btn i {
    font-size: 1.1rem;
}

.clan-tab-btn:hover {
    background: rgba(184, 134, 11, 0.2);
    color: #ffd966;
}

.clan-tab-btn.active {
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    border: 1px solid #d4af37;
}

/* Контент вкладки */
.clan-tab-content {
    padding: 10px 0;
}

/* Карточка (общий блок) */
.clan-card {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1.5px solid #8b5a2b;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.clan-card:hover {
    border-color: #d4af37;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 15px rgba(212,175,55,0.2);
}

.clan-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffd966;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #a0522d;
    text-shadow: 1px 1px 2px black;
}

.clan-card-title i {
    color: #d4af37;
    font-size: 1.6rem;
    width: 32px;
    text-align: center;
}

/* Сетка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.stat-card {
    background: rgba(44, 30, 21, 0.8);
    backdrop-filter: blur(8px);
    border: 1.5px solid #8b5a2b;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5), inset 0 0 30px rgba(255, 215, 0, 0.1);
    color: #f0e6d2;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #d4af37;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 15px rgba(212,175,55,0.3);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #b8a58e;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd966;
    margin-bottom: 4px;
}

.stat-sublabel {
    font-size: 0.8rem;
    color: #c0b09a;
}

/* Таблица участников */
.members-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #8b5a2b;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    color: #f0e6d2;
}

.members-table th {
    background: linear-gradient(145deg, #a0522d, #8b4513);
    color: #ffd966;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #d4af37;
    cursor: pointer;
    user-select: none;
}

.members-table th.sort-asc::after {
    content: ' ▲';
}
.members-table th.sort-desc::after {
    content: ' ▼';
}

.members-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(139, 90, 43, 0.5);
    background: rgba(0,0,0,0.2);
}

.members-table tr:hover td {
    background: rgba(60, 40, 30, 0.5);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.status-online {
    background: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
    border-color: #27ae60;
}
.status-offline {
    background: rgba(127, 140, 141, 0.2);
    color: #95a5a6;
    border-color: #7f8c8d;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    justify-content: center;
}

.achievement-item {
    display: block;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    padding: 8px;
    border: 1.5px solid #8b5a2b;
    transition: all 0.2s;
    text-align: center;
}

.achievement-item:hover {
    border-color: #d4af37;
    transform: translateY(-3px);
    box-shadow: 0 0 15px gold;
}

.achievement-item img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px black);
}

/* Логотип клана (SWF / картинка) */
.avatar-display {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    border: 1px dashed #8b5a2b;
    margin-top: 10px;
}

.avatar-media {
    max-width: 100%;
}

/* Кнопки и ссылки */
.clan-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(145deg, #a0522d, #8b4513);
    border: 2px solid #b8860b;
    border-radius: 40px;
    color: #ffd966;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #3a281a;
    font-family: inherit;
}

.clan-button:hover {
    background: linear-gradient(145deg, #8b4513, #5d2906);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3a281a, 0 0 15px gold;
    color: #fff;
}

/* Индикатор загрузки */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #ffd966;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(184, 134, 11, 0.2);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

/* Анимации */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .clan-container {
        margin: 12px;
        padding: 18px;
    }
    .clan-tabs {
        flex-direction: column;
        gap: 5px;
    }
    .clan-tab-btn {
        justify-content: flex-start;
        padding-left: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .clan-card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .clan-title {
        font-size: 1.8rem;
    }
    .members-table th,
    .members-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}