body {
    margin: 0;
    padding: 0;
    background-color: #172F4B;
    color: #fff;
    min-height: 100vh;
    font-family: 'Noto Sans JP', sans-serif;
}

.menu-block {
    background-color: #1a3a5a;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin: 0 auto 20px;
    max-width: 1450px;
    border-radius: 5px;
}

.menu-container {
    padding: 0 20px;
}

.menu-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    gap: 30px;
}

.menu-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
    position: relative;
}

.menu-links a:hover {
    color: #3498db;
}

.menu-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.menu-links a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .menu-links {
        flex-wrap: wrap;
        gap: 15px;
        padding: 0 10px;
    }
    
    .menu-links li {
        margin: 5px 0;
    }
}

.header-container {
    margin: 20px 0 0 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.content-container {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 clamp(10px, 5vw, 80px);
    box-sizing: border-box;
}

.color-changing-header {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    margin: 0 0 3px 0;
    align-items: center;
    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
    border-radius: 5px;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.color-changing-header h1 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 2.5rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 0 20px;
    margin: 0;
}

.main-content {
    background-color: #ffffff;
    min-height: 200px;
    padding: 5px 0 15px; 
    color: #333333;
    border-radius: 5px;
    margin-top: 3px; 
}

.main-content h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.main-content p {
    font-size: 1.2em;
    line-height: 1.5;
    text-align: center;
    max-width: 800px;
    margin: 5px auto;
    white-space: pre-line;
}

.second-block, .fourth-block, .fifth-block {
    background-color: #f8f9fa;
    min-height: 120px;
    padding: 15px 0;
    color: #333333;
    border-radius: 5px;
    margin-top: 3px;
}

.block-content {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
}

.text-content {
    width: 100%;
    padding: 0 20px;
    text-align: left;
    box-sizing: border-box;
}

.image-container {
    flex: 0 0 40%;
    min-width: 250px;
    max-width: 500px;
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    border-radius: 5px;
    overflow: hidden;
    padding: 10px;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.second-block .text-content,
.third-block .text-content,
.fourth-block .text-content,
.fifth-block .text-content {
    padding: 0 20px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.second-block .text-content:last-child {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .second-block .text-content[style*="display: flex"] {
        flex-direction: column;
    }
    
    .image-container {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 20px;
        min-width: 100%;
    }
    
    .second-block .text-content:last-child {
        flex: 0 0 100%;
    }
}

.second-block h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.second-block p, .third-block p, .fourth-block p, .fifth-block p {
    font-size: 1.3em;
    line-height: 1.5;
    text-align: left;
    max-width: none;
    width: 1100px;
    margin: 5px 0;
    white-space: pre-line;
}

.third-block {
    background-color: #ffffff;
    min-height: 200px;
    padding: 15px 0;
    color: #333333;
    border-radius: 5px;
    margin-top: 3px;
}

.third-block h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.fourth-block h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.section-title-bar {
    background-color: #1a3a5f;
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin: 0 20px;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 8px;
}

.second-block, .third-block, .fourth-block, .fifth-block {
    margin: 3px 0;
    border-radius: 4px;
    overflow: hidden;
}

.nyan {
    background-color: #ffffff;
    min-height: 1px;
    padding: 15px 0;
    color: #333333;
    border-radius: 5px;
    margin-top: 3px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgb(52, 152, 219);
    color: white;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 24px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 10px;
    display: none;
    z-index: 9999;
}

.back-to-top:hover {
    background-color: rgb(41, 128, 185);
}

footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    margin-top: 20px;
}

footer p {
    margin: 0;
}

.spacer {
    height: 20px;
}

.download-button {
    background-color: rgb(52, 152, 219);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    margin: 0px auto;
    padding: 10px 20px;
}

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