/* ============================================================
   БАНК ХВБ — ОБЩИЕ СТИЛИ
   ============================================================ */

/* ===== ПОДКЛЮЧЕНИЕ ШРИФТА MINECRAFT ===== */
@font-face {
    font-family: 'Minecraft';
    src: url('../fonts/minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== СБРОС ===== */
* { margin:0; padding:0; box-sizing:border-box; }

body {
    background: #07070d;
    color: #fff;
    font-family: 'Minecraft', 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* ============================================================
   ФОНОВЫЕ КОНТЕЙНЕРЫ (видео и картинка)
   ============================================================ */

.bg-video-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.bg-video-container video {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.7) blur(2px);
}
.bg-video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 13, 0.6);
    z-index: 1;
}

.bg-image-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.bg-image {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.bg-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 13, 0.5);
    z-index: 1;
}

/* ============================================================
   ЧАСТИЦЫ
   ============================================================ */

.particles-container,
.bg-particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(214,175,106, 0.4);
    box-shadow: 0 0 10px rgba(214,175,106, 0.3);
    animation: floatParticle linear infinite;
}
@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ============================================================
   ШАПКА (ЕДИНАЯ)
   ============================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: linear-gradient(180deg, rgba(14,14,16,0.6) 0%, rgba(14,14,16,0.4) 70%, rgba(14,14,16,0.2) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #d6af6a;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: logoPulse 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-text:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 15px rgba(214,175,106, 0.5);
}
@keyframes logoPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ===== ЦЕНТРАЛЬНАЯ НАВИГАЦИЯ ===== */
.nav-center {
    display: flex;
    gap: 40px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    padding: 10px 6px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-item:hover {
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 2px 15px rgba(255,255,255,0.4);
}
.nav-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}
.nav-item.active {
    color: #fff;
    font-weight: 800;
}
.nav-item.active::after {
    transform: translateX(-50%) scaleX(1);
}
.nav-item .icon {
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}
.nav-item:hover .icon {
    transform: translateY(-3px) scale(1.15);
}

/* ===== ПРАВАЯ ЧАСТЬ ШАПКИ ===== */
.right-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 20px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.balance-container:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.02);
}
.balance-icon { font-size: 18px; }
.balance-text { font-size: 15px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.8); }
.balance-amount {
    font-size: 16px;
    font-weight: 800;
    color: #d6af6a;
    transition: all 0.3s ease;
}
.balance-amount.pulse { animation: balancePulse 0.4s ease; }
@keyframes balancePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-btn {
    position: relative;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
}
.notification-btn:hover {
    transform: scale(1.15) rotate(10deg);
    text-shadow: 0 2px 15px rgba(255,255,255,0.4);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e2604f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 50px;
    min-width: 16px;
    text-align: center;
    display: none;
}

.profile-link {
    color: #d6af6a;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 4px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-link:hover {
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 2px 15px rgba(214,175,106, 0.4);
}

/* ============================================================
   КОНТЕЙНЕР
   ============================================================ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}
.back {
    color: #85807a;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 30px;
    transition: 0.2s;
}
.back:hover {
    color: #d6af6a;
    transform: translateX(-4px);
}

/* ============================================================
   ЗАГОЛОВКИ СТРАНИЦ
   ============================================================ */

.page-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}
.page-title {
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(135deg, #d6af6a, #c48a3e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-sub {
    color: #85807a;
    font-size: 16px;
    margin-top: 5px;
}
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   БАННЕР (для страниц банка/казино)
   ============================================================ */

.top-banner {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    padding: 35px 30px;
    margin-bottom: 45px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.top-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(7,7,13,0.85) 0%, rgba(7,7,13,0.2) 70%);
    z-index: 1;
}
.top-banner .top-content { position: relative; z-index: 2; }
.top-banner h1 { font-size: 32px; font-weight: 800; margin-bottom: 5px; color: #fff; }
.top-banner p { color: #b9b4ac; font-size: 15px; }

/* ============================================================
   СЕТКА КАРТОЧЕК
   ============================================================ */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 10px;
}
.grid-item {
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}
.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.15s; }
.grid-item:nth-child(3) { animation-delay: 0.2s; }
.grid-item:nth-child(4) { animation-delay: 0.25s; }
.grid-item:nth-child(5) { animation-delay: 0.3s; }
.grid-item:nth-child(6) { animation-delay: 0.35s; }
.grid-item:nth-child(7) { animation-delay: 0.4s; }
.grid-item:nth-child(8) { animation-delay: 0.45s; }
.grid-item:nth-child(9) { animation-delay: 0.5s; }

