/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Halvar Breitschrift Bold Font */
@font-face {
    font-family: 'Halvar Breitschrift';
    src: url('../fonts/HalvarBreitschrift-Bold.woff2') format('woff2'),
         url('../fonts/HalvarBreitschrift-Bold.woff') format('woff'),
         url('../fonts/HalvarBreitschrift-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-primary: #10141e;
    --bg-secondary: #10141e;
    --bg-tertiary: #131823;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --accent-yellow: #0558ff;
    --accent-green: #28a745;
    --accent-blue: #007bff;
    --border-color: #161b27;
}

html {
    overflow-x: hidden;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Скрытие горизонтального скроллбара */
html::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body {
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    background-color: #0d111a;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Скрытие скроллбара при открытом модальном окне */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #10141e;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border: 1px solid #161b27;
    z-index: 100;
    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar.collapsed {
    width: 80px;
    padding: 15px 10px;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: #373c48;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.sidebar:hover .sidebar-toggle-btn {
    opacity: 1;
    pointer-events: auto;
}

.sidebar.collapsed .sidebar-toggle-btn {
    opacity: 1;
    pointer-events: auto;
    position: static;
    transform: translateY(0);
    margin: 0 auto;
    margin-top: 10px;
    width: 100%;
}

.sidebar-toggle-btn:hover {
    background-color: #131823;
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    margin-bottom: 20px;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar-logo a {
    color: var(--accent-yellow) !important;
    transition: transform 0.3s ease;
    display: inline-block;
}

.sidebar-logo a span,
.logo-text {
    font-family: 'Halvar Breitschrift', 'Onest', sans-serif;
    font-weight: 700;
}

.sidebar.collapsed .logo-text {
    display: none !important;
}

.sidebar.collapsed .logo-text-collapsed {
    display: inline-block !important;
}

.logo-text-collapsed {
    display: none;
}

.sidebar-logo a:hover {
    transform: scale(1.1);
}

.sidebar-logo img {
    width: 120px;
    height: auto;
}

.sidebar-section {
    margin-bottom: 30px;
    position: relative;
}

.sidebar.collapsed .sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgb(55, 60, 72);
    margin-bottom: 15px;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-section-title {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    height: 1px;
    background-color: #161b27;
}

.sidebar.collapsed .sidebar-section:first-of-type::before {
    display: none;
}

.sidebar.collapsed .sidebar-section:last-child {
    margin-top: auto;
    padding-top: 20px;
}

.sidebar.collapsed .sidebar-section:last-child::before {
    top: 0;
}

/* Убираем разделитель перед секцией поддержки, если она последняя */
.sidebar.collapsed .sidebar-section:last-child::before {
    display: block;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 8px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 10px 12px 10px 20px;
    color: #373c48;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid transparent;
    transform: scale(1);
    background-color: transparent;
    position: relative;
}

.sidebar.collapsed .sidebar-menu-link {
    padding: 10px;
    justify-content: center;
    font-size: 0;
    line-height: 1;
    overflow: hidden;
    text-indent: -9999px;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-menu-link .sidebar-menu-icon {
    font-size: 20px !important;
    line-height: 20px !important;
    display: flex !important;
    text-indent: 0;
    margin-right: 0 !important;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
    color: var(--text-primary);
    background-color: #131823;
    border: 1px solid #1a202d;
    transform: scale(1.05);
}

.sidebar-menu-link:hover .sidebar-menu-icon,
.sidebar-menu-link.active .sidebar-menu-icon {
    color: var(--accent-yellow);
}

.sidebar-menu-link:hover .sidebar-menu-icon svg,
.sidebar-menu-link.active .sidebar-menu-icon svg {
    stroke: var(--accent-yellow);
    fill: none;
}

/* Исключение для иконок с fill (mines) */
.sidebar-menu-link:hover .sidebar-menu-icon svg[fill="currentColor"],
.sidebar-menu-link.active .sidebar-menu-icon svg[fill="currentColor"] {
    stroke: none;
    fill: none;
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, margin 0.3s ease;
    color: #373c48;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-menu-icon {
    margin-right: 0;
}

.sidebar-menu-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    transition: stroke 0.3s ease;
}

/* Иконка mines использует fill, а не stroke */
.sidebar-menu-icon svg[fill="currentColor"] path {
    fill: currentColor !important;
    stroke: none !important;
}

.sidebar-menu-icon svg[stroke="none"] {
    stroke: none !important;
}

.sidebar-menu-link:hover .sidebar-menu-icon svg[fill="currentColor"] path,
.sidebar-menu-link.active .sidebar-menu-icon svg[fill="currentColor"] path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

/* Неактивные ссылки в sidebar */
.sidebar-menu-link-inactive {
    opacity: 0.4 !important;
    cursor: default !important;
    pointer-events: auto !important;
}

.sidebar-menu-link-inactive:hover {
    color: var(--text-secondary) !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    transform: scale(1) !important;
}

.sidebar-menu-link-inactive:hover .sidebar-menu-icon,
.sidebar-menu-link-inactive.active .sidebar-menu-icon {
    color: var(--text-secondary) !important;
}

.sidebar-menu-link-inactive:hover .sidebar-menu-icon svg,
.sidebar-menu-link-inactive.active .sidebar-menu-icon svg {
    stroke: var(--text-secondary) !important;
    fill: none !important;
}

.sidebar-menu-link-inactive:hover .sidebar-menu-icon svg[fill="currentColor"],
.sidebar-menu-link-inactive.active .sidebar-menu-icon svg[fill="currentColor"] {
    stroke: none !important;
    fill: var(--text-secondary) !important;
}

.sidebar-menu-link-inactive:hover .sidebar-menu-icon svg[fill="currentColor"] path,
.sidebar-menu-link-inactive.active .sidebar-menu-icon svg[fill="currentColor"] path {
    fill: var(--text-secondary) !important;
    stroke: none !important;
}

.sidebar-ref-banner {
    margin-top: auto;
    background: linear-gradient(135deg, var(--accent-green), #20c997);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    margin-left: 300px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: calc(100% - 300px);
    max-width: calc(100vw - 300px);
    transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
    max-width: calc(100vw - 80px);
}

/* Header */
.header {
    background-color: transparent;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo img {
    height: 30px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #373c48;
    text-decoration: none;
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.3s ease;
}

.header-nav-link:hover {
    color: var(--text-primary);
}

.header-nav-link:hover .header-nav-icon {
    color: var(--accent-yellow);
}

.header-nav-link:hover .header-nav-icon svg {
    stroke: var(--accent-yellow);
    fill: none;
}

.header-nav-link:hover .header-nav-icon svg[fill="currentColor"] {
    stroke: none;
    fill: var(--accent-yellow);
}

.header-nav-link.active {
    color: var(--text-primary);
}

.header-nav-link.active .header-nav-icon {
    color: var(--accent-yellow);
}

.header-nav-link.active .header-nav-icon svg {
    stroke: var(--accent-yellow);
    fill: none;
}

.header-nav-link.active .header-nav-icon svg[fill="currentColor"] {
    stroke: none;
    fill: var(--accent-yellow);
}

.header-nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    color: inherit;
}

.header-nav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: stroke 0.3s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--accent-yellow-hover, #0448e6);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #10141e;
    border-color: var(--text-secondary);
}

/* Balance and Wallet Container */
.balance-wallet-container {
    display: flex;
    align-items: center;
    height: 40px;
    gap: 0;
}

.balance-section {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px 0 0 8px;
}

.balance-section span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    white-space: nowrap;
}

.balance-section svg {
    width: 16px;
    height: 16px;
    fill: var(--accent-yellow) !important;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.wallet-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 15px;
    height: 100%;
    background-color: var(--accent-yellow);
    color: var(--bg-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Onest', sans-serif;
}

.wallet-button:hover {
    background-color: var(--accent-yellow-hover, #0448e6);
}

.wallet-icon {
    width: 18px;
    height: 18px;
    fill: var(--bg-primary);
}

/* Profile Avatar Button */
.profile-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.profile-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-yellow);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Content Area */
.content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Game Cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.games-grid.bento-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.game-card {
    border-radius: 12px;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.game-card.bento-card,
a.game-card.bento-card,
.games-grid .game-card.bento-card,
.games-grid.bento-grid .game-card.bento-card {
    background-color: #10141e !important;
    background: #10141e !important;
    border: 1px solid #161b27 !important;
}

.game-card.bento-card:hover,
a.game-card.bento-card:hover {
    background-color: #10141e !important;
    background: #10141e !important;
    transform: none;
}

/* Неактивные карточки игр */
.game-card-inactive {
    opacity: 0.4 !important;
    cursor: default !important;
    pointer-events: auto !important;
}

.game-card-inactive:hover {
    background-color: #10141e !important;
    background: #10141e !important;
    transform: none !important;
}

.game-card-inactive:hover .bento-content {
    transform: translateY(0) !important;
}

.game-card-inactive:hover .bento-cta {
    opacity: 0 !important;
    transform: translateY(40px) !important;
}

.game-card-inactive .game-card-icon svg {
    color: var(--text-secondary) !important;
    stroke: var(--text-secondary) !important;
    fill: var(--text-secondary) !important;
}

.game-card-inactive .game-card-icon svg path {
    fill: var(--text-secondary) !important;
    stroke: none !important;
}

.game-card-inactive .game-card-title {
    color: var(--text-secondary) !important;
}

.game-card-inactive .game-card-subtitle {
    color: var(--text-secondary) !important;
}

/* Bento Background */
.bento-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
    display: none;
}

/* Bento Content */
.bento-content {
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    transition: transform 0.3s ease;
    position: relative;
}

.game-card:hover .bento-content {
    transform: translateY(-40px);
}

.game-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s ease;
}

.game-card-icon.bento-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.game-card:hover .game-card-icon.bento-icon {
    transform: scale(0.75);
    transform-origin: left;
}

.game-card-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-primary);
    transition: all 0.3s ease;
}

/* Иконка mines использует fill, а не stroke */
.game-card-icon svg[fill="currentColor"] path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.bento-content .game-card-icon svg {
    stroke: var(--accent-yellow);
}

.bento-content .game-card-icon svg[fill="currentColor"] path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.bento-content .game-card-icon svg path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.game-card-inactive .bento-content .game-card-icon svg path {
    fill: var(--text-secondary) !important;
    stroke: none !important;
}

.game-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.game-card-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 100%;
    line-height: 1.5;
}

