/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #202124;
    line-height: 1.4;
    font-size: 14px;
}

/* Wrapper for desktop layout */
.header, .app-header, .install-section, .section, .footer-links {
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 20px;
}

.search-btn, .menu-btn {
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
}

/* App Header */
.app-header {
    background: white;
    padding: 24px 16px;
    margin-bottom: 8px;
}

.app-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 0 8px;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.icon-content {
    text-align: center;
    color: #202124;
}

.app-icon-img {
    width: 100%;
    height: auto;
    display: block;
}

.cards {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
    justify-content: center;
}

.card {
    width: 14px;
    height: 18px;
    background: white;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.card1 { color: #000; }
.card2 { color: #e53e3e; }
.card3 { color: #e53e3e; }

.app-name-small {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.app-details {
    flex: 1;
    min-width: 0;
}

.app-details h1 {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 4px;
}

.developer {
    color: #01875f;
    font-size: 14px;
    margin-bottom: 16px;
    cursor: pointer;
}

.stats {
    display: flex;
    align-items: center;
    gap: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    position: relative;
}

.rating-group {
    display: flex;
    flex-direction: column;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background-color: #dadce0;
}

.stat-value {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    order: 1;
}

.stat-label {
    font-size: 12px;
    color: #5f6368;
    order: 2;
}

.age-rating {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    order: 1;
}

/* Install Section */
.install-section {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.install-img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.install-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 100px;
    transition: background-color 0.2s;
}

.install-btn:hover {
    background: #1557b0;
}

/* Sections */
.section {
    background: white;
    padding: 20px 16px;
    margin-bottom: 8px;
}

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

.section-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}

.section-header i {
    color: #5f6368;
    font-size: 16px;
}

.about-text {
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tag {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    border: 1px solid #dadce0;
}

/* Data Safety */
.safety-text {
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 13px;
}

.safety-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.safety-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.safety-item i {
    color: #5f6368;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.safety-content {
    flex: 1;
}

.safety-title {
    font-size: 14px;
    color: #202124;
    font-weight: 400;
    margin-bottom: 4px;
}

.safety-subtitle {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}

/* Ratings and Reviews */
.reviews-subtitle {
    color: #5f6368;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Ratings Section */
.rating-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 20px 0;
}

.rating-left {
    flex: 0 0 auto;
}

.rating-right {
    flex: 1;
    max-width: 400px;
}

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

.big-rating {
    font-size: 48px;
    font-weight: 500;
    color: #202124;
    line-height: 1.2;
}

.stars {
    color: #ffd700;
    font-size: 18px;
    margin: 8px 0;
}

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

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.bar-label {
    min-width: 24px;
    text-align: right;
    color: #5f6368;
    font-size: 14px;
}

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

.bar-fill {
    height: 100%;
    background: #01875f;
    border-radius: 4px;
}

/* User Reviews */
.user-reviews {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review {
    border-bottom: 1px solid #e8eaed;
    padding-bottom: 20px;
}

.review:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.reviewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-size: 14px;
    color: #202124;
    font-weight: 400;
    margin-bottom: 2px;
}

.review-stars {
    color: #fbbc04;
    font-size: 12px;
    margin-bottom: 2px;
}

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

.review-text {
    color: #5f6368;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

/* Footer Links */
.footer-links {
    background: white;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #5f6368;
    cursor: pointer;
}

.footer-link i {
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
}

.footer-link span {
    font-size: 14px;
}

.email {
    color: #1a73e8;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-header {
        padding: 16px 12px;
    }
    
    .section {
        padding: 16px 12px;
    }
    
    .stats {
        width: 100%;
    }
    
    .stat-item {
        padding: 0 12px;
    }
    
    .stat-divider {
        height: 24px;
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 24px;
    }
    
    .rating-right {
        width: 100%;
        max-width: none;
    }
    
    .rating-score {
        margin-bottom: 16px;
    }

    .big-rating {
        font-size: 42px;
    }

    .rating-bars {
        flex-grow: 1;
        width: auto;
    }

    .bar-container {
        max-width: none;
    }

    .rating-bar {
        height: 18px;
    }

    .review {
        padding: 16px 0;
    }

    .review-actions {
        flex-wrap: wrap;
    }

    .helpful-btn {
        padding: 4px 12px;
        font-size: 12px;
    }

    .app-info {
        padding: 0;
    }

    .app-details h1 {
        font-size: 24px;
    }
}

/* Hover Effects */
.developer:hover,
.footer-link:hover {
    text-decoration: underline;
}

.back-btn:hover,
.search-btn:hover,
.menu-btn:hover {
    opacity: 0.7;
}

/* Carousel Styles */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
}

.carousel::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    border-radius: 12px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: white;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background: white;
}

/* Desktop Styles */
@media (min-width: 1024px) {
    /* Limit content width */
    .header, .app-header, .install-section, .section, .footer-links {
        max-width: 1200px;
        padding-left: 32px;
        padding-right: 32px;
    }

    /* App header improvements */
    .app-info {
        gap: 32px;
        padding: 24px 0;
    }

    .app-icon {
        width: 160px;
        height: 160px;
    }

    .app-details h1 {
        font-size: 36px;
    }

    .stats {
        margin-top: 24px;
    }

    /* Carousel improvements */
    .carousel {
        max-width: 1000px;
        margin: 0 auto;
        height: 500px;
    }

    .carousel-slide img {
        max-height: 500px;
        object-fit: contain;
    }

    /* Rating section improvements */
    .rating-overview {
        display: flex;
        gap: 48px;
        align-items: center;
        padding: 32px;
        background: #f8f9fa;
        border-radius: 8px;
        margin: 24px 0;
    }

    .rating-left {
        flex: 0 0 200px;
    }

    .rating-right {
        flex: 1;
        max-width: 600px;
    }

    .big-rating {
        font-size: 48px;
    }

    /* Reviews section improvements */
    .user-reviews {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
        margin-top: 32px;
    }

    .review {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 24px;
    }

    /* Footer improvements */
    .footer-links {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 32px;
        padding: 48px 32px;
    }

    .footer-link {
        text-align: center;
        padding: 24px;
        background: white;
        border-radius: 8px;
        transition: transform 0.2s;
    }

    .footer-link:hover {
        transform: translateY(-4px);
    }

    /* Install section improvements */
    .install-section {
        padding: 32px;
    }

    .install-img {
        max-width: 300px;
    }
}