.game-detail {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-top-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.detail-poster-main img,
.detail-poster-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
}

.detail-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.detail-summary {
    min-width: 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 13px;
}

.meta-tag.primary {
    background: rgba(0, 208, 132, 0.12);
    color: var(--accent-strong);
}

.detail-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-actions-bar--top {
    margin: 0 0 22px;
}

.detail-votes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: -6px 0 18px;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.vote-btn .ui-icon {
    width: 17px;
    height: 17px;
    color: var(--accent-strong);
}

.vote-btn strong {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-size: 12px;
    min-width: 28px;
    text-align: center;
}

.vote-btn--muted {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

.vote-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(18, 245, 157, 0.24);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
}

.vote-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.vote-btn--active {
    box-shadow: 0 14px 26px rgba(0, 208, 132, 0.16);
    border-color: rgba(18, 245, 157, 0.32);
    background: rgba(0, 208, 132, 0.1);
}

.vote-btn--active .ui-icon {
    transform: scale(1.06);
}

.detail-votes-meta {
    color: var(--muted);
    font-size: 13px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #04130d;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn-primary--ghost {
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.18), rgba(18, 245, 157, 0.12));
    color: var(--text);
    border: 1px solid rgba(18, 245, 157, 0.24);
    box-shadow: 0 10px 24px rgba(0, 208, 132, 0.12);
}

.btn-primary--hero {
    min-height: 58px;
    padding: 0 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.28), rgba(18, 245, 157, 0.18));
    color: #f4fffb;
    border: 1px solid rgba(18, 245, 157, 0.28);
    box-shadow: 0 18px 34px rgba(0, 208, 132, 0.2);
}

.btn-primary--hero .ui-icon {
    width: 19px;
    height: 19px;
    color: var(--accent-strong);
}

.btn-primary--hero:hover {
    box-shadow: 0 22px 40px rgba(0, 208, 132, 0.28);
}

.btn-primary--torrent {
    min-height: 74px;
    padding: 14px 18px;
    justify-content: flex-start;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 18px 30px rgba(0, 208, 132, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, #13c975, #2fe39a);
    color: #03160e;
    flex: 1 1 340px;
    animation: torrentPulse 2.2s ease-in-out infinite;
}

.btn-primary--torrent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    background: rgba(3, 22, 14, 0.12);
}

.btn-primary--torrent-icon .ui-icon {
    width: 20px;
    height: 20px;
    color: #03160e;
}

.btn-primary--torrent-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    align-items: flex-start;
    text-align: left;
    flex: 1 1 auto;
}

.btn-primary--torrent-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
}

.btn-primary--torrent-subtitle {
    color: rgba(3, 22, 14, 0.7);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.btn-primary--torrent:hover {
    box-shadow: 0 22px 36px rgba(0, 208, 132, 0.3);
}

@keyframes torrentPulse {
    0% {
        box-shadow: 0 18px 30px rgba(0, 208, 132, 0.22);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 22px 42px rgba(0, 208, 132, 0.36), 0 0 0 8px rgba(47, 227, 154, 0.08);
        transform: translateY(-1px);
    }
    100% {
        box-shadow: 0 18px 30px rgba(0, 208, 132, 0.22);
        transform: translateY(0);
    }
}

.btn-size {
    margin-left: auto;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(3, 22, 14, 0.12);
    color: #03160e;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    border-left: 0;
}

.detail-section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title .ui-icon {
    color: var(--accent-strong);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.info-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.info-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-value {
    font-weight: 600;
}

.detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-description {
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
}

.detail-description p {
    margin: 0 0 16px;
}

.detail-description ul {
    margin: 0;
    padding-left: 18px;
}

.detail-description li {
    margin-bottom: 8px;
}

.sysreq-list {
    display: grid;
    gap: 10px;
}

.sysreq-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.sysreq-item span:first-child {
    color: var(--muted);
}

.sysreq-item span:last-child {
    text-align: right;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.screenshot-item {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
}

.video-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding-bottom: 56.25%;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.detail-download-section {
    scroll-margin-top: 112px;
    text-align: center;
    background:
        radial-gradient(circle at top center, rgba(0, 208, 132, 0.16), transparent 52%),
        linear-gradient(180deg, rgba(29, 38, 48, 0.95), rgba(23, 29, 36, 0.95));
}

.detail-download-section .detail-section-title {
    text-align: left;
}

.content-toggle {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.content-toggle-preview {
    position: relative;
    padding: 18px 18px 4px;
}

.content-toggle-preview::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 48px;
    background: linear-gradient(180deg, rgba(23, 29, 36, 0), rgba(23, 29, 36, 1));
    pointer-events: none;
}

.content-toggle-summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-toggle-summary::-webkit-details-marker {
    display: none;
}

.content-toggle-summary::after {
    content: 'Развернуть';
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.content-toggle[open] .content-toggle-summary::after {
    content: 'Свернуть';
}

.content-toggle-body {
    display: none;
    padding: 0 18px 18px;
}

.content-toggle[open] .content-toggle-body {
    display: block;
}

@media (max-width: 900px) {
    .detail-top-row {
        grid-template-columns: 1fr;
    }

    .detail-poster-main {
        max-width: 320px;
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .info-grid,
    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .detail-actions-bar {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .btn-primary--torrent {
        min-height: 0;
        align-items: flex-start;
    }

    .btn-size {
        margin-top: 10px;
        margin-left: 0;
    }
}
