@charset "utf-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
}

header {
    background: linear-gradient(135deg, #4a69bd 0%, #6a89cc 50%, #4a69bd 100%);
    padding: 16px 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border-radius: 8px;
    object-fit: contain;
}

.logo-title {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.2;
    color: #ffffff;
    display: flex;
    align-items: center;
    height: 50px;
}

.share-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.share-icon::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('../icons/share.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.app-card {
    margin: 0;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.app-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.25);
    overflow: hidden;
    background-color: #ffffff;
    border: 3px solid #f5f5f5;
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info {
    text-align: center;
}

.app-name {
    font-size: 24px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 4px;
}

.app-desc {
    padding: 16px 0;
}

.app-desc p {
    font-size: 14px;
    color: #57606f;
    line-height: 1.7;
    text-align: justify;
}

.app-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #ecf0f1;
    border-bottom: 1px solid #ecf0f1;
}

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

.detail-value {
    font-size: 11px;
    color: #95a5a6;
}

.detail-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.download-btn {
    display: none;
    padding: 16px 48px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 5px;
    color: #ffffff;
    font-size: 17px;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

/* iOS设备显示苹果下载按钮 */
@supports (-webkit-touch-callout: none) {
    .ios-btn {
        display: flex;
    }
}

/* 非iOS设备显示安卓下载按钮 */
@supports not (-webkit-touch-callout: none) {
    .android-btn {
        display: flex;
    }
}

.screenshots-section {
    padding: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background-color: #3498db;
    border-radius: 2px;
}

.screenshots-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.screenshot-item {
    flex: 0 0 250px;
    width: 250px;
    height: 400px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    overflow: hidden;
}

.screenshot-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

.similar-apps-section {
    padding: 16px;
}

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

.more-link {
    font-size: 14px;
    color: #3498db;
    text-decoration: none;
}

.similar-apps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.similar-app-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.app-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.app-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
}

.app-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.app-item-name {
    font-size: 14px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 4px;
}

.app-item-name a {
    color: #2d3436;
    text-decoration: none;
}

.app-item-meta {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 4px;
}

.app-item-desc {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-item-download {
    padding: 6px 16px;
    border: 1px solid #3498db;
    border-radius: 4px;
    color: #3498db;
    font-size: 13px;
    text-decoration: none;
    flex-shrink: 0;
}

.user-reviews-section {
    padding: 16px;
}

.user-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.review-body {
    position: relative;
}

.review-body .review-time {
    position: absolute;
    bottom: 0;
    right: 0;
    margin-top: 8px;
}

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

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

.reviewer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reviewer-avatar::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('../icons/avatar.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: #95a5a6;
}

.reviewer-meta {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3436;
}

.review-time {
    font-size: 11px;
    color: #95a5a6;
}

.review-rating {
    font-size: 0;
    width: 70px;
    height: 14px;
    position: relative;
}

.review-rating::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../icons/star-empty.svg');
    background-size: 14px 14px;
    background-repeat: repeat-x;
}

.review-rating::after {
    content: '';
    position: absolute;
    height: 100%;
    background-image: url('../icons/star.svg');
    background-size: 14px 14px;
    background-repeat: repeat-x;
}

.review-rating[data-rating="1"]::after { width: 20%; }
.review-rating[data-rating="2"]::after { width: 40%; }
.review-rating[data-rating="3"]::after { width: 60%; }
.review-rating[data-rating="4"]::after { width: 80%; }
.review-rating[data-rating="5"]::after { width: 100%; }

.review-content {
    font-size: 13px;
    color: #57606f;
    line-height: 1.6;
}

footer {
    background-color: #2d3436;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 20px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    width: 80%;
    max-width: 320px;
    border-radius: 8px;
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 12px;
    text-align: center;
}

.modal-divider {
    height: 2px;
    background-color: #e74c3c;
    margin-bottom: 16px;
}

.modal-text {
    font-size: 14px;
    color: #57606f;
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: center;
}

.modal-url {
    font-size: 13px;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 20px;
}

.modal-close {
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 480px) {
    .header-content {
        padding: 0;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }

    .search-icon {
        width: 32px;
        height: 32px;
    }

    .app-card {
        margin: 0;
        padding: 16px;
    }

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

    .app-name {
        font-size: 18px;
    }

    .app-details {
        gap: 8px;
    }

    .detail-value {
        font-size: 12px;
    }

    .detail-label {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    header {
        padding: 12px 15px;
    }

    .app-card {
        margin: 0;
        padding: 16px;
    }

    .app-header {
        gap: 12px;
    }

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

    .app-name {
        font-size: 16px;
    }

    .download-btn {
        padding: 12px;
        font-size: 14px;
    }

    .screenshots-section {
        padding: 16px;
    }
}