/* 基本スタイル */
html {
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f0f0;
}

a {
    color: #333;
    text-decoration: none;
}

/* ヘッダー */
header {
    background-color: #fff;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}

header h1 {
    margin: 0;
    transform: rotate(-5deg);
    position: relative;
    left: -15px;
    top: 5px;
}

header h1 img {
    max-width: 100%;
    height: auto;
}

header nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav li {
    margin: 0 11px;
}

header nav a {
    font-weight: bold;
    font-size: 1.5rem;
}

/* メインコンテンツ */
main {
    padding: 1rem;
}

/* ファーストビュー */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    background-image: url(/images/everycomic-lp05-main.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero h2 {
    margin-top: 0;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 3px 0 #000, 1px 3px 0 #000;
}

.btn-register {
    display: inline-block;
    background-color: #ff4500;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* コンテンツセクション */
.content-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.section-title {
    margin-top: 0;
    border-bottom: 2px solid #ff4500;
    padding-bottom: 0.5rem;
}

/* 漫画リスト */
.manga-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.manga-list.ranking {
    list-style: none;
    padding: 0;
    counter-reset: ranking;
    display: flex;
    flex-direction: column;
}

.manga-list.ranking .manga-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.manga-list.ranking .manga-item img {
    width: 100px;
    height: auto;
}

.manga-list.ranking .manga-item a {
    flex-shrink: 0;
    margin-right: 1rem;
}

.manga-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.manga-details .btn-purchase {
    align-self: flex-end;
}

.manga-description {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.manga-list.ranking .manga-item::before {
    counter-increment: ranking;
    content: counter(ranking);
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: #ff4500;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.manga-item img {
    width: 100%;
    border-radius: 4px;
}

.manga-title {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.btn-purchase {
    display: inline-block;
    background-color: #ff4500;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

#new .manga-item {
    text-align: center;
}

/* ジャンルリスト */
.genre-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.genre-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #eee;
    border-radius: 20px;
}

/* フッター */
footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
}

.user-menu ul {
    list-style: none;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-menu a {
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 0.8rem;
}

/* レスポンシブ対応 (タブレット以上) */
@media (min-width: 768px) {
    .manga-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .user-menu ul {
        grid-template-columns: repeat(4, 1fr);
    }
}
