:root {
    --primary-text: #1d1d1f;
    --secondary-text: #86868b;
    --link-blue: #0071e3;
    --bg-color: #ffffff;
    --separator-color: #e5e5ea;
    --btn-bg: #0071e3;
    --btn-text: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    color: var(--primary-text);
    background-color: var(--bg-color);
    line-height: 1.4;
}

/* Global Nav (Mock) */
.global-nav {
    background: #333;
    /* Dark header for Apple */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.apple-logo {
    color: white;
    font-size: 20px;
}

.page-container {
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Main Content Wrapper for PC Centering */
.main-content {
    padding: 0 20px;
}

/* === App Header === */
.app-header {
    display: flex;
    margin-top: 20px;
    gap: 20px;
    margin-bottom: 20px;
}

.app-icon {
    width: 118px;
    height: 118px;
    /* geometric background fallback */
    background: #f0f0f0;
    border-radius: 26px;
    /* Squircle approximation */
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Ensure image clips */
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-subtitle {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 12px;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.get-button {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 20px;
    padding: 6px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.get-button:active {
    opacity: 0.7;
}

/* === New Centered Header Styles === */
.app-header.centered-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.centered-layout .app-info {
    align-items: center;
}

.centered-layout .app-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    justify-content: center;
}

.centered-layout .app-subtitle {
    font-size: 16px;
    color: var(--secondary-text);
    margin-bottom: 16px;
}

.category-pill {
    background-color: #fff1f5;
    /* Light pinkish bg */
    color: #ff2d55;
    /* Pink user color */
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
}

.header-stats-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.stat-block {
    display: flex;
    flex-direction: column-reverse;
    /* Label bottom, Value top */
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-text);
}

.stat-label {
    font-size: 12px;
    color: var(--secondary-text);
}

.stat-divider {
    width: 1px;
    height: 20px;
    background-color: var(--separator-color);
}

.header-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--secondary-text);
    max-width: 600px;
    margin: 0 auto 24px auto;
}

/* Update Actions for Centered */
.centered-layout .app-actions {
    justify-content: center;
}

.get-button {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 20px;
    padding: 8px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-button {
    background: none;
    border: none;
    color: var(--link-blue);
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
}

/* === Download Page Styles === */
.download-section {
    width: 100%;
    max-width: 500px;
    /* Constrain width for mobile look on desktop too for this list */
    margin: 0 auto;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-card {
    display: flex;
    align-items: center;
    background-color: #f5f5f7;
    padding: 16px 20px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--primary-text);
    transition: background-color 0.2s;
}

.download-card:hover {
    background-color: #e8e8ed;
}

.icon-wrapper {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    margin-right: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.card-desc {
    font-size: 13px;
    color: var(--secondary-text);
}

.action-arrow {
    font-size: 18px;
    color: #c7c7cc;
    font-weight: 600;
}

.qr-preview {
    font-size: 24px;
}



/* === Stats Scroll === */
.stats-scroll {
    display: flex;
    overflow-x: auto;
    padding: 12px 0;
    border-top: 1px solid var(--separator-color);
    border-bottom: 1px solid var(--separator-color);
    margin-bottom: 20px;
    scrollbar-width: none;
    /* Firefox */
}

.stats-scroll::-webkit-scrollbar {
    display: none;
}

.stat-item {
    flex: 0 0 auto;
    padding: 0 24px;
    text-align: center;
    border-right: 1px solid var(--separator-color);
    min-width: 80px;
}

.stat-item:last-child {
    border-right: none;
}

.stat-top {
    font-size: 12px;
    color: var(--secondary-text);
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
}

.stat-bottom {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-text);
}

.stat-bottom.big-icon {
    font-size: 20px;
}

/* === Sections === */
.section {
    padding: 20px 0;
    border-bottom: 1px solid var(--separator-color);
}

.description-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--primary-text);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.description-text.collapsed {
    max-height: 4.5em;
    /* Show approx 3 lines */
    position: relative;
    /* Fade out effect implementation requires more complex CSS or just simple cut-off */
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
    mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.description-text.expanded {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.feature-tag {
    display: inline-block;
    background-color: #f5f5f7;
    color: #1d1d1f;
    padding: 6px 14px;
    /* Larger touch target */
    border-radius: 15px;
    /* Pill shape */
    margin: 6px 8px 6px 0;
    font-size: 13px;
    font-weight: 500;
}


.section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.link {
    font-size: 16px;
    color: var(--link-blue);
    text-decoration: none;
}

.version-info {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}



.more-btn {
    background: none;
    border: none;
    color: var(--link-blue);
    font-size: 15px;
    float: right;
    margin-top: -1.5em;
    /* Hacky inline look */
    background: white;
    padding-left: 4px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* === Screenshots === */
.screenshot-scroller {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 20px;
    scrollbar-width: none;
}

.screenshot-scroller::-webkit-scrollbar {
    display: none;
}

.screenshot {
    flex: 0 0 auto;
    background-color: #f2f2f2;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.screenshot.portrait {
    width: 240px;
    height: 480px;
    /* approx iPhone aspect ratio */
    background: #e0e0e0;
}

/* === Information List === */
.info-list {
    font-size: 14px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--separator-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: var(--secondary-text);
}

.info-item .value {
    color: var(--primary-text);
    text-align: right;
    max-width: 60%;
}

/* === Service List === */
.service-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background-color: #f5f5f7;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-text);
    transition: background-color 0.2s;
    text-align: center;
}

/* Remove old borders */
.service-item:last-child {
    border-bottom: none;
}

.service-item:active {
    opacity: 0.6;
}

.service-icon {
    font-size: 28px;
    margin-right: 0;
    margin-bottom: 8px;
    width: auto;
    text-align: center;
}

.service-name {
    flex: none;
    font-size: 15px;
    font-weight: 600;
}

.service-arrow {
    display: none;
}

.footer {
    padding: 24px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--secondary-text);
    background-color: transparent;
    /* Remove heavy gray bg */
    border-top: 1px solid var(--separator-color);
    /* Subtle separation */
    margin-top: 40px;
    max-width: 980px;
    /* Align with PC content width */
    margin-left: auto;
    margin-right: auto;
}

.footer p {
    margin: 4px 0;
    line-height: 1.6;
}

.icp-info a {
    color: var(--secondary-text);
    text-decoration: none;
}

.icp-info a:hover {
    text-decoration: underline;
}

/* === Desktop / PC Styles === */
@media (min-width: 768px) {


    .main-content {
        max-width: 980px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 40px;
        padding-top: 40px;
    }

    /* Move Header to Left Column for PC layout aesthetics (optional, but requested PC style) 
       Actually, standard App Store Web uses a different layout. 
       Let's keep it simpler but wider.
    */

    .app-header {
        grid-column: 1 / -1;
        border-bottom: 1px solid var(--separator-color);
        padding-bottom: 40px;
        margin-bottom: 0;
    }

    .app-icon {
        width: 180px;
        height: 180px;
        border-radius: 40px;
    }

    .app-title {
        font-size: 36px;
    }

    .app-subtitle {
        font-size: 20px;
    }

    .stats-scroll {
        grid-column: 1 / -1;
        justify-content: flex-start;
        /* Or center */
        border-top: none;
        padding: 0;
        margin-bottom: 40px;
    }

    .stat-item {
        border-right: none;
        text-align: left;
        padding: 0 40px 0 0;
    }

    .stat-top {
        font-size: 14px;
    }

    .stat-bottom {
        font-size: 28px;
    }

    /* Layout breakdown */
    .screenshots {
        grid-column: 1 / -1;
    }

    .description {
        grid-column: 1 / 2;
        /* Move description to left or make it full? Left usually contains sidebar info on Desktop, but let's make it easy to read */
        grid-column: 1 / -1;
    }

    .information {
        grid-column: 1 / -1;
    }

    /* Make visual adjustments */
    .screenshot.portrait {
        width: 300px;
        height: 600px;
    }
}

@media (min-width: 1024px) {

    /* Refined Desktop Layout similar to classic web view */
    .main-content {
        max-width: 980px;
        margin: 0 auto;
        /* Keep simple vertically stacked layout for this specific request
           since the user wants the Figure 2 layout which is centered.
           We override the previous grid which was for the Apple-style side-by-side. 
        */
        display: block;
    }

    /* Clear previous grid overrides if any linger from the min-width 768px block */
    .app-header {
        grid-column: auto;
        border-bottom: 1px solid var(--separator-color);
        padding-bottom: 40px;
    }

    /* Make screenshots scroll container centered or wider */
    .screenshot-scroller {
        justify-content: center;
    }

    /* PC-specific Service List Styles */
    .service-list {
        display: flex;
        /* Override grid */
        flex-direction: row;
        gap: 20px;
    }

    .service-item {
        flex: 1;
        /* Background and border already set globally */
        padding: 24px 20px;
        /* transition already set */
        /* justify-content center already set */
    }

    .service-item:hover {
        background-color: #e8e8ed;
        transform: translateY(-2px);
        /* Subtle lift */
    }

    .service-icon {
        font-size: 24px;
        /* Larger icon on PC */
    }

    .service-name {
        font-size: 18px;
        /* Larger text on PC */
        font-weight: 600;
    }
}

/* === iOS Guide Modal Styles === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Dimmed background */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.guide-card {
    background: #eaf5ff;
    /* Light blue background */
    border: 2px solid #0071e3;
    /* Blue border */
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    overflow-y: auto;
}

.guide-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 113, 227, 0.2);
    padding-bottom: 15px;
}

.guide-icon {
    font-size: 24px;
    margin-right: 10px;
}

.guide-header h3 {
    flex: 1;
    font-size: 18px;
    color: #0071e3;
    font-weight: 700;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.warning-box {
    background-color: #fff9c4;
    /* Yellow warning bg */
    color: #f57f17;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 24px;
    border-left: 4px solid #fbc02d;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-item {
    display: flex;
    align-items: flex-start;
}

.step-num {
    background-color: #0071e3;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content {
    flex: 1;
}

.step-content p {
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.step-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #0071e3;
    color: #0071e3;
    border-radius: 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.step-btn.primary {
    background-color: #0071e3;
    color: white;
}

.step-btn:hover {
    opacity: 0.8;
}