body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #007bff;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #333;
}

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

section {
    flex: 1;
    min-width: 45%; /* 2カラム表示のための調整 */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fcfcfc;
}

/* 使い方ガイドセクション */
.instructions-section {
    background-color: #e6f7ff; /* 明るい青の背景 */
    border-color: #91d5ff; /* 少し濃い青のボーダー */
    flex-basis: 100%; /* フル幅に表示 */
    order: -1; /* 常に一番上に表示 */
}

.instructions-section h2 {
    color: #0056b3; /* 青系の見出し色 */
    text-align: center;
    margin-bottom: 15px;
}

.instructions-section ol {
    padding-left: 25px;
    margin-bottom: 15px;
}

.instructions-section ol li {
    margin-bottom: 8px;
}

.send-mail-link {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

.send-mail-link a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.send-mail-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}


/* エディタセクション */
.editor-section textarea {
    width: 100%;
    height: 400px; /* エディタの高さ */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
}

#get-html-button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-top: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#get-html-button:hover {
    background-color: #218838;
}

/* 出力セクション */
.tabs {
    display: flex;
    margin-bottom: 10px;
}

.tab-button {
    padding: 10px 15px;
    border: none;
    background-color: #e9ecef;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tab-button.active {
    background-color: #f8f9fa;
    border-bottom: 2px solid #007bff;
    font-weight: bold;
}

.tab-button:hover:not(.active) {
    background-color: #dee2e6;
}

.tab-content {
    display: none;
    border: 1px solid #ddd;
    border-top: none;
    padding: 15px;
    min-height: 300px;
}

.tab-content.active {
    display: block;
}

#generated-html-code {
    white-space: pre-wrap; /* 改行を保持 */
    word-break: break-all; /* 長い文字列の折り返し */
    background-color: #eee;
    padding: 10px;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.copy-button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-button:hover {
    background-color: #0056b3;
}

#preview-iframe {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    background-color: white;
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 20px;
    background-color: #343a40;
    color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    main {
        flex-direction: column;
        padding: 10px;
    }
    section {
        min-width: 100%;
    }
}