/* ================================
   ISEKAI MANGA LIFE 共通CSS
   assets/css/style.css
================================ */

:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --accent:#2563eb;
  --muted:#6b7280;
  --border:#e6edf8;
  --shadow:0 8px 20px rgba(16,24,40,0.06);
  --radius:12px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP","Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:#0f172a;
}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

/* ================================
   Layout
================================ */
.site{display:flex;min-height:100vh}

.main-area{
  flex:1;
  display:flex;
  flex-direction:column;
  max-width:1400px;
  margin:0 auto;
}

/* ================================
   Header
================================ */
.site-header{
  background:#fff;
  padding:14px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-shadow:var(--shadow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left{display:flex;align-items:center;gap:14px}
.brand{font-size:18px;font-weight:800;color:var(--accent)}
.badge{margin-left:8px;font-size:12px;padding:4px 8px;border-radius:999px;background:#eef2ff;color:var(--accent)}

.search{display:flex;gap:8px}
.search input{
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:8px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.btn {
  background: #2563eb;
  background:var(--accent);
  color: #fff;
  font-size:14px;
  padding:8px 14px;
  border-radius:8px;
  text-decoration: none;
  display:inline-block;
}

.btn-sub {
  background: #64748b;
}


/* ================================
   Left Navigation
================================ */
.left-nav{
  width:260px;
  background:#fff;
  padding:20px;
  border-right:1px solid var(--border);
}

.left-nav .logo{
  font-weight:700;
  color:var(--accent);
  font-size:18px;
  margin-bottom:16px;
}

.left-nav nav a{
  display:block;
  padding:10px 12px;
  border-radius:8px;
  color:#0b1220;
  margin-bottom:6px;
}

.left-nav nav a:hover{background:#f1f7ff}

/* ================================
   Content
================================ */
main.content{padding:24px}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:24px;
  padding:24px;
}


.card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
  transition:transform .2s ease, box-shadow .2s ease;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 32px rgba(0,0,0,0.12);
}

.thumb{
  height:180px;
  border-radius:10px;
  background:linear-gradient(135deg,#5b8cff,#9db7ff);
  display:flex;
  align-items:flex-end;
  padding:12px;
  font-weight:700;
  color:#fff;
  font-size:14px;
}

.thumb-wrap{
  width:250px;
  height:250px;
  overflow:hidden;
  border-radius:10px;
  margin:0 auto;
  background:#f1f3f9;
}

.thumb-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* 作者・出版社 */
.card-meta {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.card-meta .author {
  font-weight: 600;
  color: #111827;
}

.card-meta .publisher {
  color: #6b7280;
}

.title{
  font-weight:700;
  margin-top:10px;
  font-size:16px;
  line-height:1.4;
}

.desc{
  font-size:13px;
  color:#555;
  margin-top:6px;
  line-height:1.6;
}

/* ================================
   Manga detail image
================================ */

.manga-thumb-wrap {
  width: 250px;
  height: 250px;
  overflow: hidden;
  border-radius: 8px;
  float: left;
  margin-right: 30px;
}

.manga-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================
   Breadcrumb
================================ */
#breadcrumb{
  margin-bottom:16px;
  font-size:14px;
  color:var(--muted);
}

#breadcrumb a{font-weight:600}
#breadcrumb span{margin:0 6px}

/* ================================
   Footer
================================ */
.site-footer{
  background:#fff;
  border-top:1px solid var(--border);
  padding:18px 24px;
  display:flex;
  justify-content:space-between;
  font-size:13px;
}

/* ================================
   Pager
================================ */
.pager {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 30px 0;
  font-size: 14px;
}

.pager a {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  color: #2563eb;
}

.pager .current {
  padding: 6px 10px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}

/* ================================
   Responsive
================================ */
@media(max-width:900px){
  .left-nav{display:none}
  .grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
}


/* ================================
   漫画カードページ
================================ */
.manga-detail {
  max-width: 900px;
  margin: 30px auto;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.08);

}


.manga-main-img {
  width: 100%;
  max-width: 300px;
  float: left;
  margin-right: 30px;
  border-radius: 8px;
}
.manga-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}
.manga-meta {
  color: #444;
  margin: 6px 0 12px;
}
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}
.section-title {
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  border-left: 4px solid #2563eb;
  padding-left: 8px;
  font-size: 18px;
}

/* ================================
   Header search
================================ */
.header-search{
  margin-top:12px;
}

.header-search form{
  display:flex;
  gap:8px;
}

.header-search input{
  flex:1;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  font-size:14px;
}

.header-search button{
  padding:8px 14px;
  border:none;
  border-radius:8px;
  background:var(--accent);
  color:#fff;
  font-size:14px;
  cursor:pointer;
}
/* ================================
   Information Pages Common Style
================================ */

.info-container {
  max-width: 900px;
  margin: 40px auto;
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16,24,40,0.06);
}

.info-header {
  margin-bottom: 28px;
}

.info-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.info-updated {
  font-size: 13px;
  color: #6b7280;
}

.info-section {
  margin-bottom: 28px;
}

.info-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid #2563eb;
}

.info-text {
  font-size: 14px;
  line-height: 1.8;
  color: #0f172a;
}

.info-text ul {
  padding-left: 18px;
}

.info-text li {
  margin-bottom: 6px;
}

/* ================================
   巻数ごとの紹介
================================ */

.volume-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:16px;
}

.volume-card img{
  width:100%;
  border-radius:8px;
}

.buy-links a{
  display:inline-block;
  margin:6px;
  padding:8px 12px;
  background:#2563eb;
  color:#fff;
  border-radius:6px;
  text-decoration:none;
}

/* ================================
   うんちくページ
================================ */

.info-page{
  max-width:900px;
  margin:30px auto;
  background:#fff;
  padding:40px;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,0.06);
  line-height:1.9;
}

.info-page h1{
  font-size:30px;
  margin-bottom:20px;
}

.info-page h2{
  margin-top:30px;
  font-size:22px;
  border-left:5px solid #2563eb;
  padding-left:10px;
}

/* ================================
   検索フィルター
================================ */

.search-filter-wrap{
  width:100%;
  display:flex;
  justify-content:flex-end;   /* 右上固定 */
  align-items:center;
  margin-bottom:20px;
  flex-wrap:wrap;
}

.search-filter-wrap form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.search-filter-wrap select{
  padding:6px 8px;
  border-radius:6px;
  border:1px solid #ccc;
}

.search-filter-wrap button{
  background:#2563eb;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:6px 12px;
  cursor:pointer;
}

/* さらに検索ラベル */
.filter-label{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
}

.filter-label img{
  height:26px;
  width:auto;
  object-fit:contain;
}


/* 評価機能 */
.rating-box{
  margin:10px 0 20px;
}

.rating-box button{
  background:none;
  border:none;
  font-size:22px;
  cursor:pointer;
}

.rating-box button:hover{
  transform:scale(1.1);
}


.avg-rating{
  font-size:20px;
  color:#f5b301;
  margin-bottom:8px;
}


#openRating{
  background:#2563eb;
  color:#fff;
  border:none;
  padding:10px 16px;
  border-radius:8px;
  cursor:pointer;
  font-size:15px;
}

#openRating:hover{
  opacity:0.9;
}


/*　漫画カードレイアウト崩れ修正 */

.star-select{
  display:flex;
  gap:10px;
  font-size:24px;
  cursor:pointer;
}

.manga-meta{
  margin-top:10px;
}

.manga-thumb-wrap{
  margin-bottom:10px;
}

/*　モーダルCSS */

.modal{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.5);
}

.modal-content{
  background:#fff;
  padding:20px;
  width:300px;
  margin:100px auto;
  border-radius:10px;
}

/*　漫画カードレイアウト崩れ修正2 */

.star-select{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:26px;
}

.star-select span{
  cursor:pointer;
}


.manga-thumb-wrap{
  float:none; 
  margin:0 auto 20px;
}

.manga-meta{
  margin-top:15px;
}

.review-box{
  background:#f9fafb;
  border:1px solid #eee;
  padding:10px;
  border-radius:8px;
  margin-bottom:10px;
}

/*　トップ★表示 */
.star-view {
  color: #ffd700;
  text-shadow: 0 0 2px #999;
  letter-spacing: 1px;
}

/*　レビュー折り畳み */

#reviewArea{
  max-height:250px;
  overflow:hidden;
  transition:0.3s;
}

.btn-mini{
  font-size:12px;
  padding:3px 8px;
}

.more-btn{
  color:#2196f3;
  cursor:pointer;
  font-size:12px;
}

/* ================================
   巻数のタブ折りたたみ
================================ */


.tab-buttons{
  margin-bottom:10px;
}

.tab-btn{
  padding:5px 10px;
  margin-right:5px;
  cursor:pointer;
}

.tab-btn.active{
  background:#333;
  color:#fff;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}


/* ================================
   レビューを件数を表示させる
================================ */

.review-count{
  font-size:14px;
  color:#6b7280;
  margin-bottom:10px;
}

/* ================================
  内部リンク
================================ */


.related-grid {
 display:grid;
 grid-template-columns:repeat(3,1fr);
 gap:15px;
}

.related-card img {
 width:100%;
 height:180px;
 object-fit:cover;
}
