/* Main Stylesheet - Web Display */

:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --border-color: #e5e7eb;
  --accent-color: #10b981;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.site-header h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.print-button {
  background: white;
  color: var(--primary-color);
  border: none;
  padding: 12px 24px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

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

/* Navigation */
.main-nav {
  background: #f3f4f6;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.main-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.main-nav a:hover {
  background-color: #e5e7eb;
  text-decoration: none;
}

.footer-nav {
  margin: 15px 0;
  font-size: 0.9em;
}

.footer-nav a {
  color: var(--primary-color);
  padding: 0 8px;
}

/* Typography */
h1, h2, h3, h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--text-color);
}

h1 { font-size: 2.5em; }
h2 {
  font-size: 2em;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 10px;
}
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }

p {
  margin-bottom: 1em;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* QR Code Styling */
.link-with-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.qr-wrapper {
  display: inline-block;
  vertical-align: middle;
}

.qr-code {
  display: inline-block;
  width: 60px;
  height: 60px;
  padding: 4px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Lists */
ul, ol {
  margin-left: 2em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.5em;
}

/* Sections */
.section {
  margin-bottom: 3em;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: #f3f4f6;
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
  text-align: center;
  color: #6b7280;
  font-size: 0.9em;
}

/* Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Image Styles */
figure {
  margin: 20px 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

figcaption {
  text-align: center;
  font-size: 0.9em;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

/* Print page — cover and key rules (screen view) */
.cover-page {
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cover-header {
  text-align: center;
}

.cover-title {
  font-size: 2.2em;
  margin: 0 0 6px;
  border: none;
  padding: 0;
}

.cover-subtitle {
  font-size: 1em;
  color: #6b7280;
  margin: 0;
}

.cover-welcome {
  border-left: 4px solid var(--accent-color);
  padding-left: 1em;
  font-style: italic;
  color: #374151;
  margin: 0;
}

.key-rules {
  border: 2px solid var(--text-color);
  border-radius: 8px;
  padding: 20px 24px;
}

.key-rules-heading {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  color: #6b7280;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.key-rule {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  page-break-inside: avoid;
}

.key-rule:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.key-rule-number {
  font-size: 2em;
  font-weight: 900;
  line-height: 1;
  min-width: 1.4em;
  text-align: right;
  color: var(--accent-color);
  flex-shrink: 0;
}

.key-rule-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 3px;
}

.key-rule-content strong {
  font-size: 1em;
  font-weight: 700;
}

.key-rule-content span {
  font-size: 0.9em;
  color: #4b5563;
}

.cover-footer {
  text-align: right;
  font-size: 0.8em;
  color: #9ca3af;
  margin: 0;
}

.full-guide-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 20px;
  color: #9ca3af;
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.full-guide-divider::before,
.full-guide-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.detail-section {
  margin-bottom: 3em;
}

.detail-section-title {
  font-size: 1.6em;
  color: #6b7280;
  font-weight: 400;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 1em;
}

/* Utility Classes */
.no-print {
  display: block;
}

.print-only {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .site-header h1 {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.5em;
  }

  .qr-code {
    width: 50px;
    height: 50px;
  }
}
