body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    min-height: 100vh;
    padding-top: 20px; /* Add some padding at the top */
}

.container {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px; /* Max width for larger screens */
    margin: 0 auto; /* Center horizontally using margin auto */
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.input-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
}

.input-section label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.input-section input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 10px; /* Space between input and button */
}



.output-section {
    margin-bottom: 20px;
    text-align: center; /* Center the QR code and header */
}

.output-section h2 {
    color: #333;
    margin-bottom: 10px;
}

#qrcode-container {
    margin: 0 auto; /* Center the container itself if it has a width */
    width: 256px; /* Match QR code size */
    height: 256px; /* Match QR code size */
    border: 1px solid #eee; /* Optional border for the QR code area */
    display: flex; /* For centering the img/canvas if qrcode.js creates one */
    justify-content: center;
    align-items: center;
}

#qrcode-container img,
#qrcode-container canvas {
    display: block; /* Remove extra space below canvas/img */
    margin: 0 auto; /* Ensure it's centered if it doesn't fill the container */
}

.error-message {
    color: #D8000C; /* Red for errors */
    background-color: #FFD2D2; /* Light red background */
    border: 1px solid #D8000C;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
}

.instructions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.instructions h3 {
    color: #444;
    margin-bottom: 10px;
}

.instructions p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 24px;
    }
    .input-section input[type="text"] {
        font-size: 14px;
    }
    #qrcode-container {
        width: 200px; /* Smaller QR code for small screens */
        height: 200px;
    }
    /* Adjust qrcode.js generated element size if necessary via JS for smaller screens */
}

/* ホームボタンのスタイル */
.home-header {
    background-color: #4CAF50;
    text-align: center;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1000;
    margin-bottom: 20px;
}

.home-button {
    display: inline-block;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* PC表示時のスタイル */@media (min-width: 768px) {    .home-header {        text-align: right;        padding: 10px 20px;        background-color: transparent;        box-shadow: none;    }        .home-button {        display: inline-block;        background-color: #4CAF50;        border-radius: 5px;        box-shadow: 0 2px 4px rgba(0,0,0,0.2);        margin-right: 10px;    }        .home-button:hover {        background-color: #45a049;        box-shadow: 0 4px 8px rgba(0,0,0,0.3);        transform: translateY(-2px);    }}
