:root {
    --apple-blue: #0071e3;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-dark: #1d1d1f;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--apple-light-gray);
    color: var(--apple-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.content-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container,
.faq-section,
.related-content {
    background-color: white;
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

h1,
h2 {
    color: var(--apple-dark);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

input,
button {
    padding: 0.8rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input[type="text"] {
    background-color: var(--apple-light-gray);
    color: var(--apple-dark);
}

input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3);
}

button {
    background-color: var(--apple-blue);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background-color: #0077ed;
}

#result {
    margin-top: 1.5rem;
    font-weight: 500;
    word-break: break-word;
    color: var(--apple-gray);
}

.language-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.language-switch button {
    background-color: transparent;
    color: var(--apple-blue);
    margin-left: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    width: auto;
    border: 1px solid var(--apple-blue);
    transition: all 0.3s ease;
}

.language-switch button:hover,
.language-switch button.active {
    background-color: var(--apple-blue);
    color: white;
}

input[type="file"] {
    padding: 0;
}

input[type="file"]::file-selector-button {
    padding: 0.8rem;
    border-radius: 8px;
    background-color: var(--apple-light-gray);
    border: none;
    color: var(--apple-blue);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e8e8ed;
}

#result iframe,
#result img {
    max-width: 100%;
    height: auto;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.footer {
    width: 100%;
    padding: 1rem 0;
    background-color: var(--apple-light-gray);
    text-align: center;
}

.footer p {
    margin: 0;
    color: var(--apple-gray);
    font-size: 0.9rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    color: var(--apple-blue);
    margin-bottom: 0.5rem;
}

.floating-share {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: scale(1.1);
}

.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.linkedin {
    background-color: #0077b5;
}

.whatsapp {
    background-color: #25d366;
}

.download-qr {
    background-color: #4CAF50;
}

.share-button .material-icons {
    font-size: 20px;
}

.open-new-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    background-color: var(--apple-blue);
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto;
    min-width: 80px;
    /* 删除 margin-left: auto; */
}

.open-new-tab-button:hover {
    background-color: #0077ed;
}

.open-new-tab-button .material-icons {
    font-size: 1rem;
    margin-right: 0.3rem;
}

.contact-email {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
}

.email-button {
    display: flex;
    align-items: center;
    background-color: var(--apple-blue);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.email-button:hover {
    background-color: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.email-button .material-icons {
    margin-right: 8px;
    font-size: 20px;
}

.email-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 5px;
}

.email-address {
    font-size: 0.9em;
    color: white;
    word-break: break-all;
}

.contact-message {
    display: none;
    position: absolute;
    left: 0;
    bottom: 100%;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.8em;
    color: var(--apple-gray);
    max-width: 200px;
    margin-bottom: 10px;
}

.contact-email:hover .contact-message {
    display: block;
}

@media (max-width: 768px) {
    .contact-email {
        left: 10px;
        bottom: 70px;
    }

    .email-button {
        padding: 8px 12px;
    }

    .email-address {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .contact-email {
        bottom: 80px;
    }

    .email-address {
        font-size: 0.7em;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container,
.faq-section,
.related-content {
    animation: fadeIn 0.5s ease-out;
}

/* 添加一个新的容器来包裹 iframe 和按钮 */
.webpage-result-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 改回居中对齐 */
}

.webpage-result-container iframe {
    width: 100%;
    height: 500px;
    border: none;
    margin-bottom: 1rem;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    max-width: 90%;
    background-color: rgba(70, 70, 70, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 17px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toast.show {
    visibility: visible;
}