/* Bento CTA Button */
.bento-cta {
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.3s ease;
    z-index: 10;
}

.game-card:hover .bento-cta {
    opacity: 1;
    transform: translateY(0);
}

.bento-cta-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    pointer-events: auto;
    cursor: pointer;
}

.bento-arrow {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    stroke: var(--text-primary);
    pointer-events: auto;
    cursor: pointer;
}

/* Bento Overlay - removed */

/* Promo Banners */
.promo-banners-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.promo-banners {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}

.promo-banners::-webkit-scrollbar {
    display: none;
}

.promo-banner {
    flex: 0 0 calc(50% - 10px);
    min-width: 300px;
    scroll-snap-align: start;
    border-radius: 15px;
    padding: 30px;
    background: linear-gradient(135deg, var(--accent-green), #20c997);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.promo-banner.blue {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.promo-banner-telegram {
    background: url('/img2.png') center/cover no-repeat !important;
    padding: 0;
    min-height: 200px;
}

.promo-banner-telegram .promo-banner-content {
    position: relative;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-banner-treasure {
    background-image: url('/img.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0;
    min-height: 200px;
}

.promo-banner-treasure .promo-banner-content {
    position: relative;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-banner-bonus {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.promo-banner-referral {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.promo-banners-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-primary);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.promo-banners-arrow:hover {
    background-color: #131823;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.promo-banners-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.promo-banners-arrow-left {
    left: -20px;
}

.promo-banners-arrow-right {
    right: -20px;
}

.promo-banners-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.promo-banner-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.promo-banner-text {
    font-size: 16px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.promo-banner-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    padding: 12px 32px;
    border-radius: 100px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background-color: transparent;
    color: white;
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    align-self: flex-start;
    text-decoration: none;
    transition: all 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.promo-banner-btn:hover {
    border-color: transparent;
    color: white;
    border-radius: 12px;
}

.promo-banner-btn:active {
    transform: scale(0.95);
}

/* Стрелки */
.flow-btn-arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    stroke: white;
    fill: none;
    z-index: 9;
    transition: all 800ms cubic-bezier(0.34, 1.56, 0.64, 1), stroke 800ms ease-out;
}

.flow-btn-arrow-left {
    left: -25%;
}

.flow-btn:hover .flow-btn-arrow-left {
    left: 16px;
    stroke: #0d111a;
}

.flow-btn-arrow-right {
    right: 16px;
}

.flow-btn:hover .flow-btn-arrow-right {
    right: -25%;
    stroke: #0d111a;
}

/* Текст */
.flow-btn-text {
    position: relative;
    z-index: 1;
    transform: translateX(-12px);
    transition: transform 800ms ease-out, color 800ms ease-out;
}

.flow-btn:hover .flow-btn-text {
    transform: translateX(12px);
    color: #0d111a;
}

/* Круг */
.flow-btn-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
}

.flow-btn:hover .flow-btn-circle {
    width: 220px;
    height: 220px;
    opacity: 1;
}

.promo-code-highlight {
    color: var(--accent-yellow);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: background-color 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
}

.promo-code-highlight:hover {
    background-color: var(--accent-yellow-20, rgba(5, 88, 255, 0.2));
}

/* Footer */
.footer {
    background-color: #0d111a;
    border: none;
    padding: 40px 30px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    gap: 60px;
    flex-wrap: wrap;
    padding-left: max(5%, calc((100% - 1400px) / 2 + 40px));
    box-sizing: border-box;
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.footer-logo-link {
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover {
    opacity: 0.8;
}

.footer-logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    font-family: 'Halvar Breitschrift', 'Onest', sans-serif;
}

.footer-copyright {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.5;
}

.footer-telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 12px;
    color: #0088cc;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.footer-telegram-btn:hover {
    background-color: #0088cc;
    color: white;
    border-color: #0088cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.footer-telegram-btn svg {
    width: 24px;
    height: 24px;
}

.footer-nav {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    flex: 1;
}

.footer-nav-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 180px;
}

.footer-nav-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgb(55, 60, 72);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.footer-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #373c48;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid transparent;
    background-color: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    font-family: inherit;
}

.footer-nav-link button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: inherit;
    width: 100%;
    text-align: left;
}

.footer-nav-link:hover,
.footer-nav-link.active {
    color: var(--text-primary);
    background-color: #10141e;
    border: 1px solid #161b27;
}

.footer-nav-link:hover .footer-nav-icon,
.footer-nav-link.active .footer-nav-icon {
    color: var(--accent-yellow);
}

.footer-nav-link:hover .footer-nav-icon svg,
.footer-nav-link.active .footer-nav-icon svg {
    stroke: var(--accent-yellow);
    fill: none;
}

.footer-nav-link:hover .footer-nav-icon svg[fill="currentColor"],
.footer-nav-link.active .footer-nav-icon svg[fill="currentColor"] {
    stroke: none;
    fill: var(--accent-yellow);
}

/* Неактивные ссылки в footer */
.footer-nav-link-inactive {
    opacity: 0.4 !important;
    cursor: default !important;
}

.footer-nav-link-inactive:hover {
    color: var(--text-secondary) !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.footer-nav-link-inactive:hover .footer-nav-icon,
.footer-nav-link-inactive.active .footer-nav-icon {
    color: var(--text-secondary) !important;
}

.footer-nav-link-inactive:hover .footer-nav-icon svg,
.footer-nav-link-inactive.active .footer-nav-icon svg {
    stroke: var(--text-secondary) !important;
    fill: none !important;
}

.footer-nav-link-inactive:hover .footer-nav-icon svg[fill="currentColor"],
.footer-nav-link-inactive.active .footer-nav-icon svg[fill="currentColor"] {
    stroke: none !important;
    fill: var(--text-secondary) !important;
}

.footer-nav-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    color: #373c48;
    flex-shrink: 0;
}

.footer-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    transition: stroke 0.3s ease;
}

