/* Google FontsからPoppinsフォントをインポート */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* 全体のスタイル */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 上下に要素を配置 */
}

/* コンテナ全体のデザイン */
.container {
    background-color: white;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding:50px 20px 100px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    flex-grow: 1;
} 

/* 見出しと画像のレイアウト */
h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    position: relative;
}

h1::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 60px;
    background-image: url('https://bonworld.jp/img/profit_icon.png');
    background-size: cover;
    border-radius: 22%; /* 角丸をiPhoneのアイコン風に */
    margin-right: 15px; /* アイコンとテキストの間隔を調整 */
}

.container p{
    text-align: left;
    color: #333;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5rem;
    text-align: center;
    color: #333;
}

label {
    font-size: 0.9rem;
    color: #333;
    display: block;
    margin-top: 10px;
    text-align: left;
}

.input, .price-input, .currency-input, .rate-input {
    height: 45px;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #f0f8ff;
}

.price-input {
    width: 75%;  /* 販売価格の幅を調整 */
}

.currency-input {
    width: 25%;  /* 通貨単位の幅を調整 */
}

.ninety-percent {
    width: 95%;
}

.inline-input {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* 販売価格と通貨単位を1行に表示 */
}

.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ボタンのデザイン */
button.stylish-button {
    background: linear-gradient(45deg, #007BFF, #00d4ff); /* カラー変更 */
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    padding: 8px; /* ボタンの高さを小さく */
    font-size: 1rem; /* ボタン内のテキストも少し小さく */
    border-radius: 30px; /* 角を丸く */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

button.stylish-button:hover {
    background: linear-gradient(45deg, #0056b3, #00b0d4); /* ホバー時のカラー変更 */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 結果エリア全体のスタイル */
.result-box {
    margin-top: 20px;
    padding: 15px;
    border: 2px solid #4a90e2;
    border-radius: 10px;
    background-color: #f0f8ff;
    color: #333;
    text-align: left;
    width: 100%;
    box-sizing: border-box; /* 結果がはみ出さないように幅を正確に計算 */
    overflow-wrap: break-word; /* 長い単語がはみ出さないように折り返し */
}

.result-heading {
    color: #007bff;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px; /* 見出しと内容にスペースを追加 */
}

#results p {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #333;
}

#results span {
    font-weight: bold;
    color: #007bff;
    font-size: 1.3rem;
}

/* モバイル表示用の調整 */
@media screen and (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 50px 15px 100px;
    }

    .inline-input {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .price-input {
        width: 70%;  /* モバイルでも価格と通貨単位が1行に収まるように調整 */
    }

    .currency-input {
        width: 28%;  /* モバイルでも通貨単位の幅を調整 */
    }

    button.stylish-button {
        font-size: 1rem; /* モバイルでも適切なテキストサイズ */
        padding: 8px; /* モバイルでもボタンの高さを小さく */
    }

    .result-box {
        font-size: 1.2rem;
    }
}
