/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 20px;
  min-height: 100vh;
  color: rgba(255, 255, 255, 0.9);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 標頭樣式 */
.header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
  color: white;
  font-size: 28px;
  margin-bottom: 20px;
}

/* 控制組件 */
.controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-group input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 14px;
  min-width: 150px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.control-group input:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.8);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按鈕樣式 */
button {
  padding: 10px 28px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

button:disabled {
  background: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 圖表包裝器 */
.charts-wrapper {
  display: grid;
  gap: 20px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

.chart-container-volume {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
}

/* 狀態訊息 */
.error {
  display: none;
  padding: 15px;
  margin-bottom: 20px;
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.5);
  border-radius: 6px;
  color: #ff6b6b;
  font-size: 14px;
}

.loading {
  display: none;
  text-align: center;
  padding: 40px;
  color: #3498db;
  font-weight: 500;
}

/* 頁尾 */
.footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 30px;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .header {
    padding: 16px;
  }

  .header h1 {
    font-size: 20px;
  }

  .controls {
    flex-direction: column;
  }

  .control-group input {
    min-width: 100%;
  }

  button {
    width: 100%;
  }

  .chart-container {
    height: 300px;
  }

  .chart-container-volume {
    height: 150px;
  }
}
