body {
    width: 600px; 
    margin: 0 auto; 
    padding: 20px; 
    font-family: Arial, Helvetica, sans-serif;
}

header {
    text-align: center;
}

.input-container {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    
    gap: 10px; 
}

.input-textarea {
    position: relative; 
    display: inline-block;
}

.input-textarea textarea {
    width: 600px; 
    height: 150px; 
    font-size: 18px; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    resize: none;

    padding-bottom: 40px;
}

textarea::placeholder {
    white-space: pre-wrap; 
    color: #888; 
    font-size: 18px; 
    line-height: 1.7;
    padding-top: 0px;
}

.input-button {
    width: 100%; 
}

.prompt button {
    width: 600px; 
    padding: 10px;
    font-size: 18px; 
    background-color: #4CAF50;
    color: white; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}

.loading{
    width: 600px;
    padding: 10px;
    text-align: center;
    background-color: #4CAF50;
    color: white; 
    border: none; 
    border-radius: 4px; 
}

.prompt button:hover {
    background-color: #45a049; 
}

#clearButton {
    position: absolute;
    right: 15px;
    bottom: 10px;
    background: #ccc;
    color: black;
    border: none;
    border-radius: 4px;
    width: auto;
    height: 30px;
    font-size: 14px;
    padding: 5px 10px;
    cursor: pointer;
}

#clearButton:hover {
    background: rgba(0, 0, 0, 0.4);
}

.output-container {
    margin-top: 10px;  
}

.output-wrapper {
    position: relative; 
    display: inline-block;
    width: 600px;
    border: 1px solid #ccc;
    height: 240px; 
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden; 
    padding-bottom: 40px;
}

.output-textarea {
    display: block;
    text-align: left;
    padding: 10px;
    font-size: 18px;
    height: 220px; 
    overflow-y: auto; 
    padding-bottom: 20px;
}

.button-container {
    position: absolute;
    bottom: 5px; 
    right: 10px;
    background-color: white;
    padding: 5px;
    border-radius: 4px;
    z-index: 10; 
}

#copyButton {
    background-color: rgba(76, 175, 80, 0.8); 
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#copyButton:hover {
    background-color: #45a049;
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.copy-message {
    display: none;
    margin-right: 10px; 
    color: green;
    font-weight: bold;
    font-size: 14px;
}

.copy-message-input {
    margin-left: 10px;
}



h1 {
    font-size: 18px;
}

h2 {
    font-size: 18px;
}
h3 {
    font-size: 16px;
}

.create-introduction {
    width: 140px;
    padding: 2px 8px;
    margin-right: 6px;
    font-size: 14px;
    text-align: center; 
    background-color: #4CAF50;
    color: white; 
    border: none; 
    border-radius: 2px; 
    display: inline-block;
}


.example {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding-left: 5px;
    margin-bottom: 10px;
}

#adBannerTop {
    text-align: center;
    margin-top: 10px;
}

.ad-space {
    height: 40px;
}



/* 男性向け広告のスタイル */
.adBannerTop.male a,
.adBannerBottom.male a {
    color: #1976D2; /* 男性向け：濃い青 */
    text-decoration: none;
}

.adBannerTop.male a:hover,
.adBannerBottom.male a:hover {
    color: #0D47A1; /* ホバー時はさらに濃い青 */
    text-decoration: underline;
}

/* 女性向け広告のスタイル */
.adBannerTop.female a,
.adBannerBottom.female a {
    color: #e91e63; /* 女性向け：鮮やかなピンク */
    text-decoration: none;
}

.adBannerTop.female a:hover,
.adBannerBottom.female a:hover {
    color: #c2185b; /* ホバー時は少し濃いめのピンク */
    text-decoration: underline;
}

summary {
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
}

details[open] {
    background-color: #fff;
    border: 1px solid #aaa;
}

details {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.instructions {
    margin-top: 20px;
}

.one-line-ad_top {
    text-align: center;
    font-size: 16px;
}

.one-line-ad_bottom {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

.gender-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

input[type="range"] {
    appearance: none; /* まずは標準のスタイル適用 */
    -webkit-appearance: none; /* Safari & Chrome */
    -moz-appearance: none; /* Firefox */
    width: 70px;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
    cursor: pointer;
}

/* スライダーのつまみ（ノブ）のデザイン */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    background: #fff;
    border: 2px solid #999;
    border-radius: 50%;
    cursor: pointer;
    /* transition: 0.3s; */
    transition: transform 0.2s ease-in-out;
}

input[type="range"]::-moz-range-thumb {
    width: 26px;
    height: 26px;
    background: #fff;
    border: 2px solid #999;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

/* スライダーの値によって色を変更 */
input[type="range"][value="0"] {
    background: #2196F3; /* 男性：青 */
}

input[type="range"][value="2"] {
    background: #ff69b4; /* 女性：ピンク */
}

/* デフォルトでPC広告を表示、モバイル広告を非表示 */
.pc-only { display: block; }
.mobile-only { display: none; }

@media screen and (max-width: 600px) {
    body {
        width: 94%;
        padding: 10px;
    }
    .input-container, .input-textarea, #user_input, .prompt button, .loading {
        width: 100%;
    }
    .button-container {
        right: 5px;
        
    }

    .instructions {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .input-textarea textarea {
        font-size: 20px;
        height: 120px;
        line-height: 1.8;
        padding-top: 0px;
    }

    textarea::placeholder {
        white-space: pre-wrap; 
        color: #888; 
        font-size: 20px; 
        line-height: 1.7;
    }

    .ad-space {
        height: 40px;
        margin-top: 5px;
    }

    .output-wrapper{
        width: 100%;
        height: 320px;
        margin-top: 5px;
    }

    .output-textarea {
        height: 300px;
        font-size: 20px;   
    }

    .create-introduction {
        width: 140px;
        padding: 2px 10px;
        margin-right: 4px;
        font-size: 14px;
        text-align: center; 
        background-color: #4CAF50;
        color: white; 
        border: none; 
        border-radius: 2px; 
        display: inline-block;
    }

    .one-line-ad_top {
        font-size: 18px;
    }

    .adBannerBottom a {
        font-size: 18px;
    }

    .pc-only { display: none; }
    .mobile-only { display: block; }
}