/* 全体のスタイル */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #F0F8FF; /* スカイブルー系の背景 */
    color: #212121;
}





/* ✅ ヘッダー */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px; /* ✅ 左右の余白を確保 */
    background-color: white;
    border-bottom: 2px solid #87CEEB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 70px;
}
nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    flex-grow: 1; /* ✅ 余白を確保してボタンが詰まらないように */
}


/* ✅ ロゴ */
.logo-img {
    height: 30px;
    width: auto;
}

/* ✅ ボタンの共通スタイル */
.btn {
    display: inline-block;
    padding: 6px 18px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease-in-out;
}

/* ✅ ログイン（白抜き） */
.btn-outline {
    color: #4A90E2;
    border: 2px solid #4A90E2;
    background-color: transparent;
}

/* ✅ サインアップ（青） */
.btn-solid {
    background-color: #4A90E2;
    color: white;
    border: 2px solid #4A90E2;
}

@media (max-width: 600px) {
    header {
        width: 100%;
        padding: 12px 15px;
    }

    nav {
        display: flex;
        flex-direction: row;
        gap: 1px; /* ✅ 余白を少し縮める */
        justify-content: flex-end;
        max-width: 70%; /* ✅ ボタンが見切れないように幅を拡張 */
        flex-wrap: nowrap;
        margin-right: 25px; /* ✅ 右側の余白を確保 */
    }

    .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}



nav a {
    color: #4A90E2;
    text-decoration: none;
    font-size: 1.1em;
    margin-left: 20px;
}

nav a:hover {
    text-decoration: underline;
}

/* メインコンテンツ */
main {
    margin-top: 50px;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #4A90E2;
}

p {
    font-size: 1.3em;
    color: #555;
}

form {
    margin-top: 20px;
}

input[type="url"] {
    width: 80%;
    max-width: 500px;
    padding: 12px;
    border: 2px solid #87CEEB;
    border-radius: 8px;
    font-size: 1.2em;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ボタンの角を丸く */
.round-button {
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 1.2em;
    border: none;
    background-color: #4A90E2;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.round-button:hover {
    background-color: #357ABD;
    transform: scale(1.05);
}

/* 短縮URL表示部分 */
#shortened-url {
    margin-top: 20px;
}

.hidden {
    display: none !important; /* ✅ 影響がないか確認 */
}




/* ✅ フッター全体 */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #646464;
    border-top: 4px solid #87CEEB;
    color: white;
    font-size: 1em;
    width: 100%;
    position: relative;
    bottom: 0;
    flex-wrap: nowrap; /* ✅ 改行を防ぐ */
}

/* ✅ フッター左側（リンク） */
.footer-left {
    display: flex;
    gap: 15px; /* ✅ リンク間の余白 */
}

.footer-left a {
    color: white;
    text-decoration: none;
    white-space: nowrap; /* ✅ 改行を防ぐ */
    min-width: fit-content; /* ✅ 短縮URLでも適切な幅を確保 */
}

.footer-left a:hover {
    text-decoration: underline;
}

/* ✅ フッター右側（言語選択） */
.footer-right {
    position: relative;
    white-space: nowrap; /* ✅ 改行を防ぐ */
}

/* ✅ 言語ボタン */
#language-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

#language-btn img {
    width: 30px;
    height: 30px;
    margin-right: 10px; /* ✅ アイコン間の余白を統一 */
}

/* ✅ 言語メニュー */
#language-menu {
    position: absolute;
    right: 0;
    top: -50px;
    transform: translateY(-100%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    padding: 5px 0;
    display: none;
    z-index: 1000;
    white-space: nowrap; /* ✅ 言語メニューの改行を防ぐ */
}

/* ✅ 言語メニューのリンク */
#language-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap; /* ✅ 言語名の改行を防ぐ */
}

#language-menu a:hover {
    background: #f0f0f0;
}

/* ✅ モバイル用調整 */
@media (max-width: 600px) {
    footer {
        flex-direction: column; /* ✅ スマホでは縦に並べる */
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .footer-right {
        margin-top: 10px;
    }
}














/* 短縮結果全体のスタイル */
#result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 700px;
    margin: 20px auto;
}

