:root {
    --bg: #161616;
    --card-bg: #303030;
    --text-primary: #ffffff;
    --text-secondary: #a6b3c2;
    --border: #1b1b1b;
    --chip-bg: #538beb;
    --chip-text: #101824;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    padding: 20px 10px;
}

.container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

/* --- Шапка --- */
.header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.header-info {
    flex: 1;
    min-width: 200px;
}

.header-info h1 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
}

.developer {
    color: var(--accent);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.stars {
    color: var(--star-color);
    letter-spacing: 2px;
    font-size: 18px;
}

.rating-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.badge {
    background-color: #e6f4ea;
    color: #137333;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.install-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(1,135,95,0.3);
}

.install-btn:hover {
    background-color: var(--accent-hover);
}

/* --- Скриншоты --- */
/* --- Скриншоты --- */
.screenshots-section {
    position: relative;
}

.screenshots {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: pointer;
}

.screenshot {
    width: 220px;
    height: 140px;
    border-radius: 12px;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    border: 1px solid #ccc;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: zoom-in;
}

.screenshot:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.shot-1 { background: linear-gradient(45deg, #ff6b6b, #feca57); }
.shot-2 { background: linear-gradient(45deg, #48dbfb, #0abde3); }
.shot-3 { background: linear-gradient(45deg, #1dd1a1, #10ac84); }
.shot-4 { background: linear-gradient(45deg, #5f27cd, #341f97); }
.shot-5 { background: linear-gradient(45deg, #ff9ff3, #f368e0); }

.screenshot span {
    background: rgba(0,0,0,0.4);
    padding: 6px 12px;
    border-radius: 20px;
}

/* --- Модальное окно для скриншотов --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1001;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1001;
}

.modal-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 1001;
    text-align: center;
    max-width: 80%;
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* --- Адаптивность для мобильных --- */
@media (max-width: 600px) {
    .screenshot { 
        width: 160px; 
        height: 100px; 
    }
    .modal-nav.prev { 
        left: 10px; 
    }
    .modal-nav.next { 
        right: 10px; 
    }
}
/* --- Описание --- */
.description h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.description p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 12px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.chip {
    background-color: var(--chip-bg);
    color: var(--chip-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* --- Ченджлог --- */
.changelog h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.version {
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 20px;
    position: relative;
}

.version::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 11px;
    height: 11px;
    background: var(--accent);
    border-radius: 50%;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.version-name {
    font-weight: 600;
    font-size: 16px;
}

.version-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.version ul {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Таблица характеристик --- */
.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.info-table td:first-child {
    color: var(--text-secondary);
    width: 35%;
}

.info-table td:last-child {
    font-weight: 500;
}

/* --- Ссылки --- */
.links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    color: #101824;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f3f4;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    color: #101824;
    font-weight: 500;
    transition: background 0.2s;
}

.link-btn:hover {
    background: #e8eaed;
}

/* --- Footer --- */
.footer-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .card { padding: 16px; }
    .header { gap: 12px; }
    .game-icon { width: 72px; height: 72px; font-size: 36px; }
    .header-info h1 { font-size: 22px; }
    .install-btn { width: 100%; }
    .screenshot { width: 160px; height: 100px; }
}