* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 480px;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.header {
    padding: 60px 20px 40px;
    text-align: center;
    background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
    color: #fff;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.app-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-desc {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading {
    color: #999;
    font-size: 14px;
    margin-top: 20px;
}

/* Flex Layout for Download Buttons */
.download-grid {
    width: 100%;
    display: flex;
    flex-direction: row; /* Ensure row layout */
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap; /* Prevent wrapping */
    gap: 8px;
    margin-bottom: 12px;
}

.download-item {
    flex: 1;
    min-width: 64px; /* Minimum width to prevent squashing */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 16px 4px;
    border-radius: 12px;
}

.download-item:active {
    background: #f5f5f5;
    transform: scale(0.95);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Prevent large images from overflowing */
}

.icon, .icon-wrapper img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block; /* Ensure no inline spacing issues */
    max-width: 100%; /* Fallback constraint */
    max-height: 100%; /* Fallback constraint */
}

.windows .icon-wrapper { background: #e6f7ff; color: #1890ff; }
.android .icon-wrapper { background: #f6ffed; color: #52c41a; }
.ios .icon-wrapper { background: #fff7e6; color: #fa8c16; }
.h5 .icon-wrapper { background: #fff0f6; color: #eb2f96; }

.btn-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    text-align: center;
}

.version-tag {
    font-size: 10px;
    color: #999;
    background: #f9f9f9;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* QR Code Section */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.qrcode-container {
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.qrcode-container img {
    display: block; /* Remove gap */
}

.qr-text {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: #ccc;
    font-size: 12px;
}

@media (min-width: 481px) {
    .container {
        min-height: auto;
        margin: 40px 0;
        border-radius: 24px;
    }
}
