
:root {
    --card-gap: 20px;
}

.container {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.8s ease-out;
}
.search-form input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted-surface);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}
.search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}
.search-form button {
    /* use common button tokens */
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.98rem;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.search-form button:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--card-gap);
    margin-bottom: 48px;
}
.song-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.22s ease;
    animation: fadeIn 1.2s ease-out;
    animation-fill-mode: both;
}
.song-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.song-card:nth-child(odd) { animation-delay: 0.1s; }
.song-card:nth-child(even) { animation-delay: 0.2s; }

.cover-box {
    width: 100%;
    height: 0;
    padding-bottom: 56%;
    position: relative;
    background: var(--gradient-secondary);
    overflow: hidden;
}
.cover-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.song-card:hover .cover-box img {
    transform: scale(1.05);
}
.song-info {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg, var(--surface) 0%, var(--muted-surface) 100%);
}
.song-title {
    font-weight: 800;
    color: var(--accent-strong);
    font-size: 1.05rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.song-artist {
    color: var(--muted-text);
    font-size: 0.95rem;
    font-weight: 400;
}

.kana-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
    justify-content: center;
}
.kana-links a {
    display: inline-block;
    padding: 10px 16px;
    background: var(--gradient-accent);
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.kana-links a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

footer {
    padding: 32px 20px;
    text-align: center;
    color: var(--muted-text);
    background: var(--muted-surface);
    border-top: 1px solid var(--border);
    margin-top: 48px;
    animation: fadeIn 1.5s ease-out;
}

@media (max-width: 768px) {
    .song-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    .search-form {
        flex-direction: column;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .song-grid {
        grid-template-columns: 1fr;
    }
    .container {
        margin: 20px auto;
        padding: 0 16px;
    }
}

.cover-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.cover-container:hover img {
    transform: scale(1.05);
}

/* 統計情報セクション */
.stats-section {
    margin: 40px 0;
    animation: fadeIn 1s ease-out 0.4s both;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card i {
    font-size: 2rem;
    color: var(--accent);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-strong);
    line-height: 1;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--muted-text);
    font-weight: 500;
    margin-top: 4px;
}

/* ランダム楽曲セクション */
.random-songs-section {
    margin-top: 40px;
    animation: fadeIn 1s ease-out 0.6s both;
}
.random-songs-section h2 {
    color: var(--accent-strong);
    margin-bottom: 24px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.random-songs-section h2 i {
    color: var(--accent);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        margin: 16px auto;
        padding: 0 16px;
    }
    .search-form {
        padding: 16px;
        flex-direction: column;
    }
    .search-form button {
        width: 100%;
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-card i {
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .song-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
}
