/* Home / landing view.
   Shown in place of #workspace when no project is active. Two layouts
   inside (#homeFirstTime and #homeReturning) toggled by home.js. */

#homeView {
  flex: 1;
  overflow: auto;
  padding: 40px 24px 80px;
  background: var(--bg, #0e0e1a);
}

#homeContent {
  max-width: 960px;
  margin: 0 auto;
}

#homeView h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text, #eee);
}

#homeView h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim, #888);
  margin: 0 0 12px;
}

/* ───── First-time user ───── */
#homeFirstTime {
  margin-top: 40px;
  max-width: 540px;
}

#homeFirstTime .homeLead {
  color: var(--text-dim, #aaa);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.homePrimary {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  background: var(--accent, #2563eb);
  color: #fff;
  cursor: pointer;
}

.homePrimary:hover { filter: brightness(1.1); }

#homeFirstTime .homeHint {
  color: var(--text-dim, #666);
  font-size: 12px;
  margin-top: 16px;
}

/* Suggestion chips: gives a brand-new user concrete prompts to feed the
   assistant. Click → opens the help panel + sends the question. Sized
   to feel like a secondary CTA, not a primary action — first-time
   users should still notice "Create your first project" first. */
.homeAskStrip {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #2a2a3a);
}
.homeAskLead {
  color: var(--text-dim, #888);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  font-weight: 500;
}
.homeAskGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.homeAskChip {
  text-align: left;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.35;
  font-family: inherit;
  color: var(--text, #ccc);
  background: var(--bg-input, #222);
  border: 1px solid var(--border, #2a2a3a);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.homeAskChip:hover {
  border-color: var(--accent, #2563eb);
  background: #2a2a3a;
  color: var(--text-bright, #fff);
}
.homeAskChip::before {
  content: "?";
  display: inline-block;
  width: 18px; height: 18px;
  line-height: 18px;
  text-align: center;
  background: var(--accent, #2563eb);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: -2px;
}

@media (max-width: 540px) {
  .homeAskGrid { grid-template-columns: 1fr; }
}

/* ───── Returning user ───── */
#homeHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.homeSecondary {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border, #2a2a3a);
  background: transparent;
  color: var(--text, #eee);
  border-radius: 6px;
  cursor: pointer;
}

.homeSecondary:hover { background: rgba(255,255,255,0.04); }

.homeSection {
  margin-bottom: 32px;
}

/* Project tiles */
#homeTiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.homeTile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a2e;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.1s ease, background 0.1s ease;
}

.homeTile:hover {
  border-color: #4a4a6a;
  background: #1e1e35;
}

.homeTileThumb {
  width: 56px;
  height: 56px;
  border-radius: 5px;
  object-fit: cover;
  background: #0e0e1a;
  flex-shrink: 0;
}

.homeTileThumbEmpty {
  background: #0e0e1a;
  opacity: 0.5;
}

.homeTileBody { flex: 1; min-width: 0; }

.homeTileName {
  font-size: 13px;
  font-weight: 500;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homeTileMeta {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* Activity */
#homeActivity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.homeActivityItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #1a1a2e;
  border: 1px solid #232335;
  border-radius: 6px;
  font-size: 12px;
}

.homeActStatus {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  background: #2a2a3a;
  color: #aaa;
  min-width: 50px;
  text-align: center;
}

.homeAct_done   .homeActStatus { background: #18381e; color: #7fd891; }
.homeAct_failed .homeActStatus { background: #3a1a1a; color: #f08080; }
.homeAct_running .homeActStatus { background: #2a2a45; color: #8aa0f0; }

.homeActLabel { flex: 1; color: #ddd; }
.homeActTime  { color: #666; font-size: 11px; }

.homeEmpty { color: #555; font-size: 12px; padding: 8px 2px; }

/* Explore buttons */
.homeExplore { margin-bottom: 20px; }

.homeLinkBtn {
  padding: 7px 14px;
  font-size: 12px;
  border: 1px solid #2a2a3a;
  background: transparent;
  color: #bbb;
  border-radius: 6px;
  cursor: pointer;
}
.homeLinkBtn:hover { background: rgba(255,255,255,0.04); color: #eee; }

/* Drag overlay while dragging files on Home */
#homeDragOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(37, 99, 235, 0.12);
  border: 3px dashed var(--accent, #2563eb);
  border-radius: 8px;
  margin: 24px;
  z-index: 5;
}

#homeDragInner {
  color: #eee;
  font-size: 15px;
  font-weight: 500;
  background: rgba(14, 14, 26, 0.9);
  padding: 14px 22px;
  border-radius: 8px;
  border: 1px solid #2a2a3a;
}

/* Mobile */
@media (max-width: 768px) {
  #homeView { padding: 24px 14px 60px; }
  #homeView h1 { font-size: 18px; }
  #homeTiles { grid-template-columns: 1fr; }
  #homeHeader { flex-direction: column; align-items: stretch; }
}
