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

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #fef5e7 0%, #fadbd8 100%);
    min-height: 100vh;
    color: #5d4e60;
    line-height: 1.6;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #f8b195 0%, #f67280 50%, #c06c84 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* カテゴリーセクション */
.category-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.category-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.category-section h2 {
    color: #c06c84;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8b195;
    font-weight: 400;
}

/* ワードグリッド */
.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* ワードアイテム */
.word-item {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0f0 100%);
    border: 1px solid #f8b195;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.word-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.word-item:hover {
    background: linear-gradient(135deg, #ffe0f0 0%, #ffc0e0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 177, 149, 0.3);
}

.word-text {
    font-size: 1rem;
    color: #5d4e60;
    font-weight: 500;
    flex-grow: 1;
}

/* 例文ボタン */
.example-btn {
    background: linear-gradient(135deg, #f67280 0%, #c06c84 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.example-btn:hover {
    background: linear-gradient(135deg, #c06c84 0%, #8e5a6d 100%);
    transform: scale(1.05);
}

.example-btn:active {
    transform: scale(0.95);
}

/* 例文表示エリア */
.example-text {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff0f8 100%);
    border: 1px solid #e8b4cb;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5d4e60;
    font-style: italic;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #c06c84 0%, #8e5a6d 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .category-section {
        padding: 20px;
    }
    
    .category-section h2 {
        font-size: 1.5rem;
    }
    
    .words-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .word-item {
        padding: 10px 12px;
    }
    
    .word-text {
        font-size: 0.95rem;
    }
    
    .example-btn {
        padding: 5px 14px;
        font-size: 0.8rem;
    }
    
    .example-text {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f8b195 0%, #c06c84 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c06c84 0%, #8e5a6d 100%);
}