/* ============================================
   Seed View — 시드 목록 뷰어 스타일
   ============================================ */

/* --- Toolbar --- */
#seed-controls {
  margin: 1.5em 0 1em;
}

.seed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8em;
  margin-bottom: 0.5em;
}

.seed-search-box {
  flex: 1 1 260px;
  min-width: 200px;
}

.seed-search-box input {
  width: 100%;
  padding: 0.6em 1em;
  border: 1px solid var(--md-typeset-border, rgba(0,0,0,0.12));
  border-radius: 8px;
  font-size: 0.9em;
  background: var(--md-code-bg-color, #f5f5f5);
  color: var(--md-typeset-color, #000);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.seed-search-box input:focus {
  outline: none;
  border-color: var(--md-primary-fg-color, #ff7043);
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.15);
}

.seed-view-buttons {
  display: flex;
  gap: 0.3em;
  flex-shrink: 0;
}

.view-btn {
  padding: 0.45em 0.9em;
  border: 1px solid var(--md-typeset-border, rgba(0,0,0,0.12));
  border-radius: 6px;
  background: transparent;
  color: var(--md-typeset-color, #000);
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s;
  white-space: nowrap;
}

.view-btn:hover {
  background: var(--md-code-bg-color, #f5f5f5);
  border-color: var(--md-primary-fg-color, #ff7043);
}

.view-btn.active {
  background: var(--md-primary-fg-color, #ff7043);
  color: #fff !important;
  border-color: var(--md-primary-fg-color, #ff7043);
}

.seed-count-info {
  font-size: 0.85em;
  color: var(--md-typeset-color, #666);
  opacity: 0.7;
}

/* --- Card View --- */
.seed-view-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2em;
  margin: 1em 0;
}

.seed-card {
  border: 1px solid var(--md-typeset-border, rgba(0,0,0,0.1));
  border-radius: 12px;
  overflow: hidden;
  background: var(--md-code-bg-color, #f9f9f9);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.seed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.seed-card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--md-default-bg-color, #fff);
  display: block;
}

.seed-card-thumb-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  background: linear-gradient(135deg, var(--md-primary-fg-color, #ff7043), var(--md-accent-fg-color, #ffb300));
  opacity: 0.15;
}

.seed-card-body {
  padding: 1em 1.1em;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.seed-card-date {
  font-size: 0.78em;
  color: var(--md-typeset-color, #666);
  opacity: 0.6;
  margin-bottom: 0.3em;
}

.seed-card-title {
  font-size: 1.05em;
  font-weight: 600;
  margin: 0 0 0.2em;
  line-height: 1.3;
}

.seed-card-title a {
  color: var(--md-typeset-color, #000);
  text-decoration: none;
}

.seed-card-title a:hover {
  color: var(--md-primary-fg-color, #ff7043);
}

.seed-card-genre {
  font-size: 0.8em;
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 10px;
  background: var(--md-primary-fg-color, #ff7043);
  color: #fff;
  margin: 0.3em 0 0.5em;
  align-self: flex-start;
}

.seed-card-synopsis {
  font-size: 0.85em;
  line-height: 1.55;
  opacity: 0.8;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seed-card-footer {
  margin-top: 0.6em;
  padding-top: 0.6em;
  border-top: 1px solid var(--md-typeset-border, rgba(0,0,0,0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8em;
}

.seed-card-theme {
  opacity: 0.65;
}

/* --- List View --- */
.seed-view-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin: 1em 0;
}

.seed-list-item {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.7em 1em;
  border: 1px solid var(--md-typeset-border, rgba(0,0,0,0.08));
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  color: var(--md-typeset-color, #000);
}

.seed-list-item:hover {
  background: var(--md-code-bg-color, #f5f5f5);
  border-color: var(--md-primary-fg-color, #ff7043);
  text-decoration: none;
}

.seed-list-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--md-code-bg-color, #eee);
}

.seed-list-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  background: var(--md-code-bg-color, #eee);
}

.seed-list-info {
  flex: 1;
  min-width: 0;
}

.seed-list-title {
  font-weight: 600;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seed-list-meta {
  font-size: 0.8em;
  opacity: 0.6;
  display: flex;
  gap: 0.8em;
  flex-wrap: wrap;
  margin-top: 0.15em;
}

.seed-list-arrow {
  font-size: 1.1em;
  opacity: 0.3;
  flex-shrink: 0;
}

/* --- Table View --- */
.seed-view-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.seed-view-table th,
.seed-view-table td {
  padding: 0.65em 0.8em;
  border-bottom: 1px solid var(--md-typeset-border, rgba(0,0,0,0.08));
  text-align: left;
}

.seed-view-table th {
  font-weight: 600;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  border-bottom-width: 2px;
}

.seed-view-table tr:hover td {
  background: var(--md-code-bg-color, #f9f9f9);
}

.seed-view-table td a {
  color: var(--md-typeset-color, #000);
  font-weight: 500;
}

/* --- Empty / No Results --- */
.seed-empty {
  text-align: center;
  padding: 3em 1em;
  opacity: 0.5;
  font-size: 1.1em;
}

/* --- Loading indicator --- */
.seed-loading {
  text-align: center;
  padding: 2em;
}

.seed-loading::after {
  content: "⏳";
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .seed-view-card {
    grid-template-columns: 1fr;
  }
  .seed-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .seed-view-buttons {
    justify-content: center;
  }
}
