/* odyofilm — redesign */

:root {
  --bg:        #ece6dd;
  --header-bg: #707070;
  --nav-color: #d94040;
  --accent:    #3dde82;
  --white:     #ffffff;
  --text:      #333333;
  --text-light:#666666;
  --border:    #d0c8bc;
  --card-bg:   #ffffff;
  --font-main: 'Georgia', 'Times New Roman', serif;
  --font-ui:   'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--nav-color); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  /* no box-shadow — active button seamlessly connects to gray content frame */
}

.logo-wrap {
  background: var(--bg);
  border-radius: 18px;
  line-height: 0;
  width: fit-content;
}

.logo-link { display: block; line-height: 0; }
.logo-link:hover { opacity: .9; text-decoration: none; }

.site-logo-img {
  display: block;
  height: 82px;
  width: auto;
}

.site-nav {
  width: 100%;
  background: var(--bg);
  padding: 5px 0 0;
  margin-top: 0;
}

.nav-inner {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--nav-color);
  padding: 5px 14px;
  border-radius: 4px 4px 0 0;
  transition: background .15s, color .15s;
}
.site-nav a:hover { text-decoration: none; background: rgba(0,0,0,.07); }
.site-nav a.active {
  background: var(--header-bg);
  color: var(--accent);
}

.search-icon {
  color: var(--accent) !important;
  padding: 5px 10px !important;
  display: flex;
  align-items: center;
}

/* ── Main ───────────────────────────────────────────────────────────────── */
.site-main {
  background: transparent;
  padding: 0;
  min-height: 70vh;
}

.site-main > .container {
  background: var(--header-bg);
  padding-top: 24px;
  padding-bottom: 60px;
  border-radius: 0 0 16px 16px;
}

/* ── Filter Bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  padding: 18px 20px 16px;
}

.year-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.filter-btn {
  font-family: var(--font-ui);
  font-size: 0.73rem;
  font-weight: 600;
  background: transparent;
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 3px 11px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.6;
}
.filter-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

#filter-search {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  padding: 4px 13px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  color: #fff;
  outline: none;
  width: 130px;
  transition: border-color .15s, background .15s;
}
#filter-search::placeholder { color: rgba(255,255,255,.45); }
#filter-search:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.15);
}

.filter-random {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 4px 14px;
  cursor: pointer;
  transition: opacity .15s;
  line-height: 1.6;
}
.filter-random:hover { opacity: .85; }

.filter-count {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(255,255,255,.5);
  padding: 0 4px;
  min-width: 60px;
}

/* ── Post Grid ──────────────────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.post-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #1a1a1a;
}
.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-thumb img { transform: scale(1.04); }

.post-thumb--novideo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
}
.play-icon { font-size: 2.5rem; color: rgba(255,255,255,.4); }

.post-info { padding: 12px 14px 16px; }

.cat-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 4px;
  margin-bottom: 6px;
}
.cat-badge:hover { text-decoration: none; opacity: .85; }

.post-title {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.35;
  margin-bottom: 6px;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--nav-color); text-decoration: none; }

.post-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 6px;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }

.tag-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 10px;
  transition: background .15s, color .15s;
}
.tag-badge:hover {
  background: var(--nav-color);
  color: #fff;
  border-color: var(--nav-color);
  text-decoration: none;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
.pagination a {
  background: var(--card-bg);
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
}
.pagination a:hover {
  background: var(--nav-color);
  color: #fff;
  border-color: var(--nav-color);
  text-decoration: none;
}

/* ── Post Single ────────────────────────────────────────────────────────── */
.post-single {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 8px;
  padding: 32px 36px 40px;
}

.post-about {
  background: var(--bg);
  box-shadow: none;
}

.post-header { margin-bottom: 20px; }

.post-single .post-title {
  font-size: 1.6rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 8px 0 6px;
}

/* ── Video Embed ────────────────────────────────────────────────────────── */
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 24px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── Post Body ──────────────────────────────────────────────────────────── */
.post-body { font-size: 1rem; line-height: 1.7; color: var(--text); }
.post-body p { margin-bottom: 1em; }
.post-body img { border-radius: 4px; margin: 1em 0; }

/* ── Post Nav ───────────────────────────────────────────────────────────── */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.post-nav a { color: var(--text-light); max-width: 45%; }
.post-nav a:hover { color: var(--nav-color); }
.post-nav__next { text-align: right; margin-left: auto; }

/* ── Category / Tag header ──────────────────────────────────────────────── */
.cat-header { margin-bottom: 28px; padding-top: 32px; }
.cat-header h1 {
  font-size: 1.6rem;
  font-weight: normal;
  color: rgba(255,255,255,.85);
}
.cat-header h1 span {
  background: var(--accent);
  color: #fff;
  padding: 2px 12px;
  border-radius: 4px;
  margin-right: 8px;
}

/* ── Search Page ────────────────────────────────────────────────────────── */
.search-page {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
}

.search-main {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.search-heading {
  font-size: 1.2rem;
  font-weight: normal;
  margin-bottom: 16px;
  color: var(--text-light);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.search-bar input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar button {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 18px;
  cursor: pointer;
}

.search-result {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}
.result-thumb { flex-shrink: 0; width: 200px; }
.result-thumb img { border-radius: 4px; aspect-ratio: 16/9; object-fit: cover; width: 200px; }
.thumb-placeholder {
  width: 200px;
  aspect-ratio: 16/9;
  background: #2a2a2a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 1.5rem;
}
.result-info h3 { font-size: 1rem; font-weight: normal; margin-bottom: 8px; }
.result-info h3 a { color: var(--text); }
.result-info h3 a:hover { color: var(--nav-color); }
.no-results { color: var(--text-light); font-style: italic; padding: 12px 0; }

/* Sidebar */
.search-sidebar {
  background: #4a4a4a;
  border-radius: 6px;
  padding: 16px;
}

.sidebar-block { margin-bottom: 20px; }
.sidebar-block:last-child { margin-bottom: 0; }

.sidebar-label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.sidebar-search .search-bar { margin-bottom: 0; }
.sidebar-search input {
  font-size: 0.82rem;
  background: #3a3a3a;
  border-color: #666;
  color: #eee;
}
.sidebar-search input::placeholder { color: #aaa; }

.random-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #5a5a5a;
  color: #ddd;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.3;
}
.random-item:hover { color: var(--accent); text-decoration: none; }
.random-item:last-child { border-bottom: none; }

.random-play {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #666;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: 0.7rem;
}

.random-item span { flex: 1; }
.random-item time { color: #888; font-size: 0.7rem; white-space: nowrap; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,.6);
  padding: 20px 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .search-page { grid-template-columns: 1fr; }
  .search-sidebar { display: none; }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .site-title { font-size: 2rem; }
  .post-single { padding: 20px 18px 28px; }
  .result-thumb { width: 100px; }
  .result-thumb img { width: 100px; }
}
