* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f7f7f7;
}

.header-container {
  margin-bottom: 30px;
  text-align: center;
}

.main-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #2980b9;
}

.event-date {
  font-size: 18px;
  margin-bottom: 20px;
}

.selection-box {
  background-color: #fff;
  margin: 10px 0;
  border-radius: 5px;
  overflow: hidden;
}

.selection-title {
  padding: 15px;
  font-size: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.dropdown-container {
  padding: 10px 15px;
}

.category-dropdown {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

.start-time-info {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.start-time {
  color: #e74c3c;
  font-weight: bold;
}

.results-heading {
  text-align: center;
  margin: 30px 0 20px;
  font-size: 24px;
  font-weight: bold;
  position: relative;
}

.results-heading:after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: #333;
  margin: 10px auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 5px;
  overflow: hidden;
}

.results-table th, .results-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.results-table th {
  font-weight: bold;
  color: #333;
  background-color: #f5f5f5;
}

.results-table tr:hover {
  background-color: #f9f9f9;
}

.detail-button {
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.detail-button:hover {
  background-color: #0d62d1;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #2980b9;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
}

.runner-info {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.runner-info-item {
  width: 50%;
  margin-bottom: 20px;
  padding-right: 20px;
}

.info-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.info-value {
  font-size: 18px;
  font-weight: bold;
}

.time-highlight {
  font-size: 24px;
  color: #e74c3c;
}

/* 記録セクション */
.time-section {
  width: 100%;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.time-row {
  display: flex;
  gap: 20px;
}

.time-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.time-section-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.help-icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.2s;
}

.help-icon-button:hover {
  color: #666;
}

.time-help-box {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.time-help-box p {
  margin-bottom: 8px;
}

.time-help-box p:last-child {
  margin-bottom: 0;
}

.time-row .runner-info-item {
  flex: 1;
  text-align: center;
}

@media (max-width: 768px) {
  .time-row .runner-info-item {
    text-align: left;
  }
}

.section-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.result-image {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
}

.download-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.download-button.pdf {
  background-color: #e74c3c;
}

.download-button:hover {
  background-color: #2980b9;
}

.download-button.pdf:hover {
  background-color: #c0392b;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
  .runner-info-item {
    width: 100%;
  }
  
  .download-buttons {
    flex-direction: column;
  }
}


/* SNSシェアボタンのスタイル */
.share-buttons-container {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 25px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.share-icon {
  width: 20px;
  height: 20px;
}

.share-twitter {
  background-color: #1DA1F2;
}

.share-twitter:hover {
  background-color: #0d8ecf;
}

.share-facebook {
  background-color: #3b5998;
}

.share-facebook:hover {
  background-color: #2d5f9a;
}

.share-line {
  background-color: #00c300;
}

.share-line:hover {
  background-color: #00b900;
}

.share-hatena {
  background-color: #00a4de;
}

.share-hatena:hover {
  background-color: #0095ce;
}

.copy-link-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.url-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
}

.copy-button {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.copy-button:hover {
  background-color: #2980b9;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .share-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .copy-link-container {
    flex-direction: column;
  }
  
  .copy-button {
    width: 100%;
  }
}
