/* cards.css — карточки проекта, профиля, требований, потребления, особенностей, шапка игры */

/* ========== Базовая карточка проекта ========== */

.project-card-link {
    display: block;
    color: inherit;
    transition: transform var(--duration-base) var(--ease-out);
    height: 100%;
    text-decoration: none;
}

.project-card-link:hover {
    transform: translateY(-6px);
}

.project-card {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--glass-border);
    transition:
        border-color 0.3s var(--ease-out),
        transform 0.3s var(--ease-out),
        box-shadow 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    contain: layout style paint;
    position: relative;
}

.project-card-link:hover .project-card {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover), 0 0 30px rgba(61, 158, 179, 0.08);
    transform: translateY(-6px) scale(1.01);
    will-change: transform;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, transparent 40%, var(--accent), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    pointer-events: none;
}
.project-card-link:hover .project-card::after {
    opacity: 0.6;
}

.project-card .image-wrapper {
    margin: -16px -16px 12px -16px;
    width: calc(100% + 32px);
    padding-bottom: 56.25%;
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.project-card .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease-out);
}

.project-card-link:hover .image-wrapper img {
    transform: scale(1.05);
}

.project-card h3 {
    margin: 8px 0 4px;
    font-size: 20px;
    color: var(--text-primary);
}

.project-card p {
    flex-grow: 1;
    margin-bottom: 16px;
}

.project-card .button {
    margin-top: auto;
    align-self: flex-start;
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

/* Квадратная карточка для маленьких проектов */
.project-card.square-card {
    padding: 10px;
}
.project-card.square-card .image-wrapper {
    margin: -10px -10px 8px -10px;
    width: calc(100% + 20px);
    padding-bottom: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.project-card.square-card .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-card.square-card h3 {
    margin: 4px 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-card.square-card p {
    display: none;
}

/* ========== Карточки профилей ========== */

.profile-card-link {
    flex: 1 1 150px;
    color: inherit;
    transition: transform var(--duration-base) var(--ease-out);
    text-decoration: none;
}
.profile-card-link:hover {
    transform: translateY(-3px);
}
.profile-card {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out);
}
.profile-card-link:hover .profile-card {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(61, 158, 179, 0.05);
}

.avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(61, 158, 179, 0.2);
}
.avatar-wrapper.large {
    width: 100px;
    height: 100px;
}
.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s var(--ease-out);
}
.profile-card-link:hover .avatar {
    transform: scale(1.04);
}
.profile-name {
    color: var(--text-primary);
}

/* ========== Карточка разработчика ========== */

.trailer-card .video-embed {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.developer-card {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}
.developer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}
.developer-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.developer-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Обновления ========== */

.update-card {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}
.update-card h3 {
    margin: 0 0 15px;
    color: var(--accent);
    font-size: 22px;
}

/* ========== Требования ========== */

.req-item {
    flex: 1 1 200px;
    background: var(--glass-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition:
        transform var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}
.req-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover), 0 0 20px rgba(61, 158, 179, 0.05);
}
.req-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: translateX(-100%);
    animation: shimmerSlide 3s infinite linear;
    will-change: transform;
}

.req-label {
    display: flex;
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 16px;
    align-items: center;
    gap: 8px;
}
.req-label i {
    font-size: 20px;
    text-shadow: 0 0 10px rgba(61, 158, 179, 0.4);
}

/* ========== Потребление ========== */

.consumption-card {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--glass-border);
    transition:
        transform var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out);
}
.consumption-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.consumption-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.consumption-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
}
.consumption-table td:first-child {
    color: var(--text-primary);
    width: 40%;
    font-weight: bold;
}
.consumption-table tr:last-child td {
    border-bottom: none;
}

/* ========== Шапка игры ========== */

.game-header {
    background-size: cover;
    background-position: center;
    padding: 0;
    transition: background-position 0.1s ease-out;
    border: 1px solid rgba(61, 158, 179, 0.2);
    position: relative;
    overflow: hidden;
}
.game-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(61, 158, 179, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 1;
}
.header-overlay {
    padding: 60px 28px;
    text-align: center;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
}
.header-content {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.game-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.game-icon {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    transition: transform var(--duration-base) var(--ease-out);
    filter: drop-shadow(0 0 8px rgba(61, 158, 179, 0.4));
}
.game-icon:hover {
    transform: scale(1.08) rotate(-4deg);
}
.header-text .game-title {
    margin-bottom: 0;
    color: #fff;
    text-shadow: 0 0 20px rgba(61, 158, 179, 0.5);
    letter-spacing: 2px;
    font-size: 48px;
}
.version-badge {
    background: var(--accent);
    color: white;
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    box-shadow: var(--neon-glow);
    letter-spacing: 0.5px;
}
.version-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons.small .social-icon {
    font-size: 20px;
}
.social-icon {
    color: white;
    font-size: 24px;
    transition: opacity var(--duration-base) var(--ease-out),
                transform 0.2s var(--ease-out);
}
.social-icon:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* ========== Особенности ========== */

.feature-item {
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition:
        transform 0.3s var(--ease-out),
        box-shadow 0.3s var(--ease-out),
        border-color 0.2s var(--ease-out);
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.feature-item .feature-banner {
    width: calc(100% + 40px);
    margin: -20px -20px 12px -20px;
    height: 140px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--bg-primary);
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.feature-item .feature-banner.loaded {
    opacity: 1;
}
.feature-item .feature-banner video,
.feature-item .feature-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feature-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}
.features-extra {
    margin-top: 30px;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}
.features-extra h3 {
    margin: 0 0 15px;
    color: var(--accent);
}
.features-list {
    list-style: none;
    padding-left: 0;
}
.features-list li {
    padding: 4px 0 4px 20px;
    position: relative;
}
.features-list li::before {
    content: "•";
    color: var(--accent);
    font-size: 18px;
    position: absolute;
    left: 0;
    top: -1px;
}

/* ========== Кнопка избранного в новостях ========== */

.news-bookmark-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    z-index: 5;
    transition:
        background 0.2s var(--ease-out),
        color 0.2s var(--ease-out),
        transform 0.2s var(--ease-out);
}
.news-bookmark-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}
.news-bookmark-btn.bookmarked {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}
.news-bookmark-btn.bookmarked i {
    font-weight: 900;
}

/* ========== Tilt-карточки (только desktop) ========== */

.tilt-card {
    transition:
        transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.2s var(--ease-out);
}