/* ============================================================
   КАРТОЧКИ (универсальные)
   ============================================================ */

.card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 240px;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(214,175,106, 0.3);
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7,7,13,0.95) 0%, rgba(7,7,13,0.1) 60%, rgba(7,7,13,0.4) 100%);
    z-index: 1;
    transition: 0.3s ease;
}
.card:hover::before {
    background: linear-gradient(to top, rgba(7,7,13,0.98) 0%, rgba(7,7,13,0.3) 50%);
}
.card-content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.card .name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 3px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}
.card .desc {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.card .btn {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}
.card:hover .btn {
    background: #d6af6a;
    color: #0a0a0f;
    border-color: #d6af6a;
    transform: scale(1.05);
}
.card-purple:hover .btn { background: #a07a4c; border-color: #a07a4c; color: #fff; }
.card-danger:hover .btn { background: #e2604f; border-color: #e2604f; color: #fff; }
.card-green:hover .btn  { background: #8fd3a0; border-color: #8fd3a0; color: #0a0a0f; }

/* ============================================================
   КНОПКИ (универсальные)
   ============================================================ */

.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { transform: scale(1.05); }

.btn-gold { background: rgba(214,175,106, 0.2); border-color: #d6af6a; color: #d6af6a; }
.btn-gold:hover { background: #d6af6a; color: #0a0a0f; box-shadow: 0 0 25px rgba(214,175,106, 0.3); }

.btn-danger { background: rgba(226,96,79,0.2); border-color: #e2604f; color: #e2604f; }
.btn-danger:hover { background: #e2604f; color: #fff; box-shadow: 0 0 25px rgba(226,96,79,0.3); }

.btn-green { background: rgba(143,211,160,0.2); border-color: #8fd3a0; color: #8fd3a0; }
.btn-green:hover { background: #8fd3a0; color: #0a0a0f; box-shadow: 0 0 25px rgba(143,211,160,0.3); }

.btn-purple { background: rgba(155,89,182,0.2); border-color: #a07a4c; color: #a07a4c; }
.btn-purple:hover { background: #a07a4c; color: #fff; box-shadow: 0 0 25px rgba(155,89,182,0.3); }

/* ============================================================
   FLASH-СООБЩЕНИЯ
   ============================================================ */

.flash {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}
.flash-error { background: rgba(226,96,79,0.15); border: 1px solid #e2604f; color: #e2604f; }
.flash-success { background: rgba(143,211,160,0.15); border: 1px solid #8fd3a0; color: #8fd3a0; }

/* ============================================================
   МОДАЛЬНОЕ ОКНО УВЕДОМЛЕНИЙ
   ============================================================ */

.notif-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.notif-modal.active { display: flex; }

.notif-modal-box {
    background: #1b1b1e;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 25px;
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
    box-shadow: 0 30px 80px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
    0% { opacity: 0; transform: scale(0.9) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.notif-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.notif-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #d6af6a;
}
.notif-close-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #889;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}
.notif-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.notif-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}
.notif-loading {
    text-align: center;
    color: #85807a;
    padding: 40px 10px;
    font-size: 16px;
}
.notif-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    transition: 0.2s;
}
.notif-item:hover { background: rgba(255,255,255,0.06); }
.notif-sender { font-weight: 700; font-size: 16px; color: #fff; }
.notif-amount { font-weight: 700; font-size: 16px; color: #8fd3a0; }
.notif-comment { color: #d6af6a; font-size: 14px; margin-top: 4px; font-style: italic; }
.notif-date { font-size: 11px; color: #555; margin-top: 4px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 900px) {
    .header { padding: 15px 20px; }
    .nav-center { position: static; transform: none; gap: 20px; margin: 10px 0; }
}

@media (max-width: 800px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .header { padding: 15px 20px; gap: 10px; flex-direction: column; }
    .right-section { gap: 10px; }
    .container { padding: 20px 10px; }
    .grid-3 { grid-template-columns: 1fr; gap: 15px; }
    .card { height: 200px; padding: 15px; }
    .page-title { font-size: 26px; }
}