:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --background-light: #f8f9fa;
  --background-dark: #f1f3f5;
  --text-color: #333;
  --text-muted: #666;

  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', 'Helvetica Neue', sans-serif;
  --font-size-base: 16px;
  --font-size-small: 0.875rem;
}

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

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  font-size: var(--font-size-base);
  background-color: #ffffff;
  scroll-behavior: smooth;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}


#header {
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
}

#header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}


.logo {
  flex-shrink: 0;
}

.logo a {
  color: black;
  display: block;
  width: 150px;
  height: 50px;
  border-radius: 8px;
  text-indent: -9999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo a:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


#header nav {
  flex-grow: 1;
}

#header nav ul {
  display: flex;
  list-style-type: none;
  justify-content: flex-end;
  align-items: center;
}

#header nav ul li {
  margin-left: 20px;
}

#header nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

#header nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
}

#header nav ul li a:hover::after {
  width: 100%;
  left: 0;
}


#header nav ul li a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 4px;
}


footer {
  background-color: var(--background-dark);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.05);
}

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

footer nav {
  margin-bottom: 20px;
}

footer nav ul {
  display: flex;
  list-style-type: none;
  gap: 20px;
}

footer nav ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--font-size-small);
  transition: color 0.3s ease;
}

footer nav ul li a:hover {
  color: var(--primary-color);
}

footer p {
  color: var(--text-muted);
  font-size: var(--font-size-small);
}


@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


@media screen and (max-width: 768px) {
  #header .container {
    flex-direction: column;
    gap: 15px;
  }

  #header nav ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  #header nav ul li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  footer nav ul {
    flex-direction: column;
    align-items: center;
  }
}


@media print {
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  #header, footer {
    display: none;
  }
}


::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  border-radius: 5px;
}


a {
  -webkit-tap-highlight-color: transparent;
}


img, video {
  max-width: 100%;
  height: auto;
  display: block;
}


@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e0e0e0;
    --background-light: #2c2c2c;
    --background-dark: #1c1c1c;
  }

  body {
    background-color: #121212;
    color: var(--text-color);
  }
}
