/* === REFEROK.RU - ЧИСТЫЙ CSS === */

/* 🔧 УБРАТЬ СКРОЛЛ (2 строки) */
html { overflow-x: hidden; }
body { overflow-x: hidden; }

:root {
    --teal-primary: #17a2b8;
    --teal-dark: #138496;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === ШАПКА === */
.bg-teal {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-dark) 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand { font-size: 1.5rem; letter-spacing: 1px; }

.balance-badge, .points-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* css стили цепочки ссылок */
#linkcode_23 { display: table; margin: 0; width: inherit; }
#linkcode_23 a{ width: 220px; height: 10px; color: #068798; font-size: 7.5pt; font-family: sans-serif; text-decoration: none; text-align: center; vertical-align: middle; border: 5px double #708df5; border-radius: 10px; display: table-cell; background: #fff !important; }
#linkcode_23 a:visited { color: #900060; }
#linkcode_23 a:hover{ text-shadow: -1px -1px 1px silver,1px -1px 1px silver; box-shadow: 0px 0px 16px 0px #aaa inset; border: 3px double #D51A01; }
.buylink { position: absolute; right: -5px; top: 3px; font-size: 1vw; text-decoration: none; background: #2492a8; color: #fff !important; border: 5px solid #1e7a8c; border-radius: 15px; padding: 1px; }
.buylink:hover { background: #df3233; color: #fff; border: 1px solid #fff; padding: 8px; font-size: 1.2vw; }
.toplink { position: relative; margin: 0 auto; max-width: 1100px; height: 40px; padding-top: 5px; }
/* === МОБИЛЬНАЯ ВЕРСИЯ - просто отступ === */
@media (max-width: 768px) {
    .toplink {
        margin-bottom: 40px !important;  /* Отступ от контента */
        padding-bottom: 2px !important;
    }
}

/* 🔔 Анимация для непрочитанных уведомлений */
@keyframes bell-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

/* Применяем анимацию к колокольчику если есть непрочитанные */
#notifCount[style*="display"]:not([style*="display: none"]) + .btn-link i.bi-bell-fill,
.badge.bg-danger:not([style*="display: none"]) + .btn-link i.bi-bell-fill {
    animation: bell-shake 2s infinite;
    color: #ffc107 !important; /* Золотой цвет для привлечения внимания */
}

/* Пульсация самого бейджа */
.badge.bg-danger:not([style*="display: none"]) {
    animation: pulse-red 2s infinite;
}

/* === БОКОВОЕ МЕНЮ (ДЕСКТОП) === */
.sidebar-menu {
    position: sticky;
    top: 100px;
    max-height: calc(150vh - 130px);  /* ← ИСПРАВЛЕНО: 100vh вместо 130vh */
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-menu .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #495057;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.sidebar-menu .nav-link:hover {
    background: #e9ecef;
    color: var(--teal-primary);
}

.sidebar-menu .nav-link.active {
    background: var(--teal-primary);
    color: white;
    font-weight: 500;
}

.sidebar-menu .nav-link i {
    font-size: 1rem;
    width: 20px;
}

.col-md-2 { padding-left: 0.5rem; padding-right: 0.5rem; 
}

/* === ОСНОВНОЙ КОНТЕНТ === */
.main-content {
    padding: 1.5rem;
    padding-bottom: 3rem;
}

/* === КАРТОЧКИ === */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    padding: 12px 15px;
}

/* === ОБЪЯВЛЕНИЯ === */
.ad-card {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
    background: white;
    height: 100%;
}

.ad-card:hover {
    border-color: var(--teal-primary);
    transform: translateY(-3px);
}

.ad-card.vip {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
}

/* === КНОПКИ === */
.btn-primary {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-dark) 100%);
    border: none;
}

.btn-teal {
    background-color: var(--teal-primary);
    color: white;
    border: none;
}

.btn-teal:hover {
    background-color: var(--teal-dark);
    color: white;
}

/* === ФОРМЫ === */
.form-control:focus {
    border-color: var(--teal-primary);
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

/* === ТАБЛИЦЫ === */
.table-status th {
    background: var(--teal-primary);
    color: white;
    font-weight: 600;
}

/* === УВЕДОМЛЕНИЯ === */
.alert { border-radius: 10px; border: none; }

/* === ПОДВАЛ === */
.footer {
    background: #000000;
    border-top: 2px solid #000000;
    padding: 1rem 0;
    margin-top: auto;
}

.footer a { color: #ecf0f1; text-decoration: none; }
.footer a:hover { color: white; text-decoration: underline; }

/* === МОБИЛЬНОЕ МЕНЮ (НИЖНЯЯ ПАНЕЛЬ) === */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    z-index: 1040;
    padding: 5px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-nav .row { margin: 0; }
.mobile-nav .col { padding: 0 3px; }

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.7rem;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
}

.mobile-nav-link i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--teal-primary);
}

