.names-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 480px) {
  .names-grid-layout {
    grid-template-columns: 1fr;
  }
}

.name-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.name-result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.card-content-text {
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 15px;
  font-weight: 550;
}

.card-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.card-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
}

.badge-seo {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-readability {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-info {
  background: rgba(107, 114, 128, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.card-actions-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-generate-gradient {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-generate-gradient:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.btn-generate-gradient:disabled {
  background: #9ca3af !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.fav-hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .fav-hist-grid {
    grid-template-columns: 1fr;
  }
}

/* 1. Monthly Calendar Grid styling */
.calendar-grid-container {
  grid-template-columns: repeat(6, 1fr) !important;
}
@media (max-width: 992px) {
  .calendar-grid-container { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 576px) {
  .calendar-grid-container { grid-template-columns: 1fr !important; }
}
.calendar-day-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cal-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.cal-day-num {
  font-size: 11px;
  font-weight: 750;
  color: var(--accent-color);
}
.cal-day-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  flex-grow: 1;
}
.cal-day-badge {
  font-size: 9px;
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 4px;
  align-self: flex-start;
  margin-top: 6px;
}

/* 2. Timetable scheduling styling */
.timetable-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
}
.timetable-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.timetable-grid th, .timetable-grid td {
  border: 1px solid var(--border-color);
  padding: 12px;
  text-align: center;
}
.timetable-grid th {
  background: var(--bg-body);
  color: var(--text-main);
  font-weight: 700;
}
.time-header-col {
  font-weight: 750;
  background: var(--bg-body);
  color: var(--accent-color);
}
.active-slot {
  background: rgba(37, 99, 235, 0.05);
  border-left: 3px solid var(--accent-color) !important;
}
.slot-topic {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.slot-time {
  font-size: 10.5px;
  color: var(--text-muted);
}
.empty-slot {
  color: var(--text-muted);
  opacity: 0.4;
}

/* 3. Kanban Board styling */
.kanban-board-container {
  grid-template-columns: repeat(4, 1fr) !important;
  align-items: start;
}
@media (max-width: 992px) {
  .kanban-board-container { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 576px) {
  .kanban-board-container { grid-template-columns: 1fr !important; }
}
.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  box-sizing: border-box;
}
.kanban-col-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}
.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kanban-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.empty-column {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 15px 0;
}

/* 4. Episode Roadmap styling */
.roadmap-timeline-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 30px;
}
.roadmap-line {
  position: absolute;
  left: 12px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-color), var(--border-color));
  z-index: 1;
}
.roadmap-card-node {
  position: relative;
  z-index: 2;
}
.roadmap-index-circle {
  position: absolute;
  left: -30px;
  top: 6px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}
.roadmap-card-body {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-left: 10px;
  box-shadow: var(--shadow-sm);
}

/* 5. Accordion script outline styling */
.accordion-outline-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.accordion-outline-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  overflow: hidden;
}
.accordion-outline-trigger {
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--text-main);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  outline: none;
}
.accordion-outline-trigger:hover {
  background: var(--bg-body);
}
.accordion-arrow {
  font-size: 14px;
  color: var(--text-muted);
}
.accordion-outline-content {
  padding: 15px;
  border-top: 1px solid var(--border-color);
}

/* 6. Executive Brief Table styling */
.brief-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
}
.brief-table {
  width: 100%;
  border-collapse: collapse;
}
.brief-table th {
  padding: 12px 0;
  color: var(--accent-color);
  border-bottom: 2px solid var(--border-color);
}
.brief-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.brief-label-col {
  font-weight: 750;
  font-size: 12.5px;
  color: var(--text-muted);
  width: 25%;
}
.brief-value-col {
  font-size: 13.5px;
  color: var(--text-main);
}
