/* ============================================================
   Pretvfx-Tools — Extra tools (Kalkulator, Warna, Peng HD)
   ============================================================ */

/* ===== Shared hero ===== */
.pfx-tool-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(99, 102, 241, .14) 0%, transparent 55%),
    linear-gradient(165deg, rgba(18, 22, 36, .96), rgba(10, 13, 23, .96));
  border: 1px solid rgba(99, 102, 241, .22);
  margin-bottom: 16px;
}
.pfx-tool-hero-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #a855f7));
  box-shadow: 0 8px 22px rgba(99, 102, 241, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
  flex-shrink: 0;
}
.pfx-tool-hero-title {
  font-size: 1.05rem; font-weight: 800; color: #fff;
  letter-spacing: -0.01em;
}
.pfx-tool-hero-desc {
  font-size: .78rem; color: #8b93a5; margin-top: 3px; line-height: 1.4;
}

/* ===== Buttons ===== */
.pfx-tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, .28);
  background: rgba(99, 102, 241, .12);
  color: #c7d2fe;
  font-size: .84rem; font-weight: 700;
  cursor: pointer; transition: all .18s ease;
  font-family: inherit; text-decoration: none;
  flex: 1; min-width: 0;
}
.pfx-tool-btn:hover {
  background: rgba(99, 102, 241, .22);
  color: #fff;
  border-color: rgba(99, 102, 241, .45);
}
.pfx-tool-btn:active { transform: scale(.97); }
.pfx-tool-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pfx-tool-btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none; color: #fff;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
}
.pfx-tool-btn-primary:hover { background: linear-gradient(135deg, #7c7fff, #b975ff); }

/* ============================================================
   KALKULATOR
   ============================================================ */
.pfx-calc {
  border-radius: 20px;
  padding: 14px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(99, 102, 241, .14) 0%, transparent 60%),
    linear-gradient(165deg, rgba(18, 22, 36, .96), rgba(10, 13, 23, .96));
  border: 1px solid rgba(99, 102, 241, .22);
}

.pfx-calc-display {
  padding: 14px 16px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 11, 20, .9), rgba(15, 19, 32, .9));
  border: 1px solid rgba(99, 102, 241, .22);
  margin-bottom: 12px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.pfx-calc-history {
  font-size: .82rem;
  color: rgba(165, 180, 252, .55);
  text-align: right;
  min-height: 1.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: .02em;
}
.pfx-calc-screen {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  text-align: right;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 4px;
  font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size .12s ease;
  background: linear-gradient(180deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pfx-calc-screen-sm { font-size: 1.8rem; }
.pfx-calc-screen-xs { font-size: 1.35rem; }

.pfx-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pfx-calc-btn {
  height: 62px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, .18);
  background: linear-gradient(165deg, rgba(30, 34, 52, .9), rgba(15, 19, 32, .9));
  color: #e8ecff;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease,
              border-color .15s ease, box-shadow .15s ease;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pfx-calc-btn:hover {
  background: linear-gradient(165deg, rgba(40, 46, 70, .95), rgba(22, 27, 44, .95));
  border-color: rgba(99, 102, 241, .4);
}
.pfx-calc-btn:active {
  transform: scale(.94);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4);
}

/* Function buttons (AC, backspace, %) */
.pfx-calc-btn.fn {
  color: #c4b5fd;
  background: linear-gradient(165deg, rgba(99, 102, 241, .16), rgba(168, 85, 247, .1));
  border-color: rgba(129, 140, 248, .28);
}
.pfx-calc-btn.fn:hover {
  background: linear-gradient(165deg, rgba(99, 102, 241, .28), rgba(168, 85, 247, .18));
  color: #fff;
}

/* Operator buttons (÷ × − +) */
.pfx-calc-btn.op {
  color: #fff;
  font-size: 1.5rem;
  background: linear-gradient(165deg, rgba(99, 102, 241, .35), rgba(168, 85, 247, .25));
  border-color: rgba(129, 140, 248, .4);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .15);
}
.pfx-calc-btn.op:hover {
  background: linear-gradient(165deg, rgba(99, 102, 241, .5), rgba(168, 85, 247, .4));
}

