@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  /* Material Design 3 Color Palette */
  /* Base Color: #738EAE */

  /* Primary */
  --md-sys-color-primary: #738EAE;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #D8E2F9;
  --md-sys-color-on-primary-container: #2A4868;

  /* Secondary */
  --md-sys-color-secondary: #B3C5D7;
  --md-sys-color-on-secondary: #253238;
  --md-sys-color-secondary-container: #D8E2F9;
  --md-sys-color-on-secondary-container: #41474D;

  /* Tertiary */
  --md-sys-color-tertiary: #A8D8B9;
  --md-sys-color-on-tertiary: #25342A;
  --md-sys-color-tertiary-container: #D2F5D9;
  --md-sys-color-on-tertiary-container: #3A4B3F;

  /* Error */
  --md-sys-color-error: #B3261E;
  --md-sys-color-on-error: #FFFFFF;

  /* Background */
  --md-sys-color-background: #F7F9FC;
  --md-sys-color-on-background: #1A1C1E;

  /* Surface */
  --md-sys-color-surface: #F7F9FC;
  --md-sys-color-on-surface: #1A1C1E;
  --md-sys-color-surface-variant: #E0E2EC;
  --md-sys-color-on-surface-variant: #44474F;
  --md-sys-color-outline: #74777F;
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --md-sys-color-primary: #A8C7FA;
  --md-sys-color-on-primary: #00325B;
  --md-sys-color-primary-container: #00497D;
  --md-sys-color-on-primary-container: #D3E4FF;

  --md-sys-color-secondary: #B8C8E0;
  --md-sys-color-on-secondary: #253241;
  --md-sys-color-secondary-container: #3B4858;
  --md-sys-color-on-secondary-container: #D4E4F7;

  --md-sys-color-tertiary: #D4BFA1;
  --md-sys-color-on-tertiary: #3B2F15;
  --md-sys-color-tertiary-container: #53452A;
  --md-sys-color-on-tertiary-container: #F1DBBB;

  --md-sys-color-error: #F2B8B5;
  --md-sys-color-on-error: #601410;

  --md-sys-color-background: #1A1C1E;
  --md-sys-color-on-background: #E3E2E6;

  --md-sys-color-surface: #1A1C1E;
  --md-sys-color-on-surface: #E3E2E6;
  --md-sys-color-surface-variant: #44474F;
  --md-sys-color-on-surface-variant: #C4C6CF;
  --md-sys-color-outline: #8E9099;
}

/* Basic Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
}

/* Typography Scale */
.display-large {
  font-size: 57px;
  font-weight: 400;
  line-height: 64px;
  letter-spacing: -0.25px;
}

.headline-large {
  font-size: 32px;
  font-weight: 400;
  line-height: 40px;
}

.title-large {
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}

.body-large {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
}

.label-large {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1px;
}

/* Component Styles */

/* Header */
header {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  padding: 16px 24px;
  text-align: center;
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
}

header h1 a {
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 24px; /* title-large is 22px, a bit larger for site title */
  font-weight: 700;
}

header nav ul {
  padding: 0;
  list-style: none;
  margin-top: 16px;
}

header nav ul li {
  display: inline;
  margin: 0 12px;
}

header nav ul li a {
  color: var(--md-sys-color-primary);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

header nav ul li a:hover {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  text-decoration: none;
}

.theme-switcher {
    position: absolute;
    top: 16px;
    right: 24px;
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.theme-switcher:hover {
    background-color: var(--md-sys-color-surface-variant);
}

/* Main Content */
main {
  padding: 24px;
  margin: 0 auto;
  max-width: 960px;
}

#main-content {
  background-color: var(--md-sys-color-surface);
  padding: 24px;
  border-radius: 16px;
}

/* Card */
.card {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  padding: 16px;
  margin-top: 24px;
  border-radius: 12px;
  border: 1px solid var(--md-sys-color-outline);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--md-sys-color-on-surface-variant);
}

main ul {
    list-style-position: inside;
    padding-left: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    margin-top: 24px;
    font-size: 0.9em;
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

/* Announcement Style (from news.html) */
.announcement {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-surface-variant);
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
}

.announcement h4 {
    margin-bottom: 8px;
}

.announcement .timestamp {
    font-size: 0.8em;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
    display: block;
}


/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    header nav ul li {
        display: block;
        margin: 8px 0;
    }

    main {
        padding: 16px;
    }
}
