/* tools/face-shape-detector/fsd.css - premium look for the team's Face Shape Detector screen.
   The markup and layout are the team's (two panels: photo on the left, result on the right); only the look is new.
   Everything is inside .fsd so nothing leaks into the rest of the site. */

.fsd .tool { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.fsd .panel { background: #fff; border: 1px solid #e6edf5; border-radius: 22px; padding: 22px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 36px -24px rgba(15, 42, 74, .35); }
.fsd .left { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.fsd .right { min-height: 420px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }

.fsd .dropzone { position: relative; border: 2px dashed #b9cfe0; border-radius: 18px; min-height: 300px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden;
    background: radial-gradient(400px 220px at 50% 0%, rgba(20, 184, 166, .08), transparent 70%), #f8fbfe; transition: border-color .2s, background .2s, box-shadow .2s; }
.fsd .dropzone:hover { border-color: #5eead4; box-shadow: 0 0 0 5px rgba(20, 184, 166, .08); }
.fsd .dropzone:focus-visible, .fsd .dropzone.dragging { border-color: #14b8a6; background: #ecfdf9; outline: none; box-shadow: 0 0 0 5px rgba(20, 184, 166, .14); }
.fsd .dropzone.has-image { border-style: solid; border-color: #e2e8f0; background: #0b1f3a; }
.fsd .drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px; color: #5b6b82; font-size: 14px; }
.fsd .drop-empty strong { color: #0f172a; font-size: 16px; }
.fsd .drop-icon { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; color: #fff; margin-bottom: 6px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 16px 28px -12px rgba(14, 165, 233, .85); animation: fsdBob 4s ease-in-out infinite; }
@keyframes fsdBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.fsd .preview { width: 100%; height: 320px; object-fit: contain; background: #0b1f3a; display: block; }

.fsd .row { display: flex; gap: 10px; }
.fsd .row .btn { flex: 1; }
.fsd .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; border: 0; border-radius: 13px; padding: 12px 16px; font: 700 14.5px 'Poppins', sans-serif; cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s, opacity .2s; }
.fsd .btn.primary { color: #fff; background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); box-shadow: 0 14px 26px -14px rgba(13, 148, 136, .9); min-height: 54px; font-size: 15.5px; }
.fsd .btn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(13, 148, 136, .95); }
.fsd .btn.secondary { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.fsd .btn.secondary:hover { background: #e9eef5; }
.fsd .btn:disabled { opacity: .5; cursor: not-allowed; }
.fsd .privacy { margin: 0; color: #5b6b82; text-align: center; font-size: 13px; line-height: 1.5; }
.fsd .privacy i { color: #0d9488; margin-right: 4px; }

.fsd .placeholder { color: #5b6b82; padding: 8px 6px; }
.fsd .placeholder .ph-title { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0 0 12px; }
.fsd .placeholder ul { margin: 0 0 22px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.fsd .placeholder li { position: relative; padding: 12px 14px 12px 44px; border-radius: 14px; background: #f6f9fc; border: 1px solid #e8eef6; font-size: 14.5px; color: #334155; }
.fsd .placeholder li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; color: #fff; background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.fsd .ph-shapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.fsd .ph-shapes span { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 16px; background: #fff; border: 1px solid #e8eef6; font-size: 12.5px; font-weight: 700; color: #0f2a4a; box-shadow: 0 10px 20px -16px rgba(15, 42, 74, .5); }
.fsd .ph-shapes svg { width: 34px; height: 46px; fill: rgba(20, 184, 166, .12); stroke: #0d9488; stroke-width: 3; }

.fsd .loading { display: flex; flex-direction: column; align-items: center; padding: 70px 10px; color: #334155; text-align: center; }
.fsd .loading p { font-weight: 600; margin: 16px 0 14px; }
.fsd .spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #dff3f1; border-top-color: #14b8a6; border-right-color: #0ea5e9; animation: fsdSpin .85s linear infinite; }
@keyframes fsdSpin { to { transform: rotate(360deg); } }
.fsd .load-track { width: min(360px, 90%); height: 8px; border-radius: 8px; background: #e8eef6; overflow: hidden; }
.fsd .load-track span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(.04); border-radius: 8px; background: linear-gradient(90deg, #14b8a6, #0ea5e9); transition: transform .4s ease; }

.fsd .error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 14px; padding: 14px 16px; font-weight: 600; font-size: 14.5px; line-height: 1.6; }

.fsd .result-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.fsd .result-thumb { width: 124px; height: 124px; border-radius: 20px; object-fit: cover; flex-shrink: 0; border: 4px solid #fff; box-shadow: 0 0 0 1px #e2e8f0, 0 18px 30px -16px rgba(15, 42, 74, .55); }
.fsd .eyebrow { margin: 0; color: #0d9488; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.fsd .result-head h2 { margin: 4px 0 8px; font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -.5px; background: linear-gradient(100deg, #0f2a4a, #0d9488); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fsd .result-head p { margin: 0; color: #334155; line-height: 1.7; font-size: 15px; }

.fsd .scores { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; border: 1px solid #e8eef6; border-radius: 18px; padding: 20px; background: #fff; }
.fsd .score-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 14.5px; color: #0f172a; }
.fsd .score-top span:last-child { color: #0d9488; font-variant-numeric: tabular-nums; }
.fsd .bar { height: 9px; background: #edf2f7; border-radius: 9px; margin-top: 7px; overflow: hidden; }
.fsd .bar span { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, #14b8a6, #0ea5e9); transition: width .9s cubic-bezier(.22, .8, .24, 1); }

.fsd .box { margin-top: 18px; border: 1px solid #e8eef6; border-radius: 18px; padding: 18px 20px; background: #fff; }
.fsd .box h3 { margin: 0 0 10px; font-size: 16.5px; font-weight: 700; color: #0f172a; }
.fsd .box h3 i { color: #0d9488; margin-right: 6px; }
.fsd .box ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: #334155; font-size: 14.5px; line-height: 1.6; }
.fsd .box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; font-size: 14.5px; line-height: 1.6; }
.fsd .box dt { font-weight: 700; text-transform: capitalize; color: #0f2a4a; }
.fsd .box dd { margin: 0; color: #334155; }

.fsd .camera-dialog { margin: auto; border: 0; border-radius: 22px; padding: 18px; max-width: 560px; width: 92vw; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5); }
.fsd .camera-dialog::backdrop { background: rgba(11, 31, 58, .65); }
.fsd .camera-dialog video { width: 100%; border-radius: 14px; background: #000; margin-bottom: 14px; transform: scaleX(-1); display: block; }

/* the five shapes section */
.fsd-shapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.fsd-shape { padding: 26px 20px 24px; border-radius: 24px; background: #fff; border: 1px solid #e8eef6; text-align: center; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 36px -24px rgba(15, 42, 74, .4);
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s cubic-bezier(.22, .8, .24, 1); }
.fsd-shape-art { width: 96px; height: 110px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 26px; background: radial-gradient(circle at 50% 35%, #f0fdfa, #e6f2fb); box-shadow: inset 0 1px 0 #fff, 0 14px 26px -18px rgba(15, 42, 74, .55); }
.fsd-shape-art svg { width: 56px; height: 76px; fill: rgba(20, 184, 166, .14); stroke: #0d9488; stroke-width: 3; filter: drop-shadow(0 6px 8px rgba(13, 148, 136, .25)); }
.fsd-shape h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #0f172a; }
.fsd-shape p { margin: 0; font-size: 14px; line-height: 1.65; color: #5b6b82; }

/* 3 + 2 cards: the row of 2 sits in the middle, so no empty gap at the end */
@media (max-width: 1180px) { .fsd-shapes { grid-template-columns: repeat(6, minmax(0, 1fr)); } .fsd-shape { grid-column: span 2; } .fsd-shape:nth-child(4) { grid-column: 2 / span 2; } }
@media (max-width: 900px) {
    .fsd .tool { grid-template-columns: 1fr; }
    .fsd .left { position: static; }
    .fsd .right { min-height: 0; }
}
@media (max-width: 760px) {
    .fsd-shapes { grid-template-columns: 1fr 1fr; }
    .fsd-shape, .fsd-shape:nth-child(4) { grid-column: auto; }
    .fsd-shape:last-child { grid-column: 1 / -1; }
    .fsd .scores { grid-template-columns: 1fr; }
    .fsd .ph-shapes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
    .fsd .ph-shapes span { font-size: 10.5px; padding: 10px 2px; }
    .fsd .result-head { flex-direction: column; }
    .fsd .box dl { grid-template-columns: 1fr; gap: 2px 0; }
    .fsd .box dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .fsd *, .fsd-shape { animation: none !important; transition: none !important; } }
