/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: #333;
  background-color: #f8f9fa;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* === Layout === */
.site-wrapper {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Header / Navigation === */
.site-header {
  background-color: #1a73e8;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* === Game Selector (ロト6/ロト7 탭) === */
.game-selector {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  flex-shrink: 0;
}

.game-tab {
  color: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.3);
}

.game-tab:hover {
  color: #fff;
  background-color: rgba(255,255,255,0.15);
  text-decoration: none;
}

.game-tab.active {
  color: #1a73e8;
  background-color: #fff;
  border-color: #fff;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background-color: rgba(255,255,255,0.2);
  text-decoration: none;
}

/* === Footer === */
.site-footer {
  background-color: #2c3e50;
  color: #ccc;
  padding: 32px 16px 24px;
  margin-top: 48px;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-group h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-group-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-group-links a {
  color: #ccc;
  font-size: 0.85rem;
}

.footer-group-links a:hover {
  color: #fff;
}

.footer-common {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #444;
  margin-bottom: 8px;
}

.footer-common a {
  color: #ccc;
  font-size: 0.85rem;
}

.footer-common a:hover {
  color: #fff;
}

.footer-common-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-common-sub a {
  color: #888;
  font-size: 0.8rem;
}

.footer-common-sub a:hover {
  color: #bbb;
}

.footer-copy {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #444;
  color: #888;
  font-size: 0.8rem;
}

/* === Page Title === */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a73e8;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid #1a73e8;
}

/* === Section === */
.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid #1a73e8;
}

/* === Lotto Ball Colors === */
.lucky-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: #fff;
}

.red { background-color: #ff4500; }
.orange { background-color: orange; }
.yellow { background-color: gold; }
.green { background-color: forestgreen; }
.blue { background-color: royalblue; }
.purple { background-color: purple; }
.pink { background-color: pink; color: #333; }

/* === Ad Placeholder === */
.ad-slot {
  margin: 16px 0;
  padding: 10px;
  background-color: #f0f0f0;
  text-align: center;
  min-height: 50px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: #1a73e8;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 24px;
    border-radius: 0;
    font-size: 1rem;
  }

  .header-inner {
    height: 52px;
  }

  .page-title {
    font-size: 1.3rem;
    margin: 24px 0 12px;
  }

  .footer-groups {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 1.05rem;
  }

  .game-tab {
    font-size: 0.8rem;
    padding: 3px 10px;
  }

  .lucky-number {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 14px;
  }
}
