/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    text-align: center;
    padding: 40px 0;
}

.header-description{
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-left: auto;
    margin-right: auto;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* カテゴリセクション */
.category-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-controls {
    display: flex;
    gap: 8px;
}

.control-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.control-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.control-button:active {
    transform: translateY(1px);
}

.category-grid {
    display: grid;
    gap: 6px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0 4px 6px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    user-select: none; /* テキスト選択を防ぐ */
}

.category-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.category-item.checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.category-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.category-label {
    font-weight: 500;
    flex: 1;
    cursor: pointer;
    text-align: center;
    pointer-events: none; /* ラベルのクリックイベントを無効化 */
}

.category-count {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 400;
    pointer-events: none; /* カウントのクリックイベントを無効化 */
    width: 4em;
    text-align: center;
}

/* 絵文字セクション */
.emoji-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.emoji-card {
    background: rgba(255,255,255,0.95);
    border-radius: 24px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    position: relative;
}

.copy-button {
    position: absolute;
    top: 15px;
    right: 15px;
    color: black;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.0rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-button:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); */
}

.copy-button:active {
    transform: translateY(0);
}

.copy-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.emoji-display {
    margin-bottom: 30px;
}

.emoji {
    font-size: 8rem;
    display: block;
    margin-bottom: 20px;
}

.emoji-name {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    display: block;
}

.emoji-info {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.category-table {
    border-collapse: collapse;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
}

.category-table tr:last-child td {
    border-bottom: none;
}

.category-label {
    font-weight: 600;
    color: #495057;
    text-align: center;
    background: #e9ecef;
    min-width: 120px;
}

.category-value {
    font-weight: 500;
    color: #333;
    text-align: left;
    background: white;
    min-width: 200px;
}

/* コントロール */
.controls {
    display: flex;
    justify-content: center;
}


.next-button {
    background-color: #f9d423; /* 明るい黄色系 */
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
}

.next-button:active {
    transform: translateY(2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background-color: #eab308; /* より深い黄色（明度↓ 彩度↑） */
}

.next-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* フッター */
.footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .category-section {
        position: static;
    }

    .title {
        font-size: 2.5rem;
    }

    .emoji {
        font-size: 6rem;
    }

    .emoji-name {
        font-size: 1.5rem;
    }

    .emoji-card {
        padding: 30px 20px;
    }

    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .emoji {
        font-size: 4rem;
    }

    .emoji-name {
        font-size: 1.2rem;
    }

    .category-table td {
        padding: 10px 15px;
    }

    .category-label {
        min-width: 100px;
    }

    .category-value {
        min-width: 150px;
    }
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}
