/* --- Сброс и базовые настройки --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0f0f11;
    color: #f5f5f7;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 60px;
    background-image: radial-gradient(circle at 50% 0%, rgba(230, 57, 70, 0.08) 0%, transparent 50%);
}

/* --- Контейнер --- */
.container {
    padding: 24px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- Шапка (Лого + Название) --- */
.hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.app-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    object-fit: cover;
    background: #1c1c1e;    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.app-developer {
    font-size: 15px;
    color: #a1a1aa;
    font-weight: 500;
}

/* --- Кнопка скачивания --- */
.download-btn {
    width: 100%;
    background-color: #e63946;
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 18px 0;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.25);
}

.download-btn:active {
    transform: scale(0.98);
    background-color: #d62839;
}

.download-btn.processing {
    background-color: #2c2c2e;
    color: #a1a1aa;
    box-shadow: none;
    cursor: default;}

/* --- Галерея скриншотов --- */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.screenshots-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    margin: 0 -24px 40px -24px;
    padding-left: 24px;
    padding-right: 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.screenshots-wrapper::-webkit-scrollbar { 
    display: none; 
}

.screenshot {
    flex: 0 0 auto;
    width: 180px;
    height: 320px;
    border-radius: 16px;
    object-fit: cover;
    scroll-snap-align: center;
    cursor: pointer;
    background: #1c1c1e;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.screenshot:active {
    transform: scale(0.96);
}

/* --- Описание и Мета-данные (внизу) --- */
.details-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.description-text {    font-size: 15px;
    line-height: 1.6;
    color: #d1d1d6;
    margin-bottom: 32px;
}

/* Сетка для технических данных */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-item {
    background: #1c1c1e;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 12px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-value {
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}

/* --- Lightbox (Просмотр фото) --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 1000;    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.close-btn:active { 
    background: rgba(255, 255, 255, 0.2); 
}

.close-btn svg { 
    width: 24px; 
    height: 24px; 
    fill: #ffffff; 
}