/* 全局样式入口文件 - 导入所有模块化样式 */

/* 导入基础样式 */
@import './base/variables.css';
@import './base/reset.css';
@import './base/typography.css';

/* 导入组件样式 */
@import './components/buttons.css';
@import './components/tabs.css';  /* 新添加的标签样式文件 */
@import './components/cards.css'; /* 新添加的卡片样式文件 */
@import './components/forms.css';
@import './components/dropzone.css';
@import './components/navbar.css';

/* 导入布局样式 */
@import './layouts/container.css';
@import './layouts/header-footer.css';
@import './layouts/grid.css';

/* 全局共享样式 - 确保所有模块一致性 */

/* 标签统一样式 - 简化无花哨的设计 */
.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  background-color: transparent;
  box-shadow: none;
  padding: 0;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  font-weight: normal;
  border-radius: 0;
  margin-right: 0.5rem;
  transition: all 0.2s;
}

.tab-btn.active {
  border-bottom: 2px solid #4a90e2;
  color: #4a90e2;
  background-color: transparent;
}

.tab-btn:hover {
  color: #4a90e2;
  background-color: transparent;
}

/* 卡片统一样式 - 简化设计 */
.card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: none;
  overflow: hidden;
  transform: none;
  background-color: #fff;
  margin-bottom: 20px;
}

.card:hover {
  transform: none;
  box-shadow: none;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* 结果容器统一样式 */
.result-container {
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 15px;
  margin: 0;
}

.result-content {
  padding: 0;
  margin: 0;
  background-color: transparent;
}

/* 文本区域统一样式 */
.result-content textarea,
#result-display,
#result-output,
#csv-result-output,
#kml-result-output,
.code-display {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #fff;
  resize: vertical;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  margin-top: 0;
}

/* 去除可能导致样式冲突的主页卡片颜色边框 */
main .card:first-child {
  border-top: 1px solid #e0e0e0;
}

/* 全局字体和颜色优化 */
body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* 页面标题区域 */
.page-header {
  margin-top: 1rem; 
  margin-bottom: 1.5rem;
  padding-left: 30px;
}

.page-header h1,
.container > header > h1 {
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.page-header p {
  padding-left: 0;
}

.text-muted {
  color: #6c757d;
}

/* 容器间距 - 所有模块统一 */
.container > header {
  margin-top: 30px; /* 改为30px，与其他模块一致 */
  margin-bottom: 1.5rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* 页面标题移动端优化 */
  .page-header {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-header h1 {
    font-size: 1.5rem; /* 从默认大小减小 */
    line-height: 1.3;
    margin-bottom: 0.4rem;
    font-weight: 600; /* 稍微减轻字重 */
  }
  
  .page-header p {
    font-size: 0.9rem; /* 描述文字减小 */
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
  .page-header {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .page-header h1 {
    font-size: 1.3rem;
    line-height: 1.2;
  }
  
  .page-header p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* 极小屏幕优化 */
@media (max-width: 375px) {
  .page-header h1 {
    font-size: 1.2rem;
  }
  
  .page-header p {
    font-size: 0.8rem;
  }
}

/* 统一所有模块的文件上传区域样式，以模块1为准 */
.dropzone {
  /* 模块1的边框样式 */
  border: 2px dashed var(--border-color);
  border-radius: 4px;
  padding: 30px;
  text-align: center;
  margin-bottom: 10px;
  
  /* 保留模块4的一些功能性样式 */
  width: 100%;
  cursor: pointer;
  transition: all 0.3s;
  
  /* 覆盖flex布局，使用模块1的文本居中布局 */
  display: block;
}

/* 统一激活状态样式 */
.dropzone.active {
  border-color: var(--primary-color);
  background-color: rgba(74, 144, 226, 0.1);
}

/* 统一文件上传图标样式 */
.upload-icon {
  width: 48px;
  height: 48px;
  fill: #999;
  margin-bottom: 10px;
}

/* 统一上传文本和按钮样式 */
.upload-text {
  margin: 0 0 10px 0;
  color: #666;
}

/* 统一文件信息区域样式 */
.file-info {
  margin-top: 10px;
  display: block;
}