/* 顔文字メーカー・顔文字辞典 v1 - 2026-07-25 */

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    text-align: center;
}

#footer a, label { line-height: 200%; }
.fixed { height: 375px; }
p a { font-size: 120%; }

@media screen and (max-device-width: 480px) {
    h1 { font-size: 20px; }
    div#container { width: 95%; font-size: 145%; }
}

/* カテゴリナビゲーション */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-nav a {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.2s;
}

.category-nav a:hover,
.category-nav a.active {
    background: #e91e8c;
    color: #fff;
    border-color: #e91e8c;
}

/* 顔文字リスト */
.kaomoji-list {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    max-width: 720px;
    text-align: left;
}

.kaomoji-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #f3c6de;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.kaomoji-item:hover {
    border-color: #e91e8c;
    box-shadow: 0 4px 12px rgba(233,30,140,0.15);
}

.kaomoji-text {
    font-size: 1.4em;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 55%;
    flex-shrink: 0;
}

.kaomoji-meta {
    flex-grow: 1;
    min-width: 0;
}

.kaomoji-desc {
    display: block;
    font-size: 0.8em;
    color: #666;
}

.kaomoji-tags { display: block; margin-top: 2px; }

.kaomoji-tag {
    display: inline-block;
    font-size: 0.75em;
    color: #b0176f;
    background: #fdeef6;
    border-radius: 10px;
    padding: 1px 8px;
    margin: 1px 2px 1px 0;
    text-decoration: none;
}

.kaomoji-tag:hover, .kaomoji-tag.active {
    background: #e91e8c;
    color: #fff;
}

.copy-btn {
    flex-shrink: 0;
    background: #e91e8c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover { background: #b0176f; }
.copy-btn.copied { background: #28a745; }

/* タグクラウド */
.tag-cloud {
    margin: 20px auto;
    max-width: 720px;
}

.tag-cloud .kaomoji-tag {
    font-size: 0.95em;
    padding: 5px 12px;
    margin: 3px;
}

.tag-cloud .cnt { font-size: 0.75em; opacity: 0.7; }

/* 検索ボックス */
.kaomoji-search {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 480px;
}

.kaomoji-search input {
    flex-grow: 1;
    padding: 10px 14px;
    font-size: 1em;
    border: 2px solid #f3c6de;
    border-radius: 8px;
}

.kaomoji-search input:focus {
    outline: none;
    border-color: #e91e8c;
}

.kaomoji-search button {
    background: #e91e8c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

.kaomoji-search button:hover { background: #b0176f; }

/* カテゴリカード一覧 */
.category-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
    max-width: 780px;
    padding: 0;
    list-style: none;
}

.category-cards li { display: block; }

.category-cards a {
    display: block;
    background: linear-gradient(135deg, #fff0f8 0%, #fff8fc 100%);
    border: 1px solid #f3c6de;
    border-radius: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    min-width: 130px;
}

.category-cards a:hover {
    transform: translateY(-2px);
    border-color: #e91e8c;
    box-shadow: 0 4px 12px rgba(233,30,140,0.15);
}

.category-cards .cat-sample {
    display: block;
    font-size: 1.3em;
    margin-bottom: 4px;
    white-space: nowrap;
}

.category-cards .cat-name { font-weight: bold; }
.category-cards .cat-cnt { font-size: 0.8em; color: #999; margin-left: 4px; }

/* 顔文字メーカー */
.maker {
    max-width: 720px;
    margin: 20px auto;
    background: linear-gradient(135deg, #fff0f8 0%, #f8fbff 100%);
    border: 2px solid #f3c6de;
    border-radius: 16px;
    padding: 20px;
}

.maker-preview {
    background: #fff;
    border: 2px dashed #e91e8c;
    border-radius: 12px;
    font-size: 2.2em;
    padding: 24px 12px;
    margin-bottom: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

.maker-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.maker-actions button {
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.maker-copy { background: #e91e8c; color: #fff; }
.maker-copy:hover { background: #b0176f; }
.maker-copy.copied { background: #28a745; }
.maker-random { background: #fff; color: #e91e8c; border: 2px solid #e91e8c !important; }
.maker-random:hover { background: #fdeef6; }

.maker-part-group { margin-bottom: 10px; text-align: left; }

.maker-part-label {
    display: inline-block;
    font-size: 0.85em;
    font-weight: bold;
    color: #b0176f;
    width: 3.5em;
    vertical-align: top;
    padding-top: 8px;
}

.maker-part-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    width: calc(100% - 4.5em);
}

.maker-part-buttons button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1em;
    cursor: pointer;
    min-width: 42px;
    transition: all 0.15s;
}

.maker-part-buttons button:hover { border-color: #e91e8c; }

.maker-part-buttons button.selected {
    background: #e91e8c;
    color: #fff;
    border-color: #e91e8c;
}

/* コピー完了トースト */
#copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 167, 69, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 1em;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#copy-toast.show { opacity: 1; }

.no-results {
    padding: 40px;
    text-align: center;
    color: #666;
}

@media screen and (max-device-width: 480px) {
    .kaomoji-item { flex-wrap: wrap; }
    .kaomoji-text { max-width: 100%; font-size: 1.25em; }
    .maker-preview { font-size: 1.6em; }
    .maker-part-label { width: 100%; padding-top: 0; }
    .maker-part-buttons { width: 100%; }
}