/* === ВЫПАДАЮЩЕЕ МЕНЮ "ЕЩЁ" === */
#mobileMoreList {
    position: fixed;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: white;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.2);
    z-index: 1039;
    padding: 10px;
    display: none;
    max-height: 40vh;
    overflow-y: auto;
}

#mobileMoreList.show {
    display: block;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-more-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
}

.mobile-more-link:hover {
    background: #f8f9fa;
    color: var(--teal-primary);
}

.mobile-more-link i {
    width: 24px;
    margin-right: 8px;
    font-size: 1.1rem;
}

#mobileMoreOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    background: rgba(0,0,0,0.3);
    z-index: 1038;
    display: none;
}

#mobileMoreOverlay.show { display: block; }

/* === ПЛАВАЮЩАЯ КНОПКА "ЗАГРУЗИТЬ ЕЩЁ" === */
.load-more-btn {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.load-more-btn button {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}

/* === БАННЕРЫ === */
.banners-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.banners-row > div { flex: 0 1 auto; }

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media (max-width: 767px) {
    .balance-badge, .points-badge { display: none !important; }
    
    .main-content {
        padding: 0.75rem;
        padding-bottom: 4rem;
    }
    
    .sidebar-menu {
        position: static;
        max-height: none;
        padding: 0;
    }
    
    .col-md-2, .col-md-10 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar.bg-teal {
        min-height: 60px;
        padding: 5px 10px;
    }
    
    .navbar-brand img { height: 45px !important; }
    
    .banner-slot { display: none !important; }
    
    .banners-row { flex-direction: column; gap: 10px; }
    
    .load-more-btn { bottom: 75px; }
    
    .table-responsive { font-size: 0.85rem; }
    .table-bordered th, .table-bordered td {
        padding: 8px 5px;
    }
    
    body.has-fixed-header { padding-top: 65px; }

    #bancode_60,
    .banner-slot,
    .mobile-banner {
        display: none !important;
    }
    
    .footer {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    .footer .row { margin: 0; }
    
    .footer .col-md-6 {
        padding: 0 5px;
        text-align: center !important;
        margin-bottom: 5px;
    }
    
    .footer .col-md-6:last-child { margin-bottom: 0; }
    
    .footer a {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .mobile-nav { padding: 3px 0; }
    
    .mobile-nav-link {
        padding: 5px 1px;
        font-size: 0.65rem;
    }
    
    .mobile-nav-link i { font-size: 1.1rem; }
    
    .mobile-nav-link small { font-size: 0.6rem; }
    
    body { padding-bottom: 120px !important; }
    
    #mobileMoreList {
        left: 5px;
        right: 5px;
        bottom: 65px;
        padding: 8px;
    }
    
    .mobile-more-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
/* 🔔 Анимация уведомлений */
@keyframes bell-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}
@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}
.badge.bg-danger:not([style*="display: none"]) {
    animation: pulse-red 2s infinite;
}
.badge.bg-danger:not([style*="display: none"]) ~ .btn-link i.bi-bell-fill,
button[data-bs-toggle="dropdown"] .badge.bg-danger + i.bi-bell-fill {
    animation: bell-shake 2s infinite;
    color: #ffc107 !important;
}

/* 🪧 Баннер уведомлений */
.notif-banner {
    transition: background-color 0.3s;
    cursor: pointer;
}
.notif-banner:hover {
    background-color: #ffca2c !important;
}

/* === Сайдбар автосёрфинга (интеграция с дизайном) === */
.surf-sidebar-card {
    position: sticky;
    top: 80px; /* Отступ от фиксированной шапки */
    z-index: 100;
}

.surf-nav .nav-link {
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.surf-nav .nav-link:hover {
    background: #e9f7fa;
    color: #0d6efd;
    transform: translateX(3px);
}

.surf-nav .nav-link.active {
    background: #2cb7d3;
    color: white;
    font-weight: 500;
}

.surf-nav .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* Адаптивность: на мобильных сайдбар сверху */
@media (max-width: 767px) {
    .surf-sidebar-card {
        position: static;
        margin-bottom: 20px;
    }
/* === ИКОНКИ В ПОДВАЛЕ === */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
}

.social-icon img {
    filter: brightness(1.1);
    transition: filter 0.2s;
}

.social-icon:hover img {
    filter: brightness(1.3);
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media (max-width: 768px) {
    .footer {
        padding: 10px 0 !important;
    }
    
    .social-icon img {
        width: 28px !important;
        height: 28px !important;
    }
    
    .footer .small {
        font-size: 0.75rem;
    }
    
    .footer img {
        max-width: 70px;
        height: auto;
    }
}

@media (max-width: 576px) {
    .social-icon {
        margin: 0 4px !important;
    }
    
    .social-icon img {
        width: 26px !important;
        height: 26px !important;
    }
}

/* === СКРОЛЛБАРЫ === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #adb5bd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6c757d; }

.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
#mobileMoreList::-webkit-scrollbar-thumb { background: #ced4da; }