.btn {
    display: inline-block;
    color: #2c5e1a;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: 1px solid #2c5e1a;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.grid {
    display: grid;
    /* 设置网格布局的列数。使用 repeat 函数表示重复创建列，auto-fill 表示尽可能多地创建列，
    minmax(300px, 1fr) 表示每列的最小宽度为 300px，最大宽度为 1fr（平均分配剩余空间）。*/
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* gap: 120px; */
    gap: 20px;
}

.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(44, 126, 78, 0.452);
}

.card-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 20px;
}
.culture-details{
    height: 115px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 调整h3颜色为与背景更协调的深绿色 */
.card h3 {
    color: #2e7d32;
    margin-top: 0;
}

/* 调整h4颜色为与背景搭配的浅绿色 */
.card h4 {
    color: #4caf50;
}

.outer-container {
    /* height: 1200px; */
    max-width: 1400px;
    margin: 0 auto;
    /* 水平居中 */
    border: 3px solid #55b286;
    /* 调整边框大小为2px，颜色与背景渐变中的颜色相匹配 */
    border-radius: 10px;
    padding: 20px;
    /* 添加内边距 */
    transition: box-shadow 0.3s ease;
    /* 添加过渡效果 */
}

.outer-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* 悬停阴影效果 */
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 100px;
    margin-bottom: 30px;
}

.search-input {
    border: 0.5px solid #55b286;
    width: 60%;
    max-width: 500px;
    padding: 14px;
    font-size: 18px;
    /* border: none; */
    border-radius: 25px 0 0 25px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.3);
    /* 设置输入框背景为半透明白色，与背景主题相契合 */
}

.search-button {
    padding: 15px 25px;
    background-color: rgba(85, 178, 134, 0.8);
    /* 按钮背景色采用背景渐变中的颜色并设置半透明 */
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 18px;
}

.search-button:hover {
    background-color: rgba(85, 178, 134, 1);
    /* 鼠标悬停时按钮背景色变为不透明 */
}

.recorded-text {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    font-size: 24px;
    /* 增大字体大小，使其更醒目 */
    color: #2c3e50;
    /* color: #62d6e5; 更换为淡蓝色，与整体风格更协调 */
    font-weight: bold;
    /* 设置字体加粗 */
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);
    /* 增强文字阴影效果 */
    letter-spacing: 2px;
    /* 增加字符间距 */
    animation: fadeIn 1s ease-in-out;
    /* 添加淡入动画 */
}

/* 定义淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加文化卡片样式 */
.add-card {
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.add-card:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 友情链接样式 */
.friend-link {
    background: rgba(94, 80, 63, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(94, 80, 63, 0.1);
}

.friend-link h3 {
    color: #5e503f;
    font-size: 1.25rem;
    border-left: 4px solid #5e503f;
    padding-left: 0.75rem;
    margin-bottom: 1rem;
}



.friend-link a {
    color: #5e503f;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.friend-link a:hover {
    background: rgba(94, 80, 63, 0.1);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .friend-link ul {
        grid-template-columns: 1fr;
    }
}


/* 新增模态框样式 */
.culture-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.modal-content {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.close-btn {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2e7d32;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.form-group textarea {
  height: 100px;
}

/* 新增卡片动画 */
.add-card {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.add-card:hover {
  transform: translateY(-5px);
}

/* 删除按钮样式 */
.delete-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.delete-btn:hover {
  transform: scale(1.1);
  background: #ff6b81;
}

.card-footer {
  position: relative;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}