/* Основные стили для Russian PWA */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

body {
    background: #f8f9fa;
    color: #3c4043;
    line-height: 1.5;
    min-height: 100vh;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Хедер */
.app-header {
    padding: 20px;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: white;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.app-icon-title {
    display: flex;
    gap: 16px;
    flex: 1;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.title-section h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.developer {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.ratings {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-value {
    font-size: 18px;
    font-weight: 700;
}

.rating-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Кнопка установки */
.install-section {
    display: flex;
    align-items: center;
}

.install-btn {
    background: #34a853;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.install-btn:hover {
    background: #2d9248;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,168,83,0.3);
}

.install-loader {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    width: 0%;
    transition: width 0.3s ease;
}

/* Уведомление об устройствах */
.device-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 14px;
}

.device-notice .material-icons {
    font-size: 20px;
}

/* Секции */
section {
    padding: 20px;
    border-bottom: 1px solid #e8eaed;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a73e8;
}

.more-btn {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Скриншоты */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.screenshot-grid img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.screenshot-grid img:hover {
    transform: scale(1.02);
}

/* Теги */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Безопасность данных */
.safety-items {
    margin: 20px 0;
}

.safety-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.safety-item img {
    width: 24px;
    height: 24px;
}

.safety-item strong {
    display: block;
    margin-bottom: 4px;
    color: #3c4043;
}

.safety-item small {
    color: #5f6368;
    font-size: 12px;
}

.details-btn {
    background: #f1f3f4;
    border: 1px solid #dadce0;
    color: #3c4043;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

/* Отзывы */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.device-filter {
    margin: 16px 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.filter-btn.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.rating-summary {
    display: flex;
    gap: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: #1a73e8;
    line-height: 1;
}

.stars {
    color: #fbbc04;
    font-size: 20px;
    margin: 8px 0;
}

.review-count {
    color: #5f6368;
    font-size: 14px;
}

.rating-bars {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rating-bar span {
    width: 40px;
    font-size: 14px;
    color: #5f6368;
}

.bar {
    flex: 1;
    height: 8px;
    background: #e8eaed;
    border-radius: 4px;
    overflow: hidden;
}

.bar .fill {
    height: 100%;
    background: #fbbc04;
}

/* Карточки отзывов */
.review {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.reviewer span {
    font-weight: 600;
    color: #3c4043;
}

.review-actions .action-btn {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-date {
    color: #5f6368;
    font-size: 13px;
}

.review-text {
    line-height: 1.5;
    margin-bottom: 16px;
}

.review-helpful {
    border-top: 1px solid #e8eaed;
    padding-top: 12px;
}

.helpful-count {
    color: #5f6368;
    font-size: 13px;
    margin-bottom: 8px;
}

.helpful-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.helpful-buttons {
    display: flex;
    gap: 8px;
}

.helpful-btn {
    background: #f1f3f4;
    border: 1px solid #dadce0;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Ответ разработчика */
.developer-response {
    background: #e8f0fe;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    border-left: 3px solid #1a73e8;
}

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

.developer-name {
    font-weight: 600;
    color: #1a73e8;
}

.response-date {
    color: #5f6368;
    font-size: 12px;
}

.response-text {
    color: #3c4043;
    line-height: 1.4;
}

/* Похожие игры */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.game-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.game-card img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-bottom: 8px;
}

.game-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-developer {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
    display: block;
}

.game-rating {
    color: #fbbc04;
    font-size: 13px;
    font-weight: 600;
}

/* Кнопка просмотра всех */
.see-all-reviews {
    display: block;
    width: 100%;
    background: #1a73e8;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.see-all-reviews:hover {
    background: #0d62d9;
}

/* Футер */
.app-footer {
    padding: 20px;
    text-align: center;
}

.flag-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #dadce0;
    color: #5f6368;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flag-btn:hover {
    background: #f8f9fa;
    border-color: #5f6368;
}

/* Попапы */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.popup-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: popupIn 0.3s ease;
}

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

.popup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #e8eaed;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.popup-header img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.popup-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.popup-header span {
    color: #5f6368;
    font-size: 14px;
}

.close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #f1f3f4;
}

.popup-body {
    padding: 20px;
}

.popup-details {
    margin-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item span:first-child {
    color: #5f6368;
}

.detail-item span:last-child {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: #1a73e8;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.share-btn:hover {
    background: #0d62d9;
}

/* Адаптивность */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
    }
    
    .install-section {
        width: 100%;
        margin-top: 16px;
    }
    
    .install-btn {
        width: 100%;
    }
    
    .rating-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .helpful-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .popup-content {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
    }
}

/* Материал иконки */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}
