/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 2rem;
    background-color: #f4f7f9;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #0a2540;
}

p {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
}

/* 言語セレクター */
.controls {
    text-align: center;
    margin-bottom: 1.5rem;
}

.controls label {
    margin-right: 0.5rem;
    font-weight: bold;
}

#language-selector {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: white;
}

/* 入力/出力エリア */
.container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }
}

.editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
    text-align: center;
}

textarea {
    width: 100%;
    height: 50vh;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
}

#output-code {
    background-color: #e9ecef;
}

/* ▼▼▼ ボタンのスタイルを修正 ▼▼▼ */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2列のグリッドを作成 */
    gap: 1rem; /* ボタン間の隙間 */
    max-width: 700px; /* ボタンエリア全体の最大幅 */
    margin: 1.5rem auto 0 auto; /* 上マージンと、左右中央揃え */
}

/* 画面幅が600px以下の場合は1列にする（スマホ対応） */
@media (max-width: 600px) {
    .button-grid {
        grid-template-columns: 1fr;
    }
}

.action-btn, .utility-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.action-btn {
    background-color: #007bff;
    color: white;
}
.action-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.utility-btn {
    background-color: #6c757d;
    color: white;
}
.utility-btn:hover {
    background-color: #5a6268;
}

/* フッター (免責事項) */
.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
}

.site-footer p {
    margin: 0;
    line-height: 1.6;
}