/* Итоги года */

/* Шапка страницы */
.yr-header h3 {
    margin: 0;
    font-size: 18px;
}

/* Финальный блок */
.yr-footer {
    text-align: center;
}
.yr-footer .ch_descr {
    display: inline-block;
    text-align: left;
}

/* Общий блок */

.yr-block h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #777;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.yr-block-anchor {
    position: absolute;
    right: 0;
    top: 0;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.yr-block-anchor:hover {
    color: #1976d2;
}

/* Структура блока: слева список, справа итоги с заголовком */
.yr-block-content {
    display: flex;
    gap: 20px;
}

.yr-block-left {
    flex: 1;
    min-width: 0;
}

.yr-block-right {
    width: 180px;
    flex-shrink: 0;
}

/* Сводка справа */
.yr-block-summary {
    text-align: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
}

.yr-block-stat {
    margin-bottom: 10px;
}

.yr-block-stat:last-child {
    margin-bottom: 0;
}

.yr-block-stat--divider {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.yr-block-stat__value {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    line-height: 1.1;
}

.yr-block-stat__label {
    display: block;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Диаграмма */
.yr-block-chart {
    min-height: 160px;
    margin-top: 10px;
}

.yr-block-chart--small {
    min-height: 60px;
}

/* ==================== УНИВЕРСАЛЬНЫЙ ЭЛЕМЕНТ СПИСКА ==================== */

.yr-item {
    display: flex;
    align-items: center;
    padding: 6px;
    border: 1px solid transparent;
    border-bottom-color: #f0f0f0;
    transition: background-color 0.2s;
}

.yr-item:last-child:not([class*="featured"]) {
    border-bottom-color: transparent;
}

.yr-item:hover {
    background-color: #fafafa;
}

/* Индекс (номер) */
.yr-item__index {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    text-align: center;
    margin: 0 8px;
    min-width: 16px;
}

/* Иконка/логотип */
.yr-item__icon {
    flex-shrink: 0;
    margin-right: 8px;
}

.yr-item__icon img {
    display: block;
    border-radius: 2px;
}

/* Информация */
.yr-item__info {
    flex: 1;
    min-width: 0;
}

.yr-item__title {
    font-size: 13px;
}

.yr-item__descr {
    display: block;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.yr-item__meta {
    display: block;
    font-size: 10px;
    color: #999;
}

.yr-item__type {
    display: block;
    font-size: 10px;
    color: #888;
}

.yr-item__season {
    font-size: 10px;
    color: #999;
}

.yr-item__country:not(:empty) {
    margin-left: 4px;
    color: #aaa;
}

.yr-item__country:not(:empty):before {
    content: '·';
    margin-right: 4px;
}

/* Результат справа */
.yr-item__result {
    flex-shrink: 0;
    text-align: right;
    margin-right: 8px;
}

.yr-item__place {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.yr-item__rating {
    display: block;
    font-size: 10px;
    color: #4caf50;
}

.yr-item__medal {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.yr-item__medal img {
    vertical-align: middle;
}

/* ==================== МОДИФИКАТОРЫ FEATURED ==================== */

/* Базовый featured (без цвета) */
.yr-item--featured {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 8px;
}

/* Золотой (достижения) */
.yr-item--featured-gold {
    background: linear-gradient(135deg, #fffde7 0%, #fff8e1 100%);
    border: 1px solid #ffe082;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 8px;
}

.yr-item--featured-gold .yr-item__index,
.yr-item--featured-gold .yr-item__title {
    color: #f57c00;
}

/* Синий (клубы) */
.yr-item--featured-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 8px;
}

.yr-item--featured-blue .yr-item__title, .yr-item--featured-gold .yr-item__title, .yr-item--featured-purple .yr-item__title {
    font-weight: bold;
}

/* Фиолетовый (турниры) */
.yr-item--featured-purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 1px solid #ce93d8;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 8px;
}

.yr-item--featured-purple .yr-item__index,
.yr-item--featured-purple .yr-item__title {
    color: #7b1fa2;
}

/* Зелёный (матчи) */
.yr-item--featured-green {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 8px;
}

.yr-item--featured-green .yr-item__index,
.yr-item--featured-green .yr-item__title {
    color: #2e7d32;
}

.yr-item--featured-green .yr-item__title {
    font-weight: bold;
}

/* Статистика В/Н/П */
.yr-item__stats-row {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    font-size: 11px;
    font-weight: bold;
}

.yr-item__win {
    color: #4caf50;
}

.yr-item__draw {
    color: #9e9e9e;
}

.yr-item__lose {
    color: #f44336;
}

/* ==================== СПЕЦИФИЧНЫЕ СПИСКИ ==================== */

.yr-clubs-list {
    margin-bottom: 15px;
}

/* Разделитель между таблицами */
.yr-list-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0 20%, #e0e0e0 80%, transparent);
    margin: 12px 0;
}

/* ==================== БЛОК ТАКТИКИ ==================== */

.yr-tactics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yr-tactic-item {
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
}

.yr-tactic-item--featured {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #a5d6a7;
}

/* Блок с графиком клубов */
.yr-tactic-item--with-chart {
    display: flex;
    gap: 15px;
}

.yr-tactic-item__main {
    flex: 0 0 auto;
}

.yr-tactic-item__chart {
    flex: 1;
    min-width: 200px;
}

.yr-tactic-item__label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.yr-tactic-item__formation {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    color: #1976d2;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #90caf9;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.yr-tactic-item--featured .yr-tactic-item__formation {
    color: #2e7d32;
    background: linear-gradient(135deg, #fff 0%, #e8f5e9 100%);
    border-color: #81c784;
}

.yr-tactic-item__formation--opponent {
    color: #e65100;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ffb74d;
}

.yr-tactic-item__stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #666;
}

.yr-tactic-item__win {
    color: #4caf50;
    font-weight: 600;
}

.yr-tactic-item__draw {
    color: #9e9e9e;
}

.yr-tactic-item__best {
    color: #1976d2;
    font-style: italic;
}

.yr-tactic-item__lose {
    color: #f44336;
    font-weight: 600;
}

/* Header с схемой и клубами */
.yr-tactic-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

/* Клубы для схемы */
.yr-formation-clubs {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.yr-formation-club {
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

.yr-formation-club:hover {
    opacity: 1;
    transform: scale(1.1);
}

.yr-formation-club img {
    display: block;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Обыгрываемые схемы */
.yr-tactic-item--beaten {
    background: #fff;
}

.yr-beaten-list {
    margin-top: 8px;
}

.yr-beaten-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.yr-beaten-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.yr-beaten-item__formation {
    font-size: 13px;
    font-weight: bold;
    color: #e65100;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid #ffb74d;
    font-family: 'Roboto Mono', monospace;
}

.yr-beaten-item__stats {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #666;
}

.yr-beaten-item__best {
    font-size: 10px;
    color: #1976d2;
    font-style: italic;
    margin-left: auto;
}

/* Цвета типов схем */
.yr-type-balanced {
    color: #2196F3 !important;
}

.yr-type-attacking {
    color: #F44336 !important;
}

.yr-type-defensive {
    color: #4CAF50 !important;
}

/* Сообщение "нет данных" */
.yr-no-data {
    font-size: 12px;
    color: #999;
    font-style: italic;
    padding: 8px 0;
}

/* Секция клубов в правой панели */
.yr-clubs-section {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.yr-clubs-section__title {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-bottom: 8px;
}

/* Маленький badge для схемы в заголовке */
.yr-tactic-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    color: #1976d2;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Roboto Mono', monospace;
}

/* ==================== БЛОК ИНФРАСТРУКТУРЫ ==================== */

.yr-buildings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yr-building-item {
    padding: 8px;
}

.yr-building-item .yr-item__icon img {
    border: 1px dotted #eee;
    padding: 10px;
    border-radius: 3px;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.4);
}

.yr-building-levels {
    font-weight: 600;
    color: #4caf50;
}

.yr-building-costs {
    flex-shrink: 0;
    text-align: right;
    margin-left: auto;
}

.yr-building-cost-row {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    font-size: 11px;
    line-height: 1.4;
}

.yr-building-cost-label {
    color: #999;
}

.yr-building-cost-value {
    font-weight: 600;
    min-width: 70px;
}

.yr-stat-cost {
    color: #4caf50 !important;
}

.yr-stat-maintenance {
    color: #f57c00 !important;
}

.yr-stat-demolished {
    color: #f44336 !important;
}

/* ==================== БЛОК ТАЛАНТОВ ==================== */

.yr-talents-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 15px;
}

.yr-talents-list .yr-item:not([class*="featured"]),
.yr-talents-list .yr-item:last-child:not([class*="featured"]) {
    border-bottom-color: #f0f0f0;
}

.yr-list-title {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.yr-talent-item .yr-item__icon img {
    border-radius: 4px;
}

.yr-talent-count {
    font-size: 16px;
    font-weight: bold;
    color: #4caf50;
}

.yr-stat-working {
    color: #4caf50 !important;
}

.yr-talents-players {
    background: #f9f9f9;
    border-radius: 4px;
    padding: 10px;
}

.yr-talents-players__title {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-align: center;
}

/* yr-talent-player использует базовые стили yr-item */
.yr-talent-player .yr-item__icon img {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

.yr-talent-player .yr-item__title {
    text-decoration: none;
}

.yr-talent-player .yr-item__title:hover {
    color: #1976d2;
}

.yr-talent-player__talents {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.yr-talent-player__talents .talent {
    display: block;
}

/* ==================== БЛОК ТРАНСФЕРОВ ==================== */

.yr-transfers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 15px;
}

.yr-transfer-club .yr-item__logo img,
.yr-transfer-deal .yr-item__photo img {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

.yr-transfer-club .yr-item__title,
.yr-transfer-deal .yr-item__title {
    text-decoration: none;
}

.yr-transfer-club .yr-item__title:hover,
.yr-transfer-deal .yr-item__title:hover {
    color: #1976d2;
}

.yr-transfer-stats {
    margin-left: auto;
    display: flex;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.yr-transfer-balance {
    min-width: 60px;
    text-align: right;
}

.yr-transfer-deal-sum {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.yr-transfer-deal-sum span:first-child {
    font-weight: 600;
    font-size: 12px;
}

.yr-deal-type {
    display: block;
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
}

.yr-stat-income {
    color: #4caf50;
}

.yr-stat-cost {
    color: #f44336;
}

/* Стили для статистики клубов (доход/расход/баланс) */
.yr-transfer-costs {
    flex-shrink: 0;
    text-align: right;
    margin-left: auto;
}

.yr-transfer-cost-row {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    font-size: 11px;
    line-height: 1.4;
}

.yr-transfer-cost-label {
    color: #999;
}

.yr-transfer-cost-value {
    font-weight: 600;
    min-width: 70px;
}

/* Фото игроков в сделках */
.yr-transfers-list .yr-item .yr-item__icon img {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}

/* График финансовой активности */
.yr-chart-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#yr-transfers-chart {
    width: 100%;
    min-height: 220px;
}

/* ==================== АДАПТИВ ==================== */

@media (max-width: 768px) {
    .yr-block-content {
        flex-direction: column;
    }

    .yr-block-right {
        width: 100%;
        order: -1;
        margin-bottom: 12px;
    }

    .yr-block-summary {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .yr-block-stat {
        margin-bottom: 0;
        padding: 4px 8px;
    }

    .yr-block-stat--divider {
        border-top: none;
        border-left: 1px solid #e0e0e0;
        padding-top: 0;
        padding-left: 12px;
        margin-top: 0;
    }
}