.footer-nav-icon svg[fill="currentColor"] path {
    fill: currentColor !important;
    stroke: none !important;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-logo-section {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    
    .footer-nav {
        width: 100%;
        gap: 40px;
    }
    
    .footer-nav-section {
        min-width: auto;
        width: 100%;
    }
}

/* Recent Games Table */
.recent-games {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.recent-games.collapsed .recent-games-header {
    margin-bottom: 0;
}

.recent-games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.recent-games-header h3 {
    margin: 0;
}

.toggle-history-btn {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.toggle-history-btn:hover {
    color: var(--text-primary);
    background-color: #10141e;
}

.toggle-history-btn svg {
    transition: transform 0.3s ease;
}

/* Анимация появления новых строк в истории */
@keyframes slideInRow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-history-row {
    animation: slideInRow 0.3s ease-out forwards;
}

.games-table-wrapper {
    overflow: hidden;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.games-table-wrapper.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.tabs {
    display: flex;
    gap: 20px;
}

.tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-yellow);
}

.games-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.games-table thead {
    border-bottom: 1px solid var(--border-color);
}

.games-table thead tr {
    background-color: transparent;
}

.games-table th {
    padding: 12px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.games-table th:first-child {
    padding-left: 20px;
}

.games-table th:last-child {
    text-align: right;
    padding-right: 20px;
}

.games-table td {
    padding: 15px 12px;
    font-size: 16px;
    color: var(--text-primary);
    border: none;
}

.games-table td:first-child {
    border-radius: 8px 0 0 8px;
    padding-left: 20px;
}

.games-table td:last-child {
    border-radius: 0 8px 8px 0;
    text-align: right;
    padding-right: 20px;
}

.games-table td svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Иконки с fill в истории игр - принудительно применяем fill */
.games-table td svg[fill="currentColor"],
.games-table td svg[fill="currentColor"] * {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.games-table td svg[fill="currentColor"] path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.games-table td svg[fill="currentColor"] circle {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.games-table tbody tr {
    background-color: #131823;
    border: 1px solid #191f2c;
}

.games-table tbody tr:hover {
    background-color: #131823;
    opacity: 0.9;
}

/* Hide number input spinners */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Notifications */
.notifications-container {
    position: fixed;
    bottom: 20px;
    left: 320px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
}

/* Мобильная версия - по середине снизу */
@media (max-width: 768px) {
    .notifications-container {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        max-width: calc(100% - 40px);
        width: auto;
    }
}

.notification {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-success .notification-icon {
    color: var(--accent-green);
}

.notification-error .notification-icon {
    color: #dc3545;
}

.notification-warning .notification-icon {
    color: var(--accent-yellow);
}

.notification-info .notification-icon {
    color: var(--accent-blue);
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--text-primary);
}

/* Wallet */
.wallet-container {
    max-width: 1000px;
    margin: 0 auto;
}

.wallet-container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.wallet-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.wallet-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
}

.wallet-tab:hover {
    color: var(--text-primary);
}

.wallet-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-yellow);
}

.wallet-content {
    position: relative;
}

.wallet-tab-content {
    display: none;
}

.wallet-tab-content.active {
    display: block;
}

.wallet-box {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    padding: 30px;
}

.wallet-box h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.wallet-form {
    width: 100%;
}

.history-table {
    margin-top: 20px;
}

/* Wallet Modal */
.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-modal.active {
    visibility: visible;
    opacity: 1;
}

.wallet-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-modal.active .wallet-modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.wallet-modal-blur {
    display: none;
}

.wallet-modal-content {
    position: relative;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Promo Code Modal - меньший размер */
#promoCodeModal .wallet-modal-content {
    max-width: 400px;
    height: auto;
    max-height: 90vh;
}

#promoCodeModal .wallet-modal-header {
    padding: 15px 20px;
}

#promoCodeModal .wallet-modal-header h2 {
    font-size: 20px;
}

