body {
    background: #f9f9f9;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}
/* 声明 Material Icons 本地字体 */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    /* 路径指向本地 fonts 文件夹中的字体文件，根据实际文件格式调整 */
    src: url('fonts/MaterialIcons-Regular.woff2') format('woff2'),
    url('fonts/MaterialIcons-Regular.woff') format('woff'),
    url('fonts/MaterialIcons-Regular.ttf') format('truetype');
}

/* 定义图标通用样式 */
.material-icons {
    font-family: 'Material Icons'; /* 关联上面声明的字体 */
    font-weight: normal;
    font-style: normal;
    font-size: 24px; /* 默认图标大小 */
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga'; /* 启用字体连笔特性 */
    -webkit-font-smoothing: antialiased;
}

.container {
    background: #fff;
    margin-top: 80px;
    padding: 32px 36px;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    transition: box-shadow .3s;
}
.quote {
    font-size: 1.4em;
    color: #3a3a3a;
    margin: 24px 0 14px 0;
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    background: aliceblue;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}
.author {
    color: #888;
    font-size: 1em;
    margin-bottom: 18px;
}
.btn {
    display: inline-block;
    padding: 9px 24px;
    background: #508ef0;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 7px;
    font-size: 1em;
    transition: background 0.2s;
}
.btn:hover {
    background: #3573c9;
}
select {
    padding: 5px 14px;
    border-radius: 7px;
    margin-bottom: 14px;
}

.quote.typing {
    white-space: normal;
    overflow: hidden;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin-top: 0px;
    }
    .quote {
        background: aliceblue;
        transition: opacity 0.3s ease;
        font-size: 1.2em;
    }
    .btn {
        font-size: 0.9em;
        padding: 8px 16px;
    }
}
#theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.theme-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #eee;
    font-size: 0.95em;
    color: #444;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.theme-tag:hover {
    background: #d0e7ff;
}

.theme-tag.active {
    background: #508ef0;
    color: white;
    font-weight: bold;
    border-color: #3573c9;
}
.quote-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.quote-text {
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.quote-author {
    font-size: 1em;
    color: #666;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 10px;
    font-size: 14px;
    color: #888;
}

.footer .btn {
    background: #4caf50;
    color: #fff;
    margin-bottom: 10px;
    font-size: 14px;
}
.recommend-tag {

    display: inline-block;
    padding: 6px 16px;
    border-radius: 0.3rem;

    font-size: 0.95em;

    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;

    background-color: red; /* 设置背景颜色为红色 */
    color: white; /* 设置文本颜色为白色 */
}

.image-scroll-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.image-and-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
    gap: 10px;
    max-width: 100%;
    white-space: nowrap;
    overflow-x: auto;
}

#recommend-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 6px 0;
    scroll-behavior: smooth;
}

#recommend-tags::-webkit-scrollbar {
    height: 6px;
}

#recommend-tags::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.image-and-tags img {
    max-width: 100px; /* 可选：设置图片的最大宽度 */
    height: auto; /* 保持图片的宽高比 */
}

#custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.alert-box {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 80%;
    font-size: 16px;
}

.close-btn {
    margin-top: 15px;
    padding: 6px 12px;
    background-color: #ff6f61;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}
