/* ============================================= */
/* СТИЛИ ВИДЖЕТОВ СТРЕКОЗ ЧУВАШИИ                   */
/* ============================================= */

.bird-widget {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.bird-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.bird-widget--tall {
    grid-row: span 2;
}

.bird-widget--full-width {
    grid-column: 1 / -1;
    width: 100%;
}

.bird-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f0f8;
}

.bird-widget-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e2d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bird-badge {
    font-size: 0.7em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.bird-badge.live { background: #e8f5e9; color: #2e7d32; }
.bird-badge.hot { background: #fdf0f0; color: #c62828; }

.bird-link { font-size: 0.8em; color: #3498db; text-decoration: none; }
.bird-link:hover { text-decoration: underline; }

.bird-subtitle { font-size: 0.75em; color: #aaa; }

/* Список лидеров */
.bird-leader-list { list-style: none; }

.bird-leader-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e8f0f8;
    transition: background 0.2s, padding 0.2s;
    border-radius: 8px;
}

.bird-leader-item.clickable { cursor: pointer; }
.bird-leader-item.clickable:hover {
    background: #f5f9fc;
    padding-left: 8px;
    padding-right: 8px;
}

.bird-rank {
    font-weight: 800;
    font-size: 1.1em;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.bird-rank.gold { color: #f4c430; }
.bird-rank.silver { color: #c0c0c0; }
.bird-rank.bronze { color: #cd7f32; }

.bird-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bird-avatar-pl {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #6B4226);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    flex-shrink: 0;
}

.bird-leader-info { flex: 1; min-width: 0; }

.bird-leader-name {
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bird-leader-login { font-size: 0.75em; color: #888; }

.bird-leader-value {
    font-weight: 700;
    font-size: 1.1em;
    color: #2471a3;
    flex-shrink: 0;
}

/* ============================================= */
/* FEATURED КАРТОЧКА (Птица недели/месяца/Редкая) */
/* ============================================= */

.bird-featured-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bird-featured-img-link {
    display: block;
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
}

.bird-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.bird-featured-img-link:hover .bird-featured-img {
    transform: scale(1.05);
}

.bird-featured-img-pl {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    background: linear-gradient(135deg, #3498db, #6B4226);
}

.bird-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bird-featured-badge--week { background: linear-gradient(135deg, #3498db, #2980b9); }
.bird-featured-badge--month { background: linear-gradient(135deg, #f39c12, #e67e22); }
.bird-featured-badge--rare { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.bird-featured-body { padding: 5px 0; }

.bird-featured-name {
    font-weight: 700;
    font-size: 1.2em;
    color: #2c3e2d;
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
    line-height: 1.3;
}

.bird-featured-name:hover { color: #3498db; text-decoration: underline; }

.bird-featured-latin { font-style: italic; font-size: 0.85em; color: #888; margin-bottom: 8px; }

.bird-featured-count { font-size: 0.9em; color: #2471a3; margin-bottom: 6px; }

.bird-featured-number { font-weight: 700; font-size: 1.3em; color: #2c3e2d; margin-right: 3px; }

.bird-featured-link { color: #3498db; text-decoration: none; font-size: 0.8em; font-weight: 600; }
.bird-featured-link:hover { text-decoration: underline; }

/* ============================================= */
/* ЗАГРУЗКА                                      */
/* ============================================= */

.bird-loading { text-align: center; padding: 30px; color: #ccc; }

.bird-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e8f0f8;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bird-view-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 8px;
}

.bird-view-all:hover { background: #f5f9fc; text-decoration: underline; }

/* ============================================= */
/* ПОЛНОШИРИННЫЙ ВИДЖЕТ                         */
/* ============================================= */

.bird-recent-grid-10 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 12px;
}

.bird-recent-card-10 {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f9fc;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bird-recent-card-10:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.bird-recent-img-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #e8e0d0;
}

.bird-recent-img-10 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.bird-recent-card-10:hover .bird-recent-img-10 { transform: scale(1.05); }

.bird-recent-img-pl-10 {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    background: linear-gradient(135deg, #3498db, #6B4226);
}

.bird-recent-date-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.bird-recent-body-10 { padding: 12px; }

.bird-recent-name-10 {
    font-weight: 700;
    font-size: 0.9em;
    color: #2c3e2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.bird-recent-latin-10 {
    font-style: italic;
    font-size: 0.75em;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.bird-recent-meta-10 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7em;
    color: #aaa;
    gap: 8px;
}

.bird-recent-place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.bird-recent-user { white-space: nowrap; flex-shrink: 0; color: #3498db; font-weight: 500; }

/* ============================================= */
/* АКТИВНОСТЬ ПО ДНЯМ                            */
/* ============================================= */

.bird-activity-chart { padding: 10px 5px 0 5px; }

.bird-activity-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 180px;
    padding: 20px 5px 25px 5px;
    border-bottom: 2px solid #eee;
}

.bird-activity-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.bird-activity-bar {
    width: 100%;
    background: linear-gradient(180deg, #c048a0, #800060);
    border-radius: 2px 2px 0 0;
    min-height: 3px;
    position: relative;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
}

.bird-activity-bar:hover { filter: brightness(1.3); transform: scaleY(1.05); transform-origin: bottom; }
.bird-activity-bar--today { background: linear-gradient(180deg, #e74c3c, #c0392b) !important; }

.bird-activity-bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #666;
    white-space: nowrap;
}

.bird-activity-bar-label { position: absolute; bottom: -20px; font-size: 9px; color: #aaa; }
.bird-activity-bar-label--today { color: #e74c3c; font-weight: 700; }

.bird-activity-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 8px;
}

.bird-activity-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75em; color: #888; }
.bird-activity-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ============================================= */
/* ТОП ВИДОВ МЕСЯЦА                             */
/* ============================================= */

.bird-top-species-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

.bird-top-species-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f9fc;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

.bird-top-species-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

.bird-top-species-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.bird-top-species-img-wrap { width: 100%; height: 150px; overflow: hidden; background: #e8e0d0; }
.bird-top-species-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.bird-top-species-card:hover .bird-top-species-img { transform: scale(1.05); }

.bird-top-species-img-pl {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    background: linear-gradient(135deg, #3498db, #6B4226);
}

.bird-top-species-body { padding: 12px; }

.bird-top-species-name {
    font-weight: 700;
    font-size: 0.95em;
    color: #2c3e2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.bird-top-species-latin {
    font-style: italic;
    font-size: 0.75em;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.bird-top-species-count { font-size: 0.8em; color: #2471a3; }
.bird-top-species-number { font-weight: 700; font-size: 1.5em; color: #2c3e2d; margin-right: 3px; }

/* ============================================= */
/* АДАПТИВНОСТЬ                                  */
/* ============================================= */

@media (max-width: 1200px) {
    .bird-recent-grid-10,
    .bird-top-species-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: auto; }
}

@media (max-width: 900px) {
    .bird-recent-grid-10,
    .bird-top-species-grid { grid-template-columns: repeat(3, 1fr); }
    .bird-activity-bars { height: 120px; }
}

@media (max-width: 768px) {
    .bird-widget--tall { grid-row: span 1; }
    .bird-featured-img-link { height: 180px; }
}

@media (max-width: 600px) {
    .bird-recent-grid-10,
    .bird-top-species-grid { grid-template-columns: repeat(2, 1fr); }
    .bird-recent-img-wrap,
    .bird-top-species-img-wrap { height: 120px; }
}
/* ============================================= */
/* ГОД НАЗАД — сегодня                           */
/* ============================================= */

.bird-year-ago--today {
    border: 2px solid #f4c430 !important;
    box-shadow: 0 2px 12px rgba(244,196,48,0.2) !important;
}

.bird-year-ago-today-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: #f4c430;
    color: #333;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.65em;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}