/* Auth Modal - новый дизайн */
.auth-modal-content {
    max-width: 450px;
    width: 90%;
    height: auto;
    max-height: 95vh;
}

.auth-modal-header {
    padding: 20px 25px 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.auth-modal-tabs {
    display: flex;
    gap: 30px;
    flex: 1;
}

.auth-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 0 0 15px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
    position: relative;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-yellow);
}

.auth-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(95vh - 80px);
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

.auth-floating-label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    white-space: nowrap;
}

.auth-input-wrapper.focused .auth-floating-label,
.auth-input-wrapper.has-value .auth-floating-label,
.auth-input-wrapper .auth-input.has-value + .auth-floating-label,
.auth-input-wrapper .auth-input:focus + .auth-floating-label,
.auth-input-wrapper .auth-input:not(:placeholder-shown) + .auth-floating-label {
    top: -8px;
    left: 12px;
    font-size: 16px;
    color: var(--accent-yellow);
    background-color: #10141e;
    padding: 0 6px;
}

/* Убеждаемся что label остается наверху если есть значение - приоритет */
.auth-input-wrapper.has-value .auth-floating-label,
.auth-input-wrapper .auth-input.has-value + .auth-floating-label {
    top: -8px !important;
    left: 12px !important;
    font-size: 16px !important;
    color: var(--accent-yellow) !important;
    background-color: #10141e !important;
    padding: 0 6px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.auth-input-wrapper.focused .auth-input-icon,
.auth-input-wrapper.has-value .auth-input-icon,
.auth-input-wrapper .auth-input.has-value ~ .auth-input-icon {
    color: var(--accent-yellow);
    transform: scale(1.1);
}

.auth-input {
    width: 100%;
    padding: 14px 15px 14px 50px;
    background-color: #10141e;
    border: 1px solid #252a3a;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Onest', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    background-color: #10141e;
    padding-top: 18px;
    padding-bottom: 10px;
    padding-left: 50px;
}

.auth-input.has-value {
    padding-top: 18px;
    padding-bottom: 10px;
    padding-left: 50px;
}

.auth-input.error {
    border-color: #dc3545;
}

.auth-input.error:focus {
    border-color: #dc3545;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-yellow);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
    margin-top: 5px;
}

.auth-submit-btn:hover {
    background: #f5c842;
    transform: translateY(-1px);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent-yellow);
}

