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

body {
   font-family: 'Noto Sans JP', sans-serif;
   background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
   color: #333;
   line-height: 1.6;
   min-height: 100vh;
   margin: 0;
   padding: 0;
   position: relative;
   overflow-x: hidden;
   width: 100%;
}

body::before {
   content: '';
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: 
       linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 100%),
       radial-gradient(at 50% 0%, rgba(255,255,255,.2) 0%, transparent 50%);
   pointer-events: none;
   z-index: 0;
}

.javago-main {
   width: 100%;
   margin: 0;
   padding: 0;
   position: relative;
   z-index: 1;
}

.top-banner {
   background: linear-gradient(135deg, 
       #1B4C8C 0%, 
       #2864B4 50%,
       #3373C4 100%);
   padding: 60px 40px;
   margin: 0;
   position: relative;
   overflow: hidden;
   display: flex;
   align-items: center;
   justify-content: center;
   min-height: 500px;
   width: 100%;
}

.top-banner::before {
   content: '';
   position: absolute;
   width: 100%;
   height: 100%;
   background: 
       radial-gradient(circle at 10% 20%, rgba(255,255,255,0.05) 1px, transparent 1px),
       radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05) 1px, transparent 1px);
   background-size: 20px 20px;
   animation: float 20s linear infinite;
}

.top-banner::after {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: linear-gradient(45deg,
       rgba(255,255,255,0.05) 0%,
       rgba(255,255,255,0) 100%);
   mix-blend-mode: overlay;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    color: white;
    position: relative;
    z-index: 2;
}

.banner-left {
    flex: 1;
}

.banner-right {
    flex: 1;
    max-width: 500px;
}

.main-title {
   font-size: 3rem;
   font-weight: 700;
   letter-spacing: 0.02em;
   background: linear-gradient(to right, #ffffff, #e6f3ff);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   text-shadow: 0 2px 4px rgba(0,0,0,0.1);
   margin-bottom: 1rem;
   line-height: 1.4;
}

.sub-title {
   font-size: 1.3rem;
   opacity: 0.95;
   font-weight: 500;
   letter-spacing: 0.01em;
   padding: 0.5em 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stats-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 15px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.stats-number {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #ffffff, #e6f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.stats-label {
    font-size: 1.1rem;
    color: white;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.stats-calculating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.calculating-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.calculating-text {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.dot {
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: dotPulse 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.legal-links {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 0;
    margin-top: -30px;
    margin-bottom: 40px;
}

.legal-links-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.legal-button {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legal-button:hover {
    background-color: #f8f9fa;
    border-color: #999;
}

.legal-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    stroke: #666;
}

.category-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
   gap: 30px;
   margin: 40px auto;
   padding: 0 40px;
   max-width: 1600px;
   width: 100%;
}

.category-item {
   background: white;
   border-radius: 8px;
   padding: 40px;
   box-shadow: 0 4px 12px rgba(0,0,0,0.05);
   transition: all 0.3s ease;
   position: relative;
   display: flex;
   flex-direction: column;
   height: 100%;
   border: 1px solid #e5e9f0;
}

.category-item:hover {
   transform: translateY(-5px);
   box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.category-icon svg {
    width: 44px;
    height: 44px;
    stroke: #1B4C8C;
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

.glossary-icon svg {
    stroke: #1B4C8C;
}

.usage-icon svg {
    stroke: #2864B4;
}

.practice-icon svg {
    stroke: #3373C4;
}

.category-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(27, 76, 140, 0.1) 0%,
        rgba(40, 100, 180, 0.1) 50%,
        rgba(51, 115, 196, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-item:hover .category-icon::before {
    opacity: 1;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #1B4C8C;
  position: relative;
  display: inline-block;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: #2864B4;
  border-radius: 2px;
}

.category-description {
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: auto;
  flex-grow: 1;
}

.button-wrapper {
  text-align: right;
  margin-top: 2rem;
}

.learn-more {
  background: #1B4C8C;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.learn-more:hover {
  background: #2864B4;
  transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .banner-content {
        padding: 0 30px;
        gap: 40px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        padding: 0 30px;
    }

    .stats-grid {
        gap: 20px;
        padding: 25px;
    }

    .stats-number {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .top-banner {
        padding: 50px 20px;
        text-align: center;
        min-height: 400px;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 30px;
        align-items: center;
    }

    .banner-right {
        width: 100%;
        max-width: 100%;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .sub-title {
        font-size: 1.1rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
        margin: 30px auto;
    }

    .category-item {
        padding: 30px;
    }

    .legal-links-container {
        flex-direction: column;
        padding: 0 20px;
    }

    .legal-button {
        justify-content: center;
    }

    .stats-grid {
        gap: 15px;
        padding: 20px;
    }

    .stats-item {
        padding: 15px;
    }

    .stats-number {
        font-size: 2rem;
    }

    .stats-label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .top-banner {
        padding: 40px 20px;
        min-height: 300px;
    }

    .main-title {
        font-size: 1.8rem;
    }

    .sub-title {
        font-size: 1rem;
    }

    .category-title {
        font-size: 1.3rem;
    }
}
.stats-wrapper {
    position: relative;
    text-align: center;
}

.stats-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stats-label {
    position: relative;
    display: inline-block;
    padding-right: 20px; /* アイコンのための空白 */
}

.info-icon {
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    cursor: help;
    color: #666;
    transition: color 0.2s ease;
}

/* その他のスタイルは同じ */
.info-icon:hover {
    color: #333;
}

.stats-note {
    position: absolute;
    font-size: 11px;
    color: #666;
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: max-content;
    max-width: 200px;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.stats-label:hover + .stats-note,
.info-icon:focus + .stats-note {
    opacity: 1;
    visibility: visible;
}
