
/* styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
}

header, footer {
    background-color: #0080C0D5; /* 灰色系背景颜色 */
    color: white;
    text-align: center;
    padding: 2em 20px; /* 增加内边距 */
    height: auto; /* 确保高度自适应 */
    width: 100%; /* 全宽显示 */
    margin: 0; /* 去掉水平居中 */
}

ul {
	list-style: none;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0 20px; /* 增加左右内边距 */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center; /* 确保子元素垂直居中 */
}

nav ul li {
    margin: 10px 20px; /* 增加左右间距 */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    display: inline-block; /* 确保链接块级显示 */
}

nav ul li a:hover {
    text-decoration: underline;
}

.login-button a {
    background-color: #fff;
    color: #0080C0D5; /* 修改文字颜色 */
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid #0080C0D5; /* 修改边框颜色 */
    display: inline-block;
}

.login-button a:hover {
    background-color: #0080C0D5;
    color: white;
    border-color: #0080C0D5; /* 修改悬停时的边框颜色 */
}

main {
    padding: 20px 10px;
    max-width: 1800px; /* 设置最大宽度 */
    margin: 0 auto; /* 水平居中 */
}

main h1 {
    font-size: 2em;
    text-align: center;
}

main p {
    font-size: 1em;
    text-align: center;
    margin: 10px 0;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* 设置子元素之间的间距 */
    max-width: 1500px; /* 设置最大宽度 */
    margin: 0 auto; /* 水平居中 */
}

.feature-item {
    flex: 1 1 18%; /* 默认情况下显示4列 */
    margin: 10px;
    padding: 10px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.feature-item h3 {
    margin: 0;
    font-size: 1.5em;
}

.feature-item p {
    margin: 5px 0;
    color: #555;
}

.flex-container {
  display: flex;
}
 
.flex-container > div {
  flex: 1; /* 使每个子项平分空间 */
  margin: 5px; /* 可选：添加一些边距 */
}

footer {
    background-color: #0080C0D5; /* 灰色系背景颜色 */
    color: white;
    text-align: center;
    padding: 20px 20px; /* 增加内边距 */
    height: auto; /* 确保高度自适应 */
    width: 100%; /* 全宽显示 */
    margin: 0; /* 去掉水平居中 */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-section {
    flex: 1 1 45%;
    margin: 10px;
}

.footer-section p {
    margin: 5px 0;
    font-size: 0.9em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

.footer-section ul li {
    margin: 0 10px;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.social-media img {
    width: 120px;
    height: 120px;
}

.footer-bottom {
    background-color: #0080C0D5; /* 稍微调整底部背景颜色 */
    padding: 5px 0;
    margin-top: 5px;
    text-align: center;
    font-size: 0.8em;
    width: 100%; /* 确保背景色延伸到页边 */
    box-sizing: border-box; /* 确保内边距不会影响宽度 */
}

/* 商品列表标题样式 */
.list-group-item.active.bg-dark {
    background-color: #343a40 !important;
    border-color: #343a40 !important;
    color: #ffffff;
    font-weight: bold;
    padding: 1.5rem 1rem; /* 增加背景色高度 */
}

/* 表格样式 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

/* 取消ID前面的黑点 */
.id-cell {
    list-style-type: none;
}

/* 表单样式 */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .feature-item {
        flex: 1 1 18%; /* 4列 */
    }
}

@media (max-width: 992px) {
    .feature-item {
        flex: 1 1 30%; /* 3列 */
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    .feature-item {
        flex: 1 1 45%; /* 2列 */
    }

    header {
        padding: 1.5em 10px;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    main h1 {
        font-size: 1.8em;
    }

    .feature-item h3 {
        font-size: 1.2em;
    }

    .footer-section p {
        font-size: 0.8em;
    }

    .login-button a {
        padding: 8px 16px;
    }

    header img {
        max-height: 50px; /* 调整图像最大高度 */
    }
}

@media (max-width: 480px) {
    nav ul li a {
        font-size: 0.8em;
    }

    main h1 {
        font-size: 1.6em;
    }

    .feature-item {
        flex: 1 1 100%; /* 1列 */
    }

    .feature-item h3 {
        font-size: 1.1em;
    }

    .footer-section p {
        font-size: 0.7em;
    }

    header {
        padding: 1em 10px;
    }

    nav ul li {
        margin: 3px 0;
    }

    .feature-item {
        padding: 15px;
    }

    .footer-section {
        margin: 5px;
    }

    .login-button a {
        padding: 6px 12px;
    }

    header img {
        max-height: 30px; /* 调整图像最大高度 */
    }
}

.list-group-item {
    text-align: left; /* 居中文本 */
}

.list-group-item p {
    margin: 5px 0; /* 调整段落间距 */
}

/* 调整 header 图像样式 */
header img {
    max-width: 100%; /* 确保图像最大宽度不超过父容器 */
    height: auto; /* 保持图像的宽高比 */
    display: block; /* 确保图像块级显示 */
    margin: 0 auto; /* 水平居中 */
    max-height: 40px; /* 设置最大高度以防止图像过大 */
}
