/* Изображения для проектов */
.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.aidvpn {
    background-image: url('../../img/projects/aidvpn.jpg');
}

.aiaid {
    background-image: url('../../img/projects/aiaid.jpg');
}

.aidping {
    background-image: url('../../img/projects/aidping.png');
}

.idchecker {
    background-image: url('../../img/projects/id_chekcer.png');
}

.vsays {
    background-image: url('../../img/projects/vsays.jpg');
}

.wata {
    background-image: url('../../img/projects/wata.svg');
}

.platega {
    background-image: url('../../img/projects/platega.png');
}
.lava {
    background-image: url('../../img/payment/lava.svg');
}
.antilopa {
    background-image: url('../../img/payment/antilopay.png');
}

.aidpay {
    background-image: url('../../img/projects/aidpay.svg');
}

.d_s {
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.d_s::before {
    content: "";
}

/* Обновленные стили для страницы проектов (старые - не используются) */
/* .projects-list - см. новое определение ниже */

.project-item {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 12px;
    text-decoration: none;
    display: block;
    color: white;
}

.project-item-content {
    display: flex;
    align-items: center;
    padding-bottom: 12px;
}

.project-info {
    flex: 1;
}

.project-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: white;
}

.project-description {
    font-size: 14px;
    color: #8f8f8f;
    margin: 0;
    font-weight: 300;
}

.project-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

/* Стили для страницы проектов и переходов между страницами */
.project-item:hover .project-title {
    color: #40a7e3;
    transition: color 0.2s ease;
}

.project-item:active {
    opacity: 0.7;
}

/* Новые стили для страницы проектов */
.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.filter-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab.active {
    background-color: #40a7e3;
    color: #fff;
}

.filter-tab:active {
    transform: scale(0.95);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding-bottom: 20px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.project-card:active {
    transform: translateY(0) scale(0.98);
}

.project-image {
    height: 140px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon-large {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 22px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.project-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
}

.project-card-desc {
    font-size: 13px;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.4;
    flex: 1;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.project-stats {
    display: flex;
    gap: 12px;
}

.project-users {
    font-size: 12px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-users i {
    font-size: 11px;
}

.project-action {
    color: #40a7e3;
    font-size: 13px;
    font-weight: 500;
}

.project-action span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-action i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.project-card:hover .project-action i {
    transform: translateX(3px);
}

/* Projects Container */
.projects-container {
    width: 100%;
    height: 100%;
    position: relative; /* Для абсолютного позиционирования детей */
    display: flex;
    flex-direction: column;
    overflow-anchor: none; /* Отключаем scroll anchoring */
}

/* Main Block: AI Input + Featured Apps + More Button */
.projects-main-block {
    width: 100%;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%); /* Центрируем по вертикали */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 70px; /* Место для абсолютно позиционированной кнопки */
}

.projects-main-block.move-up {
    top: 0;
    transform: translateY(0); /* Двигаем к верху */
}

/* Блокировка скролла для страницы projects */
#projects.scroll-locked .content-area {
    overflow: hidden;
}

/* AI Input */
.ai-input-container {
    position: relative;
    margin-top: 60px;
    margin-bottom: 90px;
}

.ai-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    background-color: #2B2C2F;
    border: none;
    border-radius: 28px;
    color: #8E8E93;
    font-size: 15px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.ai-input::placeholder {
    color: #8E8E93;
}

.ai-input-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-input-btn:disabled {
    opacity: 1;
    cursor: default;
}

.ai-input-btn svg {
    color: #000;
}

.ai-input-btn:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
}

/* Featured Apps */
.featured-apps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.featured-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.featured-app:active:not(.disabled) {
    transform: scale(0.95);
}

.featured-app.disabled {
    cursor: default;
    opacity: 1;
}

.featured-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.aidvpn-featured {
    background: url('../../img/projects/aidvpn.jpg');
    background-size: cover;
    background-position: center;
}

.aiaid-featured {
    background: url('../../img/projects/aiaid.jpg');
    background-size: cover;
    background-position: center;
}

.aidpay-featured {
    background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pay-icon {
    opacity: 0.6;
}

.coming-soon-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background-color: #3A3A3C;
    color: #8E8E93;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.featured-app-name {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* More Projects Button - абсолютно позиционирована внизу main-block */
.more-projects-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background-color: #1D2025;
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.more-projects-btn:active:not(.hide) {
    background-color: #252932;
    transform: translateX(-50%) scale(0.98);
}

.more-projects-btn svg {
    transition: transform 0.3s ease;
}

.more-projects-btn.hide {
    opacity: 0;
    pointer-events: none;
}

/* Projects List */
.projects-list {
    position: absolute;
    top: 0; /* Устанавливается через JS */
    left: 0;
    width: 100%;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none; /* Отключаем клики когда скрыт */
    transition: opacity 0.4s ease;
}

.projects-list.show {
    opacity: 1;
    pointer-events: auto; /* Включаем клики когда виден */
}

.project-list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #1D2025;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.project-list-item:active {
    background-color: #252932;
    transform: scale(0.98);
}

.project-list-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.project-list-info {
    flex: 1;
}

.project-list-info h3 {
    font-size: 16px;
    margin: 0 0 2px 0;
    font-weight: 500;
    color: #fff;
}

.project-list-info p {
    margin: 0;
    font-size: 13px;
    color: #8E8E93;
}

/* Упрощённые стили для обратной совместимости */
.projects-simple {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 0 15px 0;
}

.project-simple-card {
    display: flex;
    align-items: center;
    padding: 18px;
    background-color: rgba(29, 32, 37, 1);
    border-radius: 22px;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.project-simple-card:active {
    background-color: #1d2025;
    transform: scale(0.98);
}

.project-simple-icon {
    width: 40px;
    height: 40px;
    border-radius: 100% !important;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Для Font Awesome иконок в круглых транзакциях */
.project-simple-icon.d_s::before {
    font-size: 18px;
}

.project-simple-info {
    flex: 1;
}

.project-simple-info h3 {
    font-size: 16px;
    margin: 0 0 3px 0;
    font-weight: 500;
    color: rgba(220, 221, 224, 1);
}

.project-simple-info p {
    margin: 0;
    font-size: 13px;
    color: rgba(220, 221, 224, 1);
}

.project-arrow {
    color: #8f8f8f;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.project-simple-card:active .project-arrow {
    transform: translateX(3px);
    color: #40a7e3;
} 

/* Clean mainpage design */
#projects {
    --projects-side-padding: 0px;
    height: 100%;
    border-radius: 0px;
    padding: 0 var(--projects-side-padding);
    background: transparent;
    box-sizing: border-box;
    transition: filter 0.14s ease;
}

#projects.projects-visual-active {
    background: transparent;
}

#projects .projects-showcase {
    padding: 0;
    padding-bottom: 12px;
    background: transparent;
    position: relative;
}

body.tg-desktop-platform #projects .projects-showcase {
    padding-top: 0px;
}

body.tg-mobile-platform #projects .projects-showcase {
    padding-top: 0px;
}

#projects .projects-gpt-cta {
    margin-top: 0px;
    padding-top: 55px;
    padding-bottom: 35px;
}

#projects .projects-ref-balance .projects-balance-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
    color: rgba(234, 241, 251, 0.9);
}

#projects .projects-ref-balance .projects-balance-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

#projects .projects-gpt-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#projects .projects-greeting {
    font-size: 22px;
    font-weight: 600;
    color: #eef5ff;
    text-align: center;
    padding: 0 16px;
    line-height: 1.3;
}

#projects .projects-gpt-form {
    display: block;
    width: 100%;
}

#projects .projects-gpt-form .ai-input-container {
    margin-top: 0;
    margin-bottom: 0;
}