.auth-checkbox-label {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
    flex: 1;
}

.auth-link {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #ff8c5a;
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
    color: var(--text-secondary);
    font-size: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 15px;
}

.btn-telegram {
    width: 100%;
    padding: 14px;
    background: #0088cc;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-telegram:hover {
    background: #0077b3;
    transform: translateY(-1px);
}

.btn-telegram:active {
    transform: translateY(0);
}

.auth-captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: #10141e;
    border: 1px solid #252a3a;
    border-radius: 10px;
    flex-wrap: wrap;
}

.auth-captcha-wrapper .auth-checkbox {
    margin-top: 0;
}

.auth-captcha-links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.auth-captcha-logo {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
    letter-spacing: 0.5px;
}

.auth-link-small {
    font-size: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link-small:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.field-error {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: #dc3545;
}

#authModal .recaptcha-container {
    margin: 10px 0;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    overflow: hidden;
    position: relative;
}

#authModal .recaptcha-container > div {
    width: 100% !important;
    max-width: 100%;
    overflow: hidden;
}

#authModal .recaptcha-container iframe {
    width: 100% !important;
    max-width: 100%;
}

#authModal .recaptcha-container .grecaptcha-badge {
    display: none !important;
}

/* Скрываем лишние элементы reCAPTCHA */
#authModal .recaptcha-container > div > div {
    overflow: hidden !important;
}

