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

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  padding: 0;
  margin: 0;
}

/* Header placeholder */
.comp-header {
  background: linear-gradient(135deg, #4DB8D9 0%, #2A9AC2 100%);
  color: white;
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comp-header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: white !important;
  text-decoration: none !important;
}

.comp-header__logo:hover {
  opacity: 0.9;
  color: white !important;
  text-decoration: none !important;
}

/* Navigation */
.comp-nav {
  background: white;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid #e0e0e0;
}

.comp-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #4DB8D9;
  color: white !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.comp-nav__btn:hover {
  background: #2A9AC2;
  transform: translateY(-1px);
  color: white !important;
  text-decoration: none !important;
}

.comp-nav__btn--outline {
  background: white;
  color: #4DB8D9 !important;
  border: 1px solid #4DB8D9;
}

.comp-nav__btn--outline:hover {
  background: #4DB8D9;
  color: white !important;
}

/* Main content wrapper */
.comp-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Page title */
.comp-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #4DB8D9;
}

@media (min-width: 768px) {
  .comp-title {
    font-size: 1.75rem;
  }
}

/* Section titles - only FONT tags with size attribute */
font[size="+1"] {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2A9AC2;
  margin: 1.5rem 0 0.75rem;
}

font[size="+1"] b {
  font-size: inherit;
  color: inherit;
}

/* Result cards */
dl {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

dd {
  padding: 0.25rem 0;
  margin-left: 0;
}

dd:before {
  content: "";
}

/* Tables - responsive */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin: 1rem 0;
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

td, th {
  padding: 0.5rem;
  border: 1px solid #e0e0e0;
  text-align: center;
  vertical-align: middle;
}

th {
  background: #4DB8D9;
  color: white;
  font-weight: 600;
}

tr:nth-child(even) {
  background: #f8f9fa;
}

td[width="220"], td:first-child {
  text-align: left;
  min-width: 150px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  td[width="220"], td:first-child {
    min-width: 120px;
    font-size: 0.75rem;
  }
  
  table {
    font-size: 0.75rem;
  }
  
  td, th {
    padding: 0.35rem;
  }
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: #e0e0e0;
  margin: 2rem 0;
}

/* Links - only style anchors with href */
a[href] {
  color: #4DB8D9;
  text-decoration: none;
  transition: color 0.2s;
}

a[href]:hover {
  color: #2A9AC2;
  text-decoration: underline;
}

/* Anchor name tags should not be styled as links */
a[name]:not([href]) {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

/* Back to menu links */
a[href="#menu"],
a[href*="list"] {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.875rem;
}

a[href="#menu"]:hover,
a[href*="list"]:hover {
  background: #e0e0e0;
  text-decoration: none;
}

/* Footer */
.comp-footer {
  background: #333;
  color: #999;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
  font-size: 0.875rem;
}

.comp-footer a {
  color: #4DB8D9 !important;
}

.comp-footer a:hover {
  color: #7DD3E8 !important;
}

/* Hide old navigation */
a[href*="top.cgi"],
a[href*="../list.shtml"] {
  display: none;
}

/* Result links list */
.result-links {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.result-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  background: #f5f5f5;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}

.result-links a:hover {
  background: #4DB8D9;
  color: white;
  text-decoration: none;
}

.result-links br {
  display: none;
}

/* Pre tags */
pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.875rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* Menu section styling */
a[name="menu"] + font,
a[name="menu"] ~ dl {
  background: linear-gradient(135deg, #4DB8D9 0%, #7DD3E8 100%);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

a[name="menu"] ~ dl a {
  color: white !important;
  font-weight: 500;
}

a[name="menu"] ~ dl a:hover {
  color: #fff !important;
  text-decoration: underline;
}