/* Equal button */
.pfx-calc-btn.eq {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .45), inset 0 1px 0 rgba(255, 255, 255, .2);
  font-size: 1.6rem;
}
.pfx-calc-btn.eq:hover {
  background: linear-gradient(135deg, #7c7fff, #b975ff);
}

/* ===== Word Count (legacy, tetap ada kalau dibutuhkan) ===== */
.pfx-wc-input {
  width: 100%;
  min-height: 180px; max-height: 320px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 19, 32, .6);
  border: 1.5px solid rgba(99, 102, 241, .25);
  color: #e8ecff; font-size: .9rem;
  font-family: inherit;
  outline: none; resize: vertical;
  margin-bottom: 12px; line-height: 1.55;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.pfx-wc-input:focus {
  border-color: rgba(99, 102, 241, .6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.pfx-wc-input::placeholder { color: rgba(199, 210, 254, .35); }

.pfx-wc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.pfx-wc-stat {
  padding: 10px 6px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(18, 22, 36, .9), rgba(10, 13, 23, .9));
  border: 1px solid rgba(99, 102, 241, .16);
  text-align: center; min-width: 0;
}
.pfx-wc-stat > i {
  font-size: .72rem; color: #a5b4fc; opacity: .8;
  display: block; margin-bottom: 5px;
}
.pfx-wc-stat-v {
  font-size: 1rem; font-weight: 800; color: #fff;
  letter-spacing: -0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pfx-wc-stat-l {
  font-size: .62rem; color: #8b93a5; margin-top: 2px;
  letter-spacing: .04em; text-transform: uppercase;
}

/* ============================================================
   COLOR PICKER
   ============================================================ */
.pfx-cp-preview {
  position: relative;
  height: 130px; border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, .3);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 14px; margin-bottom: 14px;
  overflow: hidden;
  background: #6366f1;
  transition: background .25s ease;
}
.pfx-cp-preview input[type="color"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; padding: 0; margin: 0;
  opacity: 0; cursor: pointer;
}
.pfx-cp-hex {
  position: relative;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .88rem; font-weight: 800;
  letter-spacing: .06em;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.pfx-cp-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.pfx-cp-val {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(15, 19, 32, .6);
  border: 1px solid rgba(99, 102, 241, .2);
  cursor: pointer; transition: all .15s ease;
  text-align: center; min-width: 0;
}
.pfx-cp-val:hover {
  border-color: rgba(99, 102, 241, .5);
  background: rgba(99, 102, 241, .1);
}
.pfx-cp-val.copied {
  border-color: rgba(16, 185, 129, .6);
  background: rgba(16, 185, 129, .15);
}
.pfx-cp-val-l {
  font-size: .62rem; color: #8b93a5;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 3px;
}
.pfx-cp-val-v {
  font-size: .8rem; font-weight: 800; color: #e8ecff;
  font-family: ui-monospace, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pfx-cp-row { display: flex; gap: 8px; margin-bottom: 18px; }
.pfx-cp-section-title {
  font-size: .74rem; font-weight: 800; color: #c4b5fd;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 10px; padding-left: 4px;
}
.pfx-cp-palette {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, .2);
}
.pfx-cp-swatch {
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform .15s ease;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 4px; position: relative;
}
.pfx-cp-swatch:hover { transform: scale(1.12); z-index: 2; border-radius: 6px; }
.pfx-cp-swatch span {
  font-size: .5rem; color: rgba(255, 255, 255, .75);
  font-family: ui-monospace, monospace;
  opacity: 0; transition: opacity .15s ease;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.pfx-cp-swatch:hover span { opacity: 1; }

@media (max-width: 480px) {
  .pfx-cp-palette { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   PENG HD IMAGINE
   ============================================================ */
.pfx-phd-drop {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 44px 20px;
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(16, 185, 129, .12) 0%, transparent 60%),
    linear-gradient(165deg, rgba(18, 22, 36, .9), rgba(10, 13, 23, .9));
  border: 2px dashed rgba(52, 211, 153, .35);
  cursor: pointer; transition: all .2s ease;
  text-align: center; margin-bottom: 14px;
}
.pfx-phd-drop:hover {
  border-color: rgba(52, 211, 153, .7);
  background-color: rgba(16, 185, 129, .05);
}
.pfx-phd-drop > i {
  font-size: 2rem; color: #6ee7b7; margin-bottom: 6px;
}
.pfx-phd-drop-title { font-size: 1rem; font-weight: 800; color: #fff; }
.pfx-phd-drop-desc { font-size: .78rem; color: #8b93a5; }

.pfx-phd-stage { animation: toolsCardIn .4s ease both; }
.pfx-phd-compare {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, .25);
  background: #0a0d17;
  margin-bottom: 12px;
  max-height: 360px;
  display: flex; align-items: center; justify-content: center;
}
.pfx-phd-compare img {
  max-width: 100%; max-height: 360px; display: block;
}

.pfx-phd-info {
  font-size: .78rem; color: #a5b4fc; text-align: center;
  padding: 8px 12px;
  background: rgba(99, 102, 241, .08);
  border-radius: 10px; margin-bottom: 12px;
  border: 1px solid rgba(99, 102, 241, .15);
}

.pfx-phd-row {
  display: flex; gap: 8px; margin-bottom: 12px;
  align-items: stretch;
}
.pfx-phd-scale {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(15, 19, 32, .6);
  border: 1px solid rgba(99, 102, 241, .25);
  font-size: .8rem; color: #c7d2fe;
  flex-shrink: 0;
}
.pfx-phd-scale > span { font-weight: 700; }
.pfx-phd-scale select {
  background: transparent; border: none; outline: none;
  color: #fff; font-size: .85rem; font-weight: 800;
  font-family: inherit; cursor: pointer;
}
.pfx-phd-scale select option { background: #0f1320; color: #fff; }

.pfx-phd-progress {
  padding: 12px; border-radius: 12px;
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(52, 211, 153, .25);
  margin-bottom: 12px;
}
.pfx-phd-progress-bar {
  height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden; margin-bottom: 8px;
}
.pfx-phd-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 999px;
  transition: width .3s ease;
}
.pfx-phd-progress-text {
  font-size: .75rem; color: #6ee7b7;
  text-align: center; font-weight: 700;
}

.pfx-phd-result { text-align: center; }
.pfx-phd-result img {
  max-width: 100%; max-height: 320px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, .3);
  margin: 0 auto 12px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.pfx-phd-result .pfx-tool-btn { width: 100%; }

@media (max-width: 480px) {
  .pfx-calc-btn { height: 56px; font-size: 1.15rem; }
  .pfx-calc-btn.op { font-size: 1.35rem; }
  .pfx-calc-btn.eq { font-size: 1.45rem; }
  .pfx-calc-screen { font-size: 2rem; }
  .pfx-calc-screen-sm { font-size: 1.55rem; }
  .pfx-calc-screen-xs { font-size: 1.15rem; }
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
  .pfx-tool-hero { padding: 14px; gap: 12px; }
  .pfx-tool-hero-icon { width: 46px; height: 46px; font-size: 1.05rem; }
  .pfx-tool-hero-title { font-size: 1rem; }
  .pfx-tool-hero-desc { font-size: .74rem; }
}