/* クリアボタン */
.clear-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 14px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 18px;
    display: none;
    transition: background 0.3s ease;
}

.clear-button:hover {
    background-color: #cc0000;
}

/* 短縮結果のリスト */
#results-list {
    width: 100%;
}

/* 各短縮URLボックス（横並び） */
.shortened-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 2px solid #87CEEB;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* 各要素の共通スタイル */
.shortened-card span {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
}

.shortened-card p, .shortened-card a {
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 180px;
}

/* 短縮URL */
.shortened-url {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
    padding: 5px;
}

.shortened-url:hover {
    text-decoration: underline;
}

/* QRコード */
.qr-wrapper {
    display: flex;
    justify-content: center;
}

.qr-code {
    width: 50px;
    height: 50px;
    transition: transform 0.2s ease-in-out;
}

.qr-code:hover {
    transform: scale(1.1);
}


/* コピー用入力ボックス */
.shortened-input {
    width: 140px;
    padding: 6px;
    border: 2px solid #87CEEB;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    background-color: #f8f8f8;
    color: #333;
}

/* コピー用ボタン */
.copy-btn {
    padding: 6px 12px;
    border-radius: 14px;
    background-color: #4A90E2;
    color: white;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
}

.copy-btn:hover {
    background-color: #357ABD;
    transform: scale(1.05);
}

/* レスポンシブ対応（スマホ用） */
@media (max-width: 600px) {
    .shortened-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    .shortened-card p, .shortened-card a {
        max-width: 100%;
    }

    .qr-code {
        width: 60px;
        height: 60px;
    }

    .shortened-input {
        width: 100%;
        font-size: 0.9rem;
        padding: 8px;
    }

    .copy-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}







/* ✅ 短縮フォーム（URL入力欄とボタンをくっつける） */
#shorten-form {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    margin: 20px auto;
    gap: 0px; /* ✅ 隙間なし */
}

/* ✅ URL入力欄（右側の境界線を削除） */
#long-url {
    flex-grow: 1;
    padding: 12px;
    border: 2px solid #87CEEB;
    border-right: none; /* ✅ 右側の線を消す */
    border-radius: 8px 0 0 8px; /* ✅ 左側のみ角丸 */
    font-size: 1.2em;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    height: 48px; /* ✅ ボタンと高さを揃える */
    box-sizing: border-box; /* ✅ パディング込みのサイズ調整 */
}

/* ✅ 短縮ボタン（左側の境界線を削除） */
.round-button {
    height: 48px; /* ✅ 入力欄と高さを揃える */
    padding: 0 16px; /* ✅ 高さではなく、左右の余白のみ調整 */
    font-size: 1.2em;
    border: 2px solid #87CEEB;
    border-left: none; /* ✅ 左側の線を消す */
    border-radius: 0 8px 8px 0; /* ✅ 右側のみ角丸 */
    background-color: #4A90E2;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
    box-sizing: border-box; /* ✅ パディング込みのサイズ調整 */
}

.round-button:hover {
    background-color: #357ABD;
    transform: scale(1.05);
}

/* ✅ スマホ版 */
@media (max-width: 600px) {
    #shorten-form {
        width: 90%;
    }

    #long-url {
        font-size: 1rem;
        height: 42px; /* ✅ スマホ時も高さを統一 */
        padding: 10px;
    }

    .round-button {
        font-size: 1rem;
        height: 42px; /* ✅ 入力欄と高さを統一 */
        padding: 0 14px; /* ✅ 高さのズレを防ぐ */
    }
}





.copy-notification {
    position: absolute;
    top: 60px; /* H1の上に配置 */
    left: 50%;
    transform: translateX(-50%); /* 中央揃え */
    background-color: #4CAF50;
    color: white;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    width: fit-content;
    min-width: 120px;
    display: none;
    opacity: 0; /* 最初は透明 */
    transition: opacity 0.3s ease-in-out;
    z-index: 9999;
}

.copy-notification.show {
    display: block;
    opacity: 1;
}

