/* 基本的なスタイルリセット */
body, h1, p, textarea, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', 'Arial', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
}

body {
    background-color: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

/* 全体のレイアウト */
header, main, footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

main {
    padding-bottom: 0; /* mainの下の余白をなくす */
}

#result-area {
    margin-bottom: 20px; /* 結果表示エリアの下に少し余白を持たせる */
}

header {
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

h1 {
    color: #005a9c;
    font-size: 2em;
}

main p {
    margin-bottom: 15px;
    text-align: center;
}

/* 入力フォーム */
textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 15px;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* タブUIのスタイル */
#tabs-container {
    margin-top: 20px;
}

#tab-buttons {
    display: flex;
    border-bottom: 2px solid #dee2e6;
}

.tab-button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f3f5;
    border: 1px solid #ced4da;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
    transition: background-color 0.3s, color 0.3s;
}

.tab-button.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.tab-content {
    padding: 20px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
}

.tab-content h2 {
    font-size: 1.6em;
    color: #005a9c;
    margin-top: 0; /* タブコンテンツ内の最初のh2のマージンを調整 */
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.tab-content .advice-text {
    line-height: 1.8;
    margin-bottom: 20px;
}

.tab-content h3 {
    font-size: 1.3em;
    color: #343a40;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.copy-button {
    display: block;
    width: fit-content;
    margin: 10px 0 20px 0;
    padding: 8px 15px;
    font-size: 0.9em;
    color: #fff;
    background-color: #28a745; /* 緑色 */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Amazonリンクのカードスタイルは変更なし */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* カード間のスペース */
}

.tool-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    padding: 15px;
    width: calc(33.333% - 10px); /* 3列表示を基本とする */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tool-card .icon {
    font-size: 2.5em; /* アイコンサイズ */
    margin-bottom: 10px;
    color: #007bff;
}

.tool-card .tool-name {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.tool-card a {
    display: block;
    padding: 8px 12px;
    background-color: #ff9900;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: auto; /* ボタンを下に配置 */
}

.tool-card a:hover {
    background-color: #e68a00;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tool-card {
        width: calc(50% - 8px); /* 2列表示 */
    }
}

@media (max-width: 480px) {
    .tool-card {
        width: 100%; /* 1列表示 */
    }
}

/* フッター */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 10px 20px; /* 上下を少し減らす */
    border-top: 1px solid #e0e0e0;
    font-size: 0.8em;
    color: #666;
    white-space: nowrap; /* テキストの折り返しを防ぐ */
    line-height: 1.2; /* 行の高さを調整 */
}

/* フィードバックセクション */
.feedback-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.feedback-section h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #495057;
}

.feedback-button {
    display: inline-block;
    width: auto;
    padding: 8px 15px; /* パディングを少し減らす */
    margin: 0 5px; /* マージンを少し減らす */
    font-size: 0.9em; /* フォントサイズを少し小さくする */
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap; /* ボタン内のテキストの折り返しを防ぐ */
}

.feedback-button.good {
    background-color: #e7f5ec;
    color: #28a745;
    border: 1px solid #28a745;
}

.feedback-button.good:hover {
    background-color: #28a745;
    color: #fff;
}

.feedback-button.bad {
    background-color: #fbe9eb;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.feedback-button.bad:hover {
    background-color: #dc3545;
    color: #fff;
}

.feedback-thanks p {
    text-align: center;
    font-weight: bold;
    color: #28a745;
    margin-top: 20px;
}

/* フィードバックコメントフォーム */
.feedback-form {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.feedback-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-bottom: 10px;
}

.feedback-form button {
    display: inline-block;
    width: auto;
    padding: 10px 20px;
    margin-right: 10px;
    font-size: 0.9em;
    border-radius: 5px;
}

.feedback-form .submit-feedback {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}
.feedback-form .submit-feedback:hover {
    background-color: #0056b3;
}

.feedback-form .cancel-feedback {
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid #ced4da;
}
.feedback-form .cancel-feedback:hover {
    background-color: #e2e6ea;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }
    button {
        font-size: 1em;
    }
    /* フィードバックボタンのモバイル調整 */
    .feedback-button {
        display: block; /* モバイルではブロック要素にして縦に並べる */
        width: calc(100% - 10px); /* 親要素の幅に合わせる */
        margin: 5px auto; /* 中央寄せ */
        font-size: 0.9em;
    }
}

/* 順序付きリストのスタイル */
.advice-text ol {
    list-style-type: none; /* デフォルトの数字を非表示 */
    counter-reset: my-awesome-counter; /* カウンターをリセット */
    padding-left: 0; /* デフォルトのパディングを削除 */
    margin-left: 20px; /* インデント */
}

.advice-text ol li {
    counter-increment: my-awesome-counter; /* カウンターをインクリメント */
    position: relative;
    margin-bottom: 8px;
    padding-left: 25px; /* 数字分のスペースを確保 */
}

.advice-text ol li::before {
    content: "①" counter(my-awesome-counter) " "; /* ①とカウンターを表示 */
    position: absolute;
    left: 0;
    color: #007bff; /* 数字の色 */
    font-weight: bold;
}
