* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p{
  opacity: 0.9;
  font-size: 1.1rem;
}

.main-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.sidebar {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.sidebar h2, .results-area h2{
  font-size: 22px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 25px 15px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: #666;
  background-color: #f9f9f9;
}

.upload-area  .icon{
  font-size: 3rem;
  margin-bottom: 15px;
}
.upload-area p {
  margin-top: 10px;
  color: #666;
}

.analyze-btn {
  width: 100%;
  padding: 12px;
  background-color: #4a6bdf;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.analyze-btn:hover {
  background-color: #3a56c0;
}

.analyze-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.results-area {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  min-height: 500px;
}

.tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
}

.tab.active {
  background-color: #e0e8ff;
  color: #4a6bdf;
  font-weight: 500;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.metric-card {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.metric-value {
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0;
}

.metric-label {
  color: #666;
  font-size: 14px;
}

.metric-change {
  font-size: 14px;
}

.metric-change.positive {
  color: #4caf50;
}

.metric-change.negative {
  color: #f44336;
}

.chart-container {
  height: 300px;
  margin-bottom: 30px;
  position: relative;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f5f5f5;
  font-weight: 500;
}

tr:hover {
  background-color: #f9f9f9;
}

footer {
  opacity: 0.8;
  text-align: center;
}


.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.notice.show {
  opacity: 1;
}

.hidden {
  display: none;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.loading {
  text-align: center;
  padding: 20px;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #4a6bdf;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#fileInput {
  display: none;
}

.file-info {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.intro-section {
  margin-top: 25px;
}

.intro-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #4a6bdf;
}

.intro-section p {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.85;
}
/* 访客详情弹窗样式 */
.modal {
  display: block;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 1200px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover,
.close:focus {
  color: #000;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.visitor-details-container {
  overflow-x: auto;
  width: 100%;
}

.visitor-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
}

.visitor-stats p {
  margin: 0;
  font-weight: 500;
}

#visitorDetailsTable {
  width: 100%;
  border-collapse: collapse;
}

#visitorDetailsTable th,
#visitorDetailsTable td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
  min-width: 80px;
  word-wrap: break-word;
  max-width: 550px;
}

#visitorDetailsTable th {
  background-color: #f5f5f5;
  font-weight: 500;
}

#visitorDetailsTable td:nth-child(5) { /* 大小列 */
  min-width: 100px;
}

#visitorDetailsTable tr:hover {
  background-color: #f9f9f9;
}

.status-code {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
}

.status-200 { background-color: #e8f5e9; color: #4caf50; }
.status-301 { background-color: #e3f2fd; color: #2196f3; }
.status-302 { background-color: #e3f2fd; color: #2196f3; }
.status-404 { background-color: #fff3e0; color: #ff9800; }
.status-500 { background-color: #ffebee; color: #f44336; }
