/* Базовые стили и шрифт Inter */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #0e0e11;
    color: #f4f4f5;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Сайдбар */
.sidebar {
    width: 260px;
    background-color: #141417;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #222228;
    z-index: 100;
    transition: transform 0.3s ease;
    height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
}

.sidebar-top {
    padding: 20px 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    background-color: #1d1d23;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.user-profile:hover {
    background-color: #272730;
}

.avatar-icon {
    width: 32px;
    height: 32px;
    background-color: #2d2d38;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #f472b6;
    font-size: 13px;
}

.auth-text {
    font-weight: 500;
    font-size: 13px;
    color: #f8fafc;
    flex-grow: 1;
}

.arrow-right {
    color: #71717a;
    font-size: 11px;
}

.sidebar-menu {
    flex-grow: 1;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #a1a1aa;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-item:hover {
    color: #ffffff;
    background-color: #1d1d23;
}

.menu-item.active {
    color: #ffffff;
    background-color: #24242b;
    border-left: 3px solid #ec4899;
    font-weight: 600;
}

.menu-item.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.badge-lock {
    color: #71717a;
    font-size: 11px;
}

.menu-icon {
    margin-right: 12px;
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #71717a;
}

.menu-item.active .menu-icon {
    color: #f472b6;
}

.menu-label {
    flex-grow: 1;
}

.menu-divider {
    height: 1px;
    background-color: #222228;
    margin: 12px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #222228;
}

.social-icons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.social-btn {
    width: 34px;
    height: 34px;
    background-color: #1d1d23;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: color 0.2s;
}

.social-btn:hover {
    color: #f472b6;
    background-color: #272730;
}

.support-box {
    display: flex;
    align-items: center;
    background-color: #1d1d23;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.support-box:hover {
    background-color: #272730;
    border-color: rgba(236, 72, 153, 0.3);
}

.support-icon {
    font-size: 14px;
    margin-right: 10px;
    color: #f472b6;
    width: 18px;
    text-align: center;
}

.support-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.support-title {
    font-size: 12px;
    font-weight: 500;
    color: #f8fafc;
}

.support-status {
    font-size: 11px;
    color: #f472b6;
}

.support-arrow {
    font-size: 10px;
    color: #71717a;
    transition: transform 0.2s ease;
}

.support-box:hover .support-arrow {
    color: #f472b6;
    transform: translateX(2px);
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #0e0e11;
    min-width: 0;
}

/* Шапка */
.header {
    height: 64px;
    background-color: #141417;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid #222228;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 26px;
    width: auto;
    object-fit: contain;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #1d1d23;
    padding: 7px 16px;
    border-radius: 10px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
    color: #ffffff;
    background-color: #272730;
    border-color: rgba(236, 72, 153, 0.3);
}

.nav-tab i {
    font-size: 13px;
    color: #f472b6;
}

.disabled-tab {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.header-right {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 7px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-login {
    background-color: #1d1d23;
    color: #ffffff;
    border: 1px solid #2d2d38;
}

.btn-register {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Скролл контента */
.content-scroll {
    flex: 1 0 auto;
    padding: 24px 32px 0 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Секция игр */
.games-section,
.mines-section-container {
    flex: 1 0 auto;
    margin-bottom: 24px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

.game-card {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    border: 1px solid #222228;
    background-color: #141417;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.25);
    border-color: rgba(236, 72, 153, 0.5);
}

.game-poster {
    width: 100%;
    height: 100%;
    position: relative;
}

.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.game-card:hover .game-poster img {
    transform: scale(1.05);
}

.game-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 14, 17, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-hover-overlay {
    opacity: 1;
}

.btn-play {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    transform: translateY(10px);
    transition: transform 0.3s ease, background 0.2s ease;
}

.game-card:hover .btn-play {
    transform: translateY(0);
}

.btn-play:hover {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

/* Футер — всегда отображается и прижат к низу */
.site-footer {
    margin-top: auto;
    padding: 24px 0 20px 0;
    border-top: 1px solid #222228;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #71717a;
    font-size: 12px;
    line-height: 1.5;
    flex-shrink: 0;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.footer-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 45px;
}

.footer-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.footer-legal {
    color: #71717a;
    font-size: 11px;
}

.footer-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 300px;
}

.footer-badge-18 {
    width: 36px;
    height: 36px;
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.footer-responsible {
    color: #a1a1aa;
    font-size: 11px;
}

/* Мобильный оверлей */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Модальные окна --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(14, 14, 17, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 780px;
    background-color: #141417;
    border: 1px solid #222228;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #1d1d23;
    border: 1px solid #2d2d38;
    color: #a1a1aa;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #272730;
    color: #ffffff;
}

.modal-image {
    width: 40%;
    background-size: cover;
    background-position: center;
    min-height: 480px;
}

.modal-content {
    width: 60%;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
}

.form-group input {
    width: 100%;
    background-color: #1d1d23;
    border: 1px solid #2d2d38;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #ec4899;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #ffffff;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 11px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    transition: opacity 0.2s;
}

.btn-primary-gradient:hover {
    opacity: 0.9;
}

.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #71717a;
    font-size: 11px;
    margin: 4px 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #222228;
}

.modal-divider span {
    padding: 0 10px;
}

.btn-telegram {
    background-color: #229ed9;
    color: #ffffff;
    font-weight: 500;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: opacity 0.2s;
}

.btn-telegram:hover {
    opacity: 0.9;
}

.btn-telegram i {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vpn-note {
    font-size: 10px;
    color: #71717a;
    text-align: center;
    margin-top: -6px;
}

.modal-switch-text {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #71717a;
}

.modal-switch-text a {
    color: #f472b6;
    text-decoration: none;
    font-weight: 500;
}

.modal-switch-text a:hover {
    text-decoration: underline;
}

/* --- Адаптивность для мобильных экранов --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        box-shadow: 5px 0 25px rgba(0,0,0,0.5);
    }

    .sidebar.open {
        transform: translateX(260px);
    }

    .mobile-menu-btn {
        display: block;
    }

    .header {
        padding: 0 16px;
    }

    .header-nav {
        display: none;
    }

    .content-scroll {
        padding: 16px 16px 0 16px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .header-right {
        gap: 6px;
    }

    .header-right .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 16px 0;
    }

    .footer-left-group,
    .footer-right-group {
        width: 100%;
        min-width: 100%;
    }

    .modal-container {
        max-width: 92%;
        flex-direction: column;
    }

    .modal-image {
        width: 100%;
        min-height: 160px;
    }

    .modal-content {
        width: 100%;
        padding: 24px;
    }
}