/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:     #c0392b;
  --accent-light: #e74c3c;
  --accent-pale: #fdf0ef;
  --dark:       #1c1c2e;
  --mid:        #4a4a6a;
  --text:       #2d2d3a;
  --sub:        #888;
  --border:     #e8e8f0;
  --bg:         #f7f7fb;
  --white:      #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 28px rgba(0,0,0,0.13);
  --radius:     10px;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

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

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.site-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  white-space: nowrap;
  letter-spacing: 1px;
}

.site-logo span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 2px;
}

.site-nav a {
  color: var(--mid);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.site-nav a:hover { background: var(--accent-pale); color: var(--accent); }
.site-nav a.active { background: var(--accent); color: #fff; }

.header-search {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.header-search input {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  width: 220px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.header-search input:focus { border-color: var(--accent); background: var(--white); }
.header-search input::placeholder { color: #bbb; }

.header-search button {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}

.header-search button:hover { background: var(--accent-light); }

/* ===== Layout ===== */
.layout-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 24px;
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sub);
}

.sort-btn {
  padding: 4px 12px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  transition: all 0.15s;
}

.sort-btn:hover { border-color: var(--accent); color: var(--accent); }
.sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Tag Filters ===== */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  transition: all 0.15s;
}

.tag-btn:hover { border-color: var(--accent); color: var(--accent); }
.tag-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Works Grid ===== */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== Date Group ===== */
.date-group { display: flex; flex-direction: column; gap: 14px; }

.date-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  position: sticky;
  top: 60px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.date-label-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 0.3px;
}

.date-count {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 700;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* ===== Work Card ===== */
.work-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.18s, box-shadow 0.18s;
  cursor: pointer;
  border: 1px solid var(--border);
  display: block;
  color: inherit;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.work-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #eee;
  overflow: hidden;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s;
}

.work-card:hover .work-thumb img { transform: scale(1.05); }

.work-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  color: #fff;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.work-badge.new { background: var(--accent); }
.work-badge.hd  { background: #1976d2; }
.work-badge.vr  { background: #7b1fa2; }

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28,28,46,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.work-overlay span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
}

.work-card:hover .work-overlay { opacity: 1; }

.work-info { padding: 10px 12px 12px; }

.work-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 5px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-actress {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--sub);
  margin-bottom: 6px;
}

.work-maker {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.work-code { font-size: 10px; color: #bbb; flex-shrink: 0; }

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.work-tag {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--accent-pale);
  border: 1px solid #f5c6c4;
  border-radius: 4px;
  color: var(--accent);
  font-weight: 600;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  transition: all 0.15s;
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.35; cursor: default; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 18px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: 0.5px;
}

.actress-list, .maker-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.actress-list a, .maker-list a {
  font-size: 13px;
  color: var(--mid);
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  transition: color 0.15s;
}

.actress-list a::before, .maker-list a::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.actress-list a:hover, .maker-list a:hover { color: var(--accent); }

.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.genre-tag {
  padding: 4px 11px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}

.genre-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  color: #aaa;
  text-align: center;
  padding: 32px 16px;
  margin-top: 24px;
  font-size: 12px;
}

.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: #888; margin: 0 6px; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-copy { color: #555; }

/* ===== No results ===== */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--sub);
  font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .layout-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 600px) {
  .header-inner { gap: 12px; height: 54px; }
  .site-nav { display: none; }
  .header-search input { width: 130px; }
  .date-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .layout-wrapper { padding: 16px 12px; }
}
