/* 基本スタイル */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #fff;
    color: #000;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

h1 {
    font-weight: 300;
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* コントロールセクションのスタイル */
.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.slider-container, .select-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-container label, .select-container label {
    font-size: 0.9rem;
    color: #666;
}

.slider {
    width: 100%;
    height: 2px;
    -webkit-appearance: none;
    background: #ddd;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #000;
    border-radius: 50%;
    cursor: pointer;
}

select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.generate-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    background: #333;
}

.color-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.color-btn:hover {
    background: #ff5252;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .controls {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .generate-btn, .color-btn {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    .generate-btn, .color-btn {
        grid-column: span 1;
    }
}

/* パリンドローム表示エリア */
.palindrome-display {
   margin-bottom: 1.5rem;
    text-align: center;
}

#p5-canvas {
    width: 100%;
    height: 90vh;
    margin: 0 auto;
}


.hiragana-text {
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    cursor: default;
}

.kanji-text {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 1rem;
}

.translation {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* パリンドロームリスト */
.palindrome-list-container {
    margin-top: 3rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-box {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.palindrome-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #eee;
}

.palindrome-item {
    padding: 1rem;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 4px;
}

.palindrome-item:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.palindrome-item .hiragana {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.palindrome-item .kanji {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.palindrome-item .english {
    font-size: 0.9rem;
    color: #888;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button.active {
    background: #000;
    color: white;
    border-color: #000;
}




