
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, #2C3E50 70%, #636E72 25%, #FF9F43 5%);
  color: #ECF0F1;
  overflow-x: hidden;
}

/* 磨砂玻璃效果的容器 */
.frosted-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(44, 62, 80, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.navbar .logo {
  font-size: 1.5em;
  color: #ECF0F1;
  text-decoration: none;
}

.navbar .links {
  display: flex;
  gap: 20px;
}

.navbar .links a {
  color: #ECF0F1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar .links a:hover {
  color: #FF9F43;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
  .navbar .links {
    display: none;
  }
}

/* 主要内容容器 */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 100px 20px 20px 20px;
}

/* 文章区块样式 */
article {
  max-width: 800px;
  min-width: 500px;
  margin: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h2 {
  font-size: 2em;
  color: #2ECC71;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.5em;
  color: #FF9F43;
  margin-bottom: 15px;
}

h4 {
  font-size: 1.2em;
  color: #2ECC71;
  margin-bottom: 10px;
}

/* 段落样式 */
p {
  margin-bottom: 15px;
  color: #ECF0F1;
}

/* 代码块样式 */
pre {
  background: rgba(44, 62, 80, 0.8);
  padding: 15px;
  border-radius: 5px;
  overflow: auto;
  margin-bottom: 20px;
}

code {
  color: #2ECC71;
  font-family: 'Courier New', Courier, monospace;
  position: relative;
}

code::before {
  content: '代码示例';
  position: absolute;
  top: -1.5em;
  left: 0;
  background: #2C3E50;
  color: #fff;
  padding: 2px 5px;
  font-size: 0.8em;
  border-radius: 3px;
}

/* 图片样式 */
img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 10px 0;
}

img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}

/* 按钮样式 */
.button {
  background: #FF9F43;
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 16px;
}

.button:hover {
  background: #e6890e;
  transform: translateY(-2px);
}

/* 工具提示样式 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 125%; 
  left: 50%;
  transform: translateX(-50%);
  background: #2ECC71;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  font-size: 14px;
}

.tooltip:hover::after {
  opacity: 1;
}

/* 动画效果 */
@keyframes backgroundMove {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

.dynamic-background {
  background: linear-gradient(45deg, rgba(44,62,80,0.8), rgba(99,110,114,0.8));
  animation: backgroundMove 15s linear infinite;
}

.transition-effect {
  transition: all 0.3s ease;
}

.transition-effect:hover {
  transform: scale(1.05);
  background: rgba(44,62,80,0.2);
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 仪表盘布局 */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  padding: 20px;
}

.widget {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

thead {
  background: #2C3E50;
  color: #fff;
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #636E72;
}

tr:hover {
  background: rgba(44,62,80,0.3);
}

/* 列表示样式 */
ul.custom-list {
  list-style: none;
  padding: 0;
}

ul.custom-list li::before {
  content: '✔';
  color: #2ECC71;
  margin-right: 10px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  body {
    background: #000;
    color: #fff;
  }

  .navbar {
    background: #000;
  }

  .frosted-glass {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }
}

/* 视觉焦点 */
.focus-highlight {
  position: relative;
  display: inline-block;
}

.focus-highlight::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #2ECC71;
  transition: width 0.3s ease;
}

.focus-highlight:hover::after {
  width: 100%;
}

/* 响应式图片处理 */
.header {
  background-image: url('https://images.gptkong.com/demo/sample1.png');
  background-size: cover;
  background-position: center;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

/* 表单输入样式 */
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 15px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: border 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border: 1px solid #2ECC71;
  outline: none;
}

/* 样式优化 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flex-grid {
  display: flex;
  flex-direction: column;
}

.flex-grid .header, .flex-grid .footer {
  flex: 0 0 auto;
}

.flex-grid .main {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* 浏览器兼容性处理 */
.frosted-glass {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 20px;
}

