/* 设置基础 font-size */
html {
    font-size: 16px; /* 1rem = 16px */
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.8;
    padding: 0;
    margin: 0;
    max-width: 73.125rem; /* 1170px = 73.125rem */
    margin-left: auto;
    margin-right: auto;
    height: 100%;
}

/* 全局变量定义 */
:root {
    --primary-color: #231a59;
    --secondary-color: #0066cc;
    --highlight-color: #ffa900;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1.25rem;
    text-align: center;
    font-size: 1.5rem;
}

header .logo h1 {
    margin: 0;
    font-size: 2rem;
}

main {
    padding: 1.25rem 1.875rem;
    font-size: 1.125rem;
    color: #666;
}

.section {
    margin-bottom: 1.875rem;
}

h2 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.9375rem;
    font-weight: 600;
}

p {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 1.25rem;
}

strong {
    font-weight: bold;
    color: #333;
}

/* App下载 */
.app_link {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.word_break{
    word-wrap: break-word;
}

.app_link button {
    padding: 5px 10px; /* 缩小按钮 */
    font-size: 14px; /* 更小的字体 */
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.app_link button:hover {
    background-color: #45a049;
}

.app_link button:active {
    background-color: #3e8e41;
}

.copy-toast {
    position: fixed;
    top: 54%;
    left: 50%;
    z-index: 9999;
    padding: 14px 16px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;

    /* 半透明深色背景 */
    background: rgba(25, 25, 25, 0.78);

    /* Safari 和其他浏览器的毛玻璃效果 */
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);

    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);

    /* 默认隐藏 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, -50%) scale(0.96);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.copy-code-control {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    margin: 0 2px 0 5px;
    padding: 3px 7px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    color: #777;
    -webkit-text-fill-color: #777;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.copy-code-control:hover {
    color: #555;
    -webkit-text-fill-color: #555;
    background: #eee;
    border-color: #ccc;
}

.copy-code-control:active {
    background: #e5e5e5;
}

.copy-code-icon {
    position: relative;
    flex: 0 0 auto;
    width: 10px;
    height: 11px;
}

.copy-code-icon::before,
.copy-code-icon::after {
    content: '';
    position: absolute;
    box-sizing: border-box;
    width: 6px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 1px;
}

.copy-code-icon::before {
    top: 0;
    left: 0;
}

.copy-code-icon::after {
    right: 0;
    bottom: 0;
    background: #f5f5f5;
}

.copy-code-control:hover .copy-code-icon::after {
    background: #eee;
}

.copy-code-control:active .copy-code-icon::after {
    background: #e5e5e5;
}

/* 颜色样式 */
.code_color {
    color: var(--highlight-color);
}

/* 链接样式 */
a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 图像容器 */
.image-container {
    text-align: center;
    margin: 1.25rem 0;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* 控制图片在 PC 端的最大宽度 */
@media (min-width: 48rem) { /* 768px 以上 */
    .image-container img {
        max-width: 28.5rem; /* 设置图片最大宽度 */
    }
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 1.25rem;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.875rem;
    position: relative;
    bottom: 0;
    width: 100%;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 48rem) { /* 768px */
    header .logo h1 {
        font-size: 1.375rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    footer {
        font-size: 0.75rem;
    }
}

@media (max-width: 30rem) { /* 480px */
    footer {
        font-size: 0.75rem;
    }
}
