/* 速度计 - Shared Styles */

/* CSS Variables */
:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --secondary-color: #5f6368;
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --warning-color: #f9ab00;
  --warning-bg: #fef7e0;
  --success-color: #34a853;
  --max-width: 800px;
  --header-height: 64px;
  --footer-height: 80px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
  text-decoration: none;
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0;
}

.content-section {
  background-color: var(--surface-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Safety Warning Box */
.safety-warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.safety-warning h3 {
  color: #b06000;
  margin-top: 0;
}

.safety-warning p {
  margin-bottom: 0;
  color: #7c4a00;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  height: var(--footer-height);
  display: flex;
  align-items: center;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

footer nav {
  gap: 1rem;
}

footer nav a {
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  header .container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 0.5rem;
  }

  nav {
    gap: 1rem;
  }

  footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}
