@font-face {
    font-family: 'MiSans VF';
    src: url('../font/MiSans_VF.ttf') format('truetype');
    font-display: swap;
    /* 优化字体加载时的显示 */
}

@font-face {
    font-family: 'Google Sans';
    src: url('../font/GoogleSans-Regular.ttf') format('truetype');
    font-display: swap;
    /* 优化字体加载时的显示 */
}

* {
    font-family: 'MiSans VF', sans-serif;
    margin: 0;
    padding: 0;
    transition: 0.5s linear;
    -moz-transition: 0.5s linear;
    /* for compatible with apple webview */
    -webkit-transition: 0.5s linear;
    -o-transition: 0.5s linear;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

/* 背景 */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;
}

#bg:before,
#bg:after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* 给壁纸加一层浅黑色遮罩 */
#bg:before {
    /* 21:用过渡色设置背景颜色 */
    background-image: linear-gradient(to top, rgba(19, 21, 25, 0.25), rgba(19, 21, 25, 0.25));
    background-repeat: no-repeat;
    z-index: 2;
}

#bg:after {
    background: url("../images/bg.jpg") no-repeat;
    background-size: cover;
    z-index: 1;
    /* 20:壁纸居中背景图优化 background-position，使用精灵图片设置背景图 */
    background-position: center;
}

/* end of 背景 */

/* 导航栏 */
.menu {
    display: flex;
    background: rgba(255, 255, 255, 0.33);
    padding: 10px;
    justify-content: center;
    text-align: center;
    align-items: center;
    backdrop-filter: blur(0.2rem);
    /* for compatible with apple webview */
    backdrop-filter: blur(0.2rem);
    position: relative;
    box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;

}

.menu-item {
    margin: 1px 10px;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.5s ease;
}

.menu-item:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.menu li {
    list-style-type: none;
}

.menu a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.5s;
}

.menu-item a:hover {
    color: aqua;
}

.menu-item a:active {
    color: beige;
}

.header {
    position: absolute;
    right: 1.5em;
    display: flex;
    height: 40px;
    width: 40px;
    background-repeat: no-repeat;
}

.header img {
    height: 100%;
    width: 100%;
    border-radius: 50%;
    transition: all 0.5s;
}

#header_img:hover {
    transform: scale(1.1);
    /* cursor: pointer; */
}

.icons {
    position: absolute;
    left: 1.5em;
    display: flex;
    background-repeat: no-repeat;
    color: white;
    transition: all 0.5s;
    cursor: pointer;
}

.icons:hover {
    transform: rotate(0.25turn);
    color: aqua;
}

#now {
    color: rgb(255, 203, 107);
}

/* end of 导航栏 */
.art {
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;

}

.art h1 {
    margin-top: 50px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}

/* ===== 关于页友链卡片 ===== */
#friend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 16px;
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;
}

.friend-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 340px;
    max-width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #333;
    transition: transform 0.35s cubic-bezier(0.215, 0.610, 0.355, 1),
        background 0.35s ease,
        backdrop-filter 0.35s ease,
        -webkit-backdrop-filter 0.35s ease,
        box-shadow 0.35s ease;
}

/* hover：背景模糊、卡片变大、透明度提升 */
.friend-card:hover {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.friend-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.friend-card:hover .friend-avatar {
    transform: scale(1.05);
}

.friend-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.friend-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-desc {
    margin-top: 4px;
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bold {
    font-weight: 600;
}


/* begin of fb */
.feedback-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto;
    animation: suofang2 cubic-bezier(0.215, 0.610, 0.355, 1) 0.4s;

}

.feedback-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.feedback-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.label {
    width: 80px;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.select-wrapper,
.textarea-wrapper,
.input-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
    /* 修复flex项目溢出问题 */
}

.select-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: #999;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

select,
textarea,
input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    appearance: none;
    background-color: white;
}

textarea {
    height: 200px;
    resize: none;
}

textarea::placeholder {
    color: #999;
}

.contact-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #4da6ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #3d8be6;
}

/* 错误提示样式 */
.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 输入框错误状态 */
input:invalid,
select:invalid,
textarea:invalid {
    border-color: #ff4d4f;
}

/* 提交按钮禁用状态 */
.submit-btn:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
}

/* end of fb */
/* 18:在页面中添加动画效果 */
@keyframes suofang2 {
    from {
        scale: 0.92;
    }

    to {
        scale: 1.0;
    }
}

@media screen and (max-width: 550px) {
    .feedback-container {
        width: 90%;
    }

    #friend {
        gap: 16px;
        padding: 0 20px;
        /* 增加左右边距，避免卡片贴边 */
        margin-bottom: 40px;
    }

    .friend-card {
        width: 66%;
        padding: 16px;
        /* 让卡片内部留白更均匀 */
        gap: 14px;
        /* 头像和文字的间距 */
    }

    .friend-avatar {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .friend-info {
        flex: 1;
        /* 占满剩余空间 */
        min-width: 0;
        /* 防止长名字或长描述撑破卡片 */
    }

    .friend-name {
        font-size: 1.05rem;
    }

    .friend-desc {
        font-size: 0.85rem;
        margin-top: 4px;
        /* 调整描述之间的间距 */
    }

    .friend-tag {
        margin-top: 4px;
        font-size: 0.7rem;
        padding: 1px 8px;
    }
}

@media screen and (max-width: 475px) {
    .welcome h1 {
        font-size: 1.8rem;
        animation: none;
    }

    .menu-item a {
        font-size: 0.95rem;
    }

    .header {
        height: 30px;
        width: 30px;
    }
}

@media screen and (max-width: 375px) {
    #friend {
        padding: 0 16px;
        /* 稍微缩小边距，但依然保留 */
    }

    .friend-card {
        padding: 14px;
        gap: 12px;
    }

    .friend-avatar {
        width: 48px;
        height: 48px;
    }

    .friend-name {
        font-size: 1rem;
    }

    .friend-desc {
        font-size: 0.8rem;
    }
}

@media screen and (max-width:320px) {
    .welcome h1 {
        font-size: 1.8rem;
        animation: none;
    }

    .menu-item a {
        font-size: 0.8rem;
        display: none;
    }

    .menu-item {
        margin: 5px 10px;
    }
}