#projects .projects-gpt-form .ai-input {
    background-color: #00000075;
    backdrop-filter: drop-shadow(2px 4px 6px black);
    border-radius: 28px;
}

#projects .projects-gpt-form .ai-input-btn:disabled {
    opacity: 1;
}

/* Реф: минимально — друзья, поделиться, QR */
#projects .projects-ref-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
    -webkit-tap-highlight-color: transparent;
}

#projects .projects-ref-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 6px 12px;
    transition: background 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    #projects .projects-ref-item:hover {
        background: rgba(255, 255, 255, 0.12);
    }
}

#projects .projects-ref-item:active {
    opacity: 0.7;
}

#projects .projects-ref-friends-count {
    font-size: 15px;
    font-weight: 600;
    color: #40a7e3;
}

#projects .projects-ref-friends-icon {
    font-size: 15px;
    color: rgba(234, 241, 251, 0.8);
}

#projects .projects-ref-sep {
    display: none;
}

#projects .projects-ref-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: rgba(234, 241, 251, 0.75);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    #projects .projects-ref-action:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }
}

#projects .projects-ref-action:active {
    background: rgba(64, 167, 227, 0.15);
    color: #40a7e3;
}

#projects .projects-ref-action i {
    font-size: 13px;
}

#projects .projects-ref-action svg {
    width: 13px;
    height: 13px;
    display: inline-block;
    flex-shrink: 0;
}

/* Services list — app icon grid */
#projects .projects-services {
    margin-top: 0;
    padding-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

#projects .service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    background: none;
    transition: transform 0.12s ease;
    white-space: nowrap;
}

#projects a.service-item:active {
    transform: scale(0.92);
}

@media (hover: hover) and (pointer: fine) {
    #projects a.service-item:hover {
        opacity: 0.85;
    }
}

#projects .service-item--soon {
    opacity: 0.35;
    pointer-events: none;
}

#projects .service-item__icon-wrap {
    width: 62px;
    height: 62px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#projects .service-item__icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 40%
    );
    pointer-events: none;
}

#projects .service-item__icon {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#projects .service-item__icon--vpn {
    background-image: url('../../img/projects/aidvpn.jpg');
}

#projects .service-item__icon--pay {
    background-image: url('../../img/projects/ap2.png');
}

#projects .service-item__icon--ai {
    background-image: url('../../img/projects/aiaid.jpg');
}

#projects .service-item__title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(234, 241, 251, 0.7);
    line-height: 1;
    letter-spacing: 0.2px;
}

#projects .projects-community {
    margin-top: 26px;
}

#projects .projects-community h3 {
    margin: 0 0 9px;
    color: #e8effa;
    font-size: 16px;
    font-weight: 600;
}

#projects .projects-community-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#projects .community-link {
    text-decoration: none;
    color: #eaf1fb;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 11px;
    /* background: rgba(19, 24, 33, 0.48); */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    position: relative;
}

#projects .projects-community-links .community-link:nth-child(-n+2)::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: -5px;
    height: 1px;
    background: #ffffff14;
}

#projects .community-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

#projects .community-link-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

#projects .community-link-icon i {
    font-size: 15px;
}

#projects .community-link-fallback {
    display: none;
}

#projects .community-link--faq .community-link-icon {
    background: rgba(255, 255, 255, 0.06);
}

#projects .community-link--faq .community-link-icon i {
    font-size: 16px;
    color: rgba(234, 241, 251, 0.8);
}


#projects .community-link-copy {
    display: flex;
    flex-direction: column;
}

#projects .community-link-copy strong {
    font-size: 13px;
    line-height: 1.1;
}

#projects .community-link-copy small {
    margin-top: 4px;
    color: rgba(234, 241, 251, 0.72);
    font-size: 11px;
}

@media (max-width: 369px) {
    #projects .projects-ref-sep--before-qr,
    #projects .projects-ref-qr {
        display: none !important;
    }
}
