/* Vibe Coding 作品集 — 沿用主站的極簡黑白風格 */

/* 主站只載入 Open Sans 的 300 與 800 字重，中文又會掉到系統細體，這頁的內文改用思源黑體 */
body { font-family: 'Noto Sans TC', 'Open Sans', sans-serif; font-weight: 400; color: #222; }

/* 主站 styles.css 有全域的 `span { font-size:1.3rem; margin:0 10px; font-family:Crimson }`，這頁的 span 先重設 */
.vibe-page span, .vibe-header span, .vibe-filters span, #vibe-grid span, .vibe-dialog span,
.vibe-phone-mode span, .vibe-modes span {
  font-family: 'Noto Sans TC', 'Open Sans', sans-serif; font-size: inherit; margin: 0; color: inherit;
}

.vibe-header { margin: 0 0 1.75rem; padding: 0 .25rem; }
.vibe-eyebrow { font-size: .85rem; letter-spacing: 3px; color: #777; text-transform: uppercase; margin: 0 0 .5rem; }
.vibe-header h1 { font-family: 'Noto Sans TC', sans-serif; font-weight: 700; font-size: 2.3rem; letter-spacing: 1px; margin-bottom: 1rem; line-height: 1.35; }
.vibe-intro { max-width: 46rem; margin-bottom: .75rem; }
.vibe-intro p { color: #333; font-weight: 400; line-height: 1.95; margin: 0 0 .7rem; font-size: 1.05rem; }
@media (max-width: 575px) { .vibe-header h1 { font-size: 1.7rem; } }
.vibe-stats { color: #666; font-size: .92rem; letter-spacing: 1px; margin: 0; }

.vibe-filters { margin: 0 0 1.75rem; padding: 0 .25rem; }
.vibe-filter-row { margin-bottom: .4rem; }
#vibe-filters .vibe-filter-label {
  display: inline-block; width: 3.2rem; font-size: .9rem; letter-spacing: 1.5px; color: #666;
}
.vibe-filters button {
  margin: 0 .4rem .4rem 0; font-size: .95rem; letter-spacing: 1px; cursor: pointer; border-width: 1px; color: #333;
}
.vibe-filters button.is-active { color: #fff; background: #000; border-color: #000; }

/* 卡片 */
.vibe-card {
  width: 100%; height: 100%; padding: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column;
  border: 1px solid #e5e5e5; background: #fff; color: inherit;
  transition: border-color .3s ease-in-out, transform .3s ease-in-out;
}
.vibe-card:hover { border: 1px solid #777; transform: translateY(-2px); color: inherit; }
.vibe-card:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* 封面 */
.vibe-cover-wrap { position: relative; }
.vibe-cover { position: relative; height: 250px; background: #f3f3f1; overflow: hidden; }

/* 手機展示：漸層背景上放 1～3 支手機，下緣自然被裁掉，像從卡片裡探出來 */
.vibe-cover--phones { background: linear-gradient(140deg, var(--c1), var(--c2)); }
.vibe-phone {
  position: absolute; left: 50%; display: block; width: 112px; height: auto;
  border: 4px solid #151515; border-radius: 20px; background: #151515;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.vibe-phone.is-center { top: 26px; width: 128px; z-index: 2; transform: translateX(-50%); }
.vibe-phone.is-left   { top: 52px; transform: translateX(-50%) translateX(-92px) rotate(-7deg); }
.vibe-phone.is-right  { top: 52px; transform: translateX(-50%) translateX(92px) rotate(7deg); }
.vibe-phone.is-left2  { top: 40px; transform: translateX(-50%) translateX(-58px) rotate(-5deg); }
.vibe-phone.is-right2 { top: 30px; z-index: 2; transform: translateX(-50%) translateX(58px) rotate(4deg); }
.vibe-card:hover .vibe-phone.is-center { transform: translateX(-50%) translateY(-8px); }
.vibe-card:hover .vibe-phone.is-left   { transform: translateX(-50%) translateX(-108px) rotate(-10deg); }
.vibe-card:hover .vibe-phone.is-right  { transform: translateX(-50%) translateX(108px) rotate(10deg); }

/* 照片封面：滿版照片，右下角疊一支手機 */
.vibe-photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.vibe-card:hover .vibe-photo { transform: scale(1.04); }
.vibe-phone.vibe-phone--corner {
  left: auto; right: 18px; top: 60px; width: 96px; z-index: 2; transform: rotate(6deg);
}
.vibe-card:hover .vibe-phone--corner { transform: rotate(3deg) translateY(-8px); }

@media (prefers-reduced-motion: reduce) {
  .vibe-phone, .vibe-photo { transition: none; }
}
#vibe-grid .vibe-noimg {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-family: 'Crimson Text', serif; font-size: 1.6rem; color: #bbb;
}
#vibe-grid .vibe-type {
  position: absolute; top: 10px; left: 10px; z-index: 3; background: #000; color: #fff;
  font-size: .82rem; letter-spacing: 1.5px; padding: 3px 10px;
}

.vibe-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; width: 100%; }
.vibe-meta { font-size: .85rem; letter-spacing: 1px; color: #666; margin-bottom: .35rem; }
.vibe-title { font-family: 'Crimson Text', 'Noto Sans TC', serif; font-weight: 700; font-size: 1.55rem; color: #111; margin-bottom: .4rem; word-break: break-word; }
.vibe-desc { color: #333; line-height: 1.8; font-size: 1.02rem; margin-bottom: .75rem; flex: 1; white-space: normal; }

.vibe-stack { line-height: 1; }
#vibe-grid .vibe-chip, .vibe-dialog .vibe-chip {
  display: inline-block; font-size: .85rem; letter-spacing: .3px; color: #333;
  background: #f3f3f1; padding: 4px 8px; margin: 0 .35rem .35rem 0;
}

.vibe-empty { color: #999; padding: 0 .25rem; }

/* 詳細內容 */
.vibe-dialog {
  width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 1px solid #ddd; padding: 2rem 2rem 2.25rem; overflow-y: auto; color: #222;
}
.vibe-dialog::backdrop { background: rgba(255, 255, 255, .85); }
.vibe-close {
  position: sticky; top: 0; float: right; border: 0; background: transparent;
  font-size: 1.8rem; line-height: 1; padding: 0 .25rem; cursor: pointer; color: #777;
}
.vibe-close:hover { border: 0; color: #000; }
.vibe-d-title { font-family: 'Crimson Text', 'Noto Sans TC', serif; font-weight: 700; font-size: 2.1rem; color: #111; margin-bottom: .5rem; }
.vibe-d-summary { color: #333; line-height: 1.9; font-size: 1.08rem; }

.vibe-gallery {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; margin: 1.25rem 0 .5rem;
  scroll-snap-type: x mandatory;
}
.vibe-gallery figure { flex: 0 0 auto; margin: 0; scroll-snap-align: start; display: table; }
.vibe-gallery img { height: 340px; width: auto; max-width: 75vw; object-fit: contain; border: 1px solid #eee; background: #f7f7f5; display: block; }
.vibe-gallery figcaption { display: table-caption; caption-side: bottom; font-size: .9rem; color: #555; margin-top: .35rem; line-height: 1.6; }

.vibe-d-sec { margin-top: 1.5rem; }
.vibe-d-sec h3 { font-family: 'Noto Sans TC', sans-serif; font-weight: 700; font-size: 1.2rem; color: #111; margin-bottom: .5rem; border-bottom: 1px solid #eee; padding-bottom: .35rem; }
.vibe-d-sec p { color: #333; line-height: 1.95; margin: 0; font-size: 1.02rem; }

.vibe-links { margin-top: 1.5rem; }
.vibe-links a {
  font-size: .95rem; letter-spacing: 1px; color: #222; text-decoration: none;
  border-bottom: 1px solid #bbb; margin-right: 1rem;
}
.vibe-links a:hover { color: #000; border-bottom-color: #555; text-decoration: none; }

@media (max-width: 575px) {
  .vibe-dialog { padding: 1.25rem 1rem 1.5rem; }
  .vibe-gallery img { height: 300px; }
}

/* 開啟時焦點會落在關閉鈕，用細框代替瀏覽器預設的粗外框 */
.vibe-close:focus { outline: none; }
.vibe-close:focus-visible { outline: 1px solid #999; outline-offset: 2px; }

/* ---------- 模式切換 ---------- */
.vibe-modes { display: inline-flex; padding: 4px; background: #f1f1ef; border-radius: 999px; margin: 0 0 1.75rem .25rem; }
.vibe-modes button {
  border: 0; background: transparent; border-radius: 999px; padding: 8px 18px;
  font-size: .95rem; color: #555; cursor: pointer; transition: background .2s, color .2s;
}
.vibe-modes button:hover { border: 0; color: #111; }
.vibe-modes button.is-active { background: #111; color: #fff; }
[hidden] { display: none !important; }

/* ---------- 手機模式 ---------- */
.vibe-phone-mode { display: flex; gap: 56px; align-items: flex-start; justify-content: center; padding: 4px 0 48px; }
.vibe-device {
  flex: 0 0 auto; width: 330px; aspect-ratio: 330 / 690; padding: 11px;
  background: #121212; border-radius: 52px;
  box-shadow: 0 0 0 2px #2b2b2b inset, 0 30px 60px rgba(0, 0, 0, .25);
}
.vibe-screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #fff; }

.vibe-view { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 14px; }
.vibe-view.is-open  { animation: vibe-open .32s cubic-bezier(.2, .8, .2, 1); }
.vibe-view.is-close { animation: vibe-close .28s ease-out; }
.vibe-view.is-push  { animation: vibe-push .28s cubic-bezier(.2, .8, .2, 1); }
.vibe-view.is-pop   { animation: vibe-pop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes vibe-open  { from { transform: scale(.6); opacity: 0; border-radius: 40px; } to { transform: none; opacity: 1; } }
@keyframes vibe-close { from { transform: scale(1.08); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes vibe-push  { from { transform: translateX(40%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes vibe-pop   { from { transform: translateX(-30%); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vibe-view { animation: none !important; } }

.vibe-screen .vibe-status {
  display: flex; align-items: center; justify-content: space-between; height: 50px; flex: 0 0 auto;
  padding: 0 28px; font-size: 13px; font-weight: 700; color: #111;
}
.vibe-screen .vibe-status span:last-child { font-size: 10px; letter-spacing: 1px; }
.vibe-screen .vibe-island { width: 92px; height: 26px; border-radius: 13px; background: #121212; }

/* 主畫面 */
.vibe-home { background: linear-gradient(165deg, #ffd6e4 0%, #e3d6ff 45%, #ffe9c7 100%); }
.vibe-screen .vibe-widget {
  margin: 14px 18px 22px; padding: 16px 18px; border-radius: 22px;
  background: rgba(255, 255, 255, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 2px;
}
.vibe-screen .vibe-widget b { font-size: 18px; color: #111; }
.vibe-screen .vibe-widget span { font-size: 12px; color: #444; }
.vibe-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 6px; padding: 0 16px; }
.vibe-icon { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.vibe-icon:hover { border: 0; }
.vibe-screen .vibe-icon-img {
  width: 58px; height: 58px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .15); transition: transform .2s;
}
.vibe-icon:hover .vibe-icon-img { transform: scale(1.08); }
.vibe-icon:active .vibe-icon-img { transform: scale(.92); }
.vibe-screen .vibe-icon-name { font-size: 11.5px; color: #222; font-weight: 500; }
.vibe-home-hint { margin: auto 0 34px; text-align: center; font-size: 12px; color: #555; }

/* App 畫面 */
.vibe-appbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; flex: 0 0 auto;
  padding: 4px 14px 10px; border-bottom: 1px solid #eee;
}
.vibe-appbar b { font-size: 15px; color: #111; }
.vibe-back {
  justify-self: start; border: 0; background: none; padding: 4px 2px; cursor: pointer;
  font-size: 14px; color: #c23b6e; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
}
.vibe-back:hover { border: 0; color: #9c2552; }
.vibe-appbody, .vibe-featbody { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vibe-apphero {
  display: flex; align-items: center; gap: 12px; margin: 14px 14px 6px; padding: 14px; border-radius: 18px;
  background: linear-gradient(140deg, var(--c1), var(--c2));
}
.vibe-screen .vibe-apphero > span { font-size: 34px; }
.vibe-apphero b { display: block; font-size: 15px; color: #111; line-height: 1.3; }
.vibe-apphero small { font-size: 11px; color: #333; }
.vibe-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 14px 24px; }
.vibe-tile { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.vibe-tile:hover { border: 0; }
.vibe-tile img {
  display: block; width: 100%; aspect-ratio: 9 / 13; object-fit: cover; object-position: center 8%;
  border-radius: 14px; border: 1px solid #eee; background: #f4f4f2; transition: transform .2s;
}
.vibe-tile:hover img { transform: translateY(-3px); }
.vibe-screen .vibe-tile span { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; color: #222; text-align: center; }

/* 功能畫面：直的截圖滿寬可捲動，橫的畫面置中 */
.vibe-featbody { background: #f4f4f2; display: flex; flex-direction: column; justify-content: center; }
.vibe-featbody img { display: block; width: 100%; height: auto; }

/* 右側介紹 */
.vibe-panel { flex: 1 1 auto; max-width: 440px; padding-top: 24px; }
.vibe-panel-kicker { font-size: .85rem; letter-spacing: 1px; color: #666; margin: 0 0 .4rem; }
.vibe-panel-title { font-family: 'Noto Sans TC', sans-serif; font-weight: 700; font-size: 1.8rem; color: #111; margin-bottom: .75rem; }
.vibe-panel-lead { font-size: 1.08rem; color: #222; line-height: 1.85; }
.vibe-panel h3 { font-family: 'Noto Sans TC', sans-serif; font-weight: 700; font-size: 1.05rem; color: #111; margin: 1.25rem 0 .35rem; }
.vibe-panel p { color: #333; line-height: 1.85; }
.vibe-panel .vibe-stack { margin-top: 1rem; }
.vibe-panel .vibe-chip { display: inline-block; font-size: .85rem; color: #333; background: #f3f3f1; padding: 4px 8px; margin: 0 .35rem .35rem 0; }
.vibe-panel-hint { font-size: .92rem; color: #777 !important; margin-top: 1rem; }
.vibe-panel-more {
  margin-top: .5rem; border: 1px solid #111; background: #111; color: #fff; padding: 9px 16px; font-size: .95rem; cursor: pointer;
}
.vibe-panel-more:hover { background: #333; color: #fff; border: 1px solid #333; }
.vibe-panel-nav { display: flex; align-items: center; gap: 12px; margin: 1rem 0; }
.vibe-panel-nav span { font-size: .95rem; color: #555; }
.vibe-panel-nav button { border: 1px solid #ccc; font-size: .95rem; padding: 6px 14px; cursor: pointer; }
.vibe-panel-nav button:disabled { opacity: .35; cursor: default; }
.vibe-panel-apps { display: flex; flex-direction: column; gap: 8px; margin-top: 1rem; }
.vibe-panel-apps button {
  display: flex; align-items: center; gap: 12px; border: 1px solid #e5e5e5; background: #fff;
  padding: 8px 12px; font-size: 1rem; color: #222; cursor: pointer; text-align: left;
}
.vibe-panel-apps button:hover { border: 1px solid #777; color: #000; }
.vibe-panel-apps .vibe-panel-apps span, .vibe-panel-apps button span {
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; background: linear-gradient(140deg, var(--c1), var(--c2)); flex: 0 0 auto;
}

@media (max-width: 767px) {
  .vibe-phone-mode { flex-direction: column; align-items: center; gap: 24px; }
  .vibe-device { width: min(330px, calc(100vw - 48px)); }
  .vibe-panel { max-width: none; width: 100%; padding: 0 .25rem; }
  .vibe-panel-title { font-size: 1.5rem; }
}
