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

:root {
  /* Tetsuryokukai-inspired colors */
  --primary-navy: #1a3a52;
  --primary-green: #2d5a3f;
  --accent-gold: #c9a227;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --text-primary: #1a1a1a;
  --text-secondary: #444444;
  --text-muted: #666666;
  --border: #d0d0d0;
  --border-light: #e8e8e8;
  --link-color: #1a3a52;
  --link-hover: #2d5a3f;
}

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

body {
  font-family: 'Noto Serif JP', serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--bg-primary);
  border-bottom: 3px solid var(--primary-navy);
  padding: 16px 0;
}

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

.logo {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.logo a {
  color: var(--text-secondary);
  text-decoration: none;
}

.navi {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.navi a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  transition: all 0.2s;
  border-left: 1px solid var(--border-light);
}

.navi a:first-child {
  border-left: none;
}

.navi a:hover,
.navi a.selected {
  color: var(--primary-navy);
  background: var(--bg-secondary);
}

/* Main */
main {
  flex: 1;
  padding: 32px 0 48px;
}

/* Section */
section {
  margin-top: 32px;
  margin-bottom: 48px;
}

section:first-child {
  margin-top: 0;
}

section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-navy);
  letter-spacing: 0.05em;
}

/* Announcement Table */
.whatsnew {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.whatsnew th {
  background: var(--primary-navy);
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  width: 120px;
  vertical-align: top;
  letter-spacing: 0.05em;
}

.whatsnew td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  line-height: 1.8;
}

.whatsnew tr:last-child td {
  border-bottom: none;
}

.whatsnew em.doubleline {
  font-weight: 700;
  font-style: normal;
  color: var(--primary-navy);
  font-size: 15px;
}

.whatsnew th.arrow_box {
  border-radius: 4px;
}

.whatsnew a {
  color: var(--link-color);
  text-decoration: none;
}

.whatsnew a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.whatsnew a {
  color: var(--link-color);
  text-decoration: none;
}

.whatsnew a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.show-more-btn {
  display: block;
  margin: 16px auto 0;
  padding: 8px 20px;
  background: var(--primary-navy);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.show-more-btn:hover {
  background: var(--primary-green);
}

/* File Table */
.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th {
  background: var(--primary-green);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.file-table th:first-child {
  width: 50%;
}

.file-table th:last-child {
  width: 150px;
  text-align: center;
}

.file-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.file-table tr:last-child td {
  border-bottom: none;
}

.file-table tr:hover {
  background: var(--bg-secondary);
}

.file-table .file-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.file-table .file-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.file-table .download-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary-navy);
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  text-align: center;
}

.file-table .download-btn:hover {
  background: var(--primary-green);
  text-decoration: none;
}

/* Admin Styles */
.admin-section {
  background: var(--bg-secondary);
  padding: 32px;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.admin-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.admin-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.admin-form input[type="text"],
.admin-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  margin-bottom: 20px;
}

.admin-form input[type="text"]:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--primary-navy);
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-form input[type="file"] {
  margin-bottom: 20px;
}

.admin-form button {
  padding: 12px 32px;
  background: var(--primary-navy);
  color: white;
  border: none;
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-form button:hover {
  background: var(--primary-green);
}

.delete-btn {
  padding: 6px 16px;
  background: #cc3333;
  color: white;
  border: none;
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.delete-btn:hover {
  background: #aa2222;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: auto;
  background: var(--bg-secondary);
}

footer p {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* Utility */
.loading {
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px;
  text-align: center;
}

.empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px;
  text-align: center;
  background: var(--bg-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .navi {
    width: 100%;
    justify-content: flex-start;
  }

  .navi a {
    font-size: 13px;
    padding: 6px 12px;
  }

  .title-section h1 {
    font-size: 32px;
  }

  .whatsnew th,
  .whatsnew td {
    display: block;
    width: 100%;
  }

  .whatsnew th {
    background: var(--bg-secondary);
    color: var(--primary-navy);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 12px;
  }

  .file-table th:last-child,
  .file-table td:last-child {
    display: none;
  }

  .file-table .download-link {
    display: inline-block;
    margin-top: 8px;
  }
}