#authModal .recaptcha-container * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#authModal .wallet-modal-close {
    margin-top: -5px;
}

/* Поле ввода промокода */
.promo-code-input {
    width: 100%;
    padding: 12px 16px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Onest', sans-serif;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.promo-code-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    background-color: #10141e;
}

.promo-code-input::placeholder {
    color: var(--text-secondary);
}

.wallet-modal.active .wallet-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #161b27;
}

.wallet-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.wallet-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 6px;
}

.wallet-modal-close:hover {
    color: var(--text-primary);
    background-color: #10141e;
}

.wallet-modal-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.wallet-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #161b27;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wallet-support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wallet-support-link:hover {
    background-color: #10141e;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    transform: translateY(-1px);
}

.wallet-support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.wallet-support-icon svg {
    width: 18px;
    height: 18px;
    stroke: none;
}

/* Свернутый sidebar - поддержка */
.sidebar.collapsed .sidebar-menu-link {
    padding: 12px;
}

.sidebar.collapsed .sidebar-section:last-child {
    margin-top: auto;
}

.wallet-modal-body .wallet-tabs {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.wallet-modal-body .wallet-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wallet-modal-body .wallet-content::-webkit-scrollbar {
    display: none;
}

.wallet-modal-body .wallet-box {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.wallet-modal-body .wallet-box h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.wallet-modal-body .form-group {
    margin-bottom: 20px;
}

.wallet-modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.wallet-modal-body .btn-block {
    width: 100%;
}

.wallet-modal-body .history-table {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.wallet-modal-body .history-table::-webkit-scrollbar {
    width: 6px;
}

.wallet-modal-body .history-table::-webkit-scrollbar-track {
    background: transparent;
}

.wallet-modal-body .history-table::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.wallet-modal-body .history-table::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* Wallet History Table Styles */
.wallet-modal-body .history-table {
    width: 100%;
}

.wallet-modal-body .history-table .games-table {
    border-spacing: 0;
    border-collapse: collapse;
}

.wallet-modal-body .history-table .games-table thead {
    background-color: rgba(26, 31, 46, 0.5);
    border-bottom: 2px solid var(--border-color);
}

.wallet-modal-body .history-table .games-table th {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border: none;
}

.wallet-modal-body .history-table .games-table th:first-child {
    padding-left: 20px;
}

.wallet-modal-body .history-table .games-table th:last-child {
    padding-right: 20px;
    text-align: right;
}

.wallet-modal-body .wallet-history-row {
    transition: background-color 0.2s ease;
    background-color: transparent;
}

.wallet-modal-body .wallet-history-row:hover {
    background-color: rgba(139, 148, 158, 0.1);
}

.wallet-modal-body .wallet-history-row td {
    padding: 16px 16px;
    font-size: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(22, 27, 39, 0.6);
    vertical-align: middle;
}

.wallet-modal-body .wallet-history-row td:first-child {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.wallet-modal-body .wallet-history-row td:last-child {
    padding-right: 20px;
    text-align: right;
}

.wallet-modal-body .wallet-history-row:last-child td {
    border-bottom: none;
}

.wallet-modal-body .wallet-status-cell {
    position: relative;
    cursor: help;
    font-weight: 500;
}

.wallet-modal-body .wallet-status-cell[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #10141e;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 16px;
    white-space: normal;
    max-width: 250px;
    word-wrap: break-word;
    z-index: 10002;
    border: 1px solid #252b3a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    line-height: 1.4;
}

.wallet-modal-body .wallet-status-cell[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1f2e;
    z-index: 10003;
    pointer-events: none;
}

/* Wallet Amount Input with Currency */
.amount-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.amount-input {
    width: 100%;
    padding: 14px 60px 14px 16px;
    background-color: #10141e;
    border: 2px solid #252b3a;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    font-family: 'Onest', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.amount-input:hover {
    border-color: #2d3443;
    background-color: #10141e;
}

.amount-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    background-color: #10141e;
    box-shadow: 0 0 0 3px var(--accent-yellow-15, rgba(5, 88, 255, 0.15));
}

.amount-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.currency-badge {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.currency-badge svg {
    width: 20px;
    height: 20px;
}

/* Payment Methods Buttons */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.payment-method-btn {
    padding: 14px 20px;
    background-color: #10141e;
    border: 2px solid #252b3a;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    font-family: 'Onest', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-btn:hover {
    border-color: var(--accent-yellow);
    background-color: #10141e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-yellow-10, rgba(5, 88, 255, 0.1));
}

.payment-method-btn.active {
    border-color: var(--accent-yellow);
    background-color: var(--accent-yellow-15, rgba(5, 88, 255, 0.15));
    color: var(--accent-yellow);
}

/* Details Input */
.details-input {
    width: 100%;
    padding: 14px 16px;
    background-color: #10141e;
    border: 2px solid #252b3a;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Onest', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.details-input:hover {
    border-color: #2d3443;
    background-color: #10141e;
}

.details-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    background-color: #10141e;
    box-shadow: 0 0 0 3px var(--accent-yellow-15, rgba(5, 88, 255, 0.15));
}

.details-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Auth Modal Styles */
.auth-input {
    width: 100%;
    padding: 12px 16px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Onest', sans-serif;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    background-color: #10141e;
}

.auth-input::placeholder {
    color: var(--text-secondary);
}

.auth-input.error {
    border-color: #dc3545;
}

.auth-input.error:focus {
    border-color: #dc3545;
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    color: #dc3545;
    line-height: 1.4;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.recaptcha-container > div {
    margin: 0 auto;
}

/* Profile */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.profile-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-avatar {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--accent-yellow);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-letter {
    font-size: 120px;
    font-weight: 700;
    color: var(--bg-primary);
    text-transform: uppercase;
}

.profile-id-box {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

.profile-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    padding: 30px;
}

.profile-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.profile-field-input-group {
    display: flex;
    gap: 10px;
}

.profile-input {
    flex: 1;
    padding: 12px 15px;
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Onest', sans-serif;
    transition: border-color 0.2s;
}

.profile-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.profile-input[readonly] {
    cursor: default;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.profile-stat-box {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--accent-yellow);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-yellow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

/* Иконка валюты */
.stat-value svg,
.currency-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-right: 15px;
    z-index: 102;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    color: var(--accent-yellow);
}

.mobile-menu-btn svg {
    display: block;
    pointer-events: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
    display: block !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
        max-width: calc(100vw - 280px);
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar {
        width: 280px;
        max-width: 80vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        will-change: transform;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
        z-index: 101;
    }
    
    .sidebar-overlay {
        display: block !important;
    }
    
    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .header {
        padding: 12px 15px;
        position: relative;
        z-index: 90;
        justify-content: space-between;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
    }
    
    .header-nav {
        display: none !important;
    }
    
    .header-right {
        gap: 8px;
        flex-shrink: 0;
        margin-left: auto;
        justify-content: flex-end;
        display: flex !important;
    }
    
    .header-user-info {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .content {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .container {
        overflow-x: hidden;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .games-grid.bento-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card.bento-card {
        min-height: 180px;
    }
    
    .game-card:hover .bento-content {
        transform: translateY(-20px);
    }
    
    .games-table {
        font-size: 16px;
    }
    
    .games-table th,
    .games-table td {
        padding: 8px 6px;
    }
    
    .games-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .balance-wallet-container {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
        height: auto;
    }
    
    .balance-section {
        font-size: 18px;
        white-space: nowrap;
        padding: 6px 10px;
        height: auto;
        border-radius: 8px;
        background-color: #10141e;
        border: 1px solid #161b27;
    }
    
    .wallet-button {
        padding: 6px 12px;
        font-size: 18px;
        white-space: nowrap;
        height: auto;
        border-radius: 8px;
    }
    
    .wallet-button span {
        display: inline;
    }
    
    @media (max-width: 360px) {
        .wallet-button span {
            display: none;
        }
        
        .balance-section {
            font-size: 18px;
            padding: 6px 8px;
        }
    }
    
    .profile-avatar-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .profile-avatar-small {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Адаптация профиля */
    .profile-container {
        max-width: 100%;
    }
    
    .profile-container h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-left {
        order: 1;
    }
    
    .profile-right {
        order: 2;
    }
    
    .profile-avatar {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .avatar-letter {
        font-size: 80px;
    }
    
    .profile-field-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-field-input-group .btn {
        width: 100%;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .profile-stat-box {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 24px;
        min-height: 30px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 16px;
    }
    
    .promo-banners {
        gap: 15px;
    }
    
    .promo-banner {
        flex: 0 0 calc(100% - 7.5px);
        min-width: 280px;
        padding: 20px;
    }
    
    .promo-banners-arrow {
        width: 36px;
        height: 36px;
    }
    
    .promo-banners-arrow-left {
        left: -10px;
    }
    
    .promo-banners-arrow-right {
        right: -10px;
    }
    
    .promo-banners-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .promo-banner-title {
        font-size: 18px;
    }
    
    .promo-banner-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .header {
        padding: 10px 12px;
        flex-wrap: nowrap;
    }
    
    .header-left {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
    
    .header-right {
        flex: 1 1 auto;
        justify-content: flex-end;
        margin-left: auto;
    }
    
    .header-user-info {
        gap: 6px;
    }
    
    .content {
        padding: 12px;
    }
    
    .mobile-menu-btn {
        margin-right: 10px;
        padding: 6px;
    }
    
    .balance-wallet-container {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .balance-section {
        font-size: 18px;
    }
    
    .wallet-button {
        padding: 6px 10px;
        font-size: 18px;
    }
    
    .wallet-button span {
        display: inline;
    }
    
    /* Профиль на маленьких экранах */
    .profile-avatar {
        max-width: 150px;
    }
    
    .avatar-letter {
        font-size: 60px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .profile-section {
        padding: 15px;
    }
    
    .profile-section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .games-table {
        font-size: 16px;
    }
    
    .games-table th,
    .games-table td {
        padding: 6px 4px;
    }
    
    .header-nav-link {
        font-size: 16px;
        padding: 6px 10px;
    }
    
    .header-nav-icon {
        width: 16px;
        height: 16px;
    }
    
    .balance-section {
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 16px;
    }
    
    .promo-banner {
        flex: 0 0 calc(100% - 7.5px);
        min-width: 260px;
        padding: 15px;
    }
    
    .promo-banners-arrow {
        width: 32px;
        height: 32px;
        opacity: 0.9;
    }
    
    .promo-banners-arrow-left {
        left: -5px;
    }
    
    .promo-banners-arrow-right {
        right: -5px;
    }
    
    .promo-banners-arrow svg {
        width: 16px;
        height: 16px;
    }
    
    .promo-banner-title {
        font-size: 16px;
    }
    
    .promo-banner-text {
        font-size: 16px;
    }
}

/* Referral System */
.referral-container {
    max-width: 1200px;
    margin: 0 auto;
}

.referral-container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-container h1 svg {
    width: 32px;
    height: 32px;
    color: var(--accent-yellow);
    flex-shrink: 0;
}

.referral-container h1 svg[fill="currentColor"] path {
    fill: var(--accent-yellow) !important;
    stroke: none !important;
}

.referral-section {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.referral-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.referral-info {
    color: var(--text-primary);
}

.referral-link-box {
    width: 100%;
}

.referral-link-box input,
.referral-search-box input {
    font-family: 'Onest', sans-serif !important;
}

.referral-earnings-card {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 120px;
}

.earnings-card-label {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.earnings-card-amount {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    margin-top: auto;
}

.btn-small {
    padding: 8px 16px;
    font-size: 16px;
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.referral-stat-box {
    background-color: #10141e;
    border: 1px solid #161b27;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.referral-stat-box .stat-label {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #10141e;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: help;
    font-weight: 600;
    position: relative;
    transition: background-color 0.2s, color 0.2s;
}

.stat-help:hover {
    background-color: var(--accent-yellow);
    color: var(--bg-primary);
}

.stat-help::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: rgba(20, 24, 36, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    font-weight: normal;
    line-height: 1.5;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    word-wrap: break-word;
}

.stat-help::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--border-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1001;
}

.stat-help:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.stat-help:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    border-top-color: rgba(20, 24, 36, 0.98);
}


.referral-stat-box .stat-value {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    margin-top: auto;
}

.referral-search-box {
    margin-bottom: 20px;
}

.referral-table-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
}

.referral-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.referral-pagination span {
    color: var(--text-primary);
    font-size: 16px;
}


@media (max-width: 768px) {
    .referral-earnings-card {
        min-width: auto;
    }
    
    .referral-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-section {
        padding: 20px;
    }
    
    .referral-container h1 {
        font-size: 24px;
    }
    
    .referral-link-box {
        flex-direction: column;
    }
    
    .referral-link-box input {
        font-size: 16px;
    }
    
    .referral-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .referral-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .referral-section {
        padding: 15px;
    }
    
    .referral-container h1 {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .referral-link-box input {
        font-size: 16px;
        padding: 10px;
    }
    
    .referral-stat-box {
        padding: 15px;
    }
    
    .referral-stat-box .stat-value {
        font-size: 20px;
    }
    
    .earnings-card-amount {
        font-size: 20px;
    }
}
