@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #e6eef8;
  --card-bg: #e6eef8;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #3b82f6;
  --accent-red: #ef4444;

  /* Neumorphism Extruded & Inset Shadows */
  --neu-card-shadow: 12px 12px 24px #c2cedf, -12px -12px 24px #ffffff;
  --neu-btn-shadow: 6px 6px 14px #c2cedf, -6px -6px 14px #ffffff;
  --neu-btn-active: inset 3px 3px 6px #c2cedf, inset -3px -3px 6px #ffffff;
  --neu-inset: inset 4px 4px 8px #c2cedf, inset -4px -4px 8px #ffffff;
  --neu-pill: 4px 4px 10px #c2cedf, -4px -4px 10px #ffffff;
  
  --radius: 28px;
  --radius-sm: 16px;

  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.wrap.wide {
  max-width: 900px;
}

/* NEUMORPHIC CARD */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--neu-card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  transition: all 0.3s ease;
}

h1 {
  margin: 0 0 0.35rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 0.825rem;
  font-weight: 700;
  color: #475569;
  margin: 1.25rem 0 0.5rem;
  letter-spacing: 0.02em;
}

/* NEUMORPHIC DEBOSSED INSET INPUTS */
input, select {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg);
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  box-shadow: var(--neu-inset);
  transition: all 0.2s ease;
}

input:focus, select:focus {
  box-shadow: inset 5px 5px 10px #b8c5d9, inset -5px -5px 10px #ffffff, 0 0 0 2px rgba(59, 130, 246, 0.4);
}

select {
  cursor: pointer;
}

select option {
  background: #ffffff;
  color: #1e293b;
}

/* NEUMORPHIC RAISED BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.05rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.05rem;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.01em;
  background: var(--bg);
  color: #1e293b;
  cursor: pointer;
  box-shadow: var(--neu-btn-shadow);
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px #c2cedf, -8px -8px 18px #ffffff;
  color: #3b82f6;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: var(--neu-btn-active);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--neu-inset);
}

.btn.secondary {
  background: var(--bg);
  color: #64748b;
  box-shadow: var(--neu-btn-shadow);
}

.btn.secondary:hover {
  color: #1e293b;
}

.btn.danger {
  background: var(--bg);
  color: var(--accent-red);
  box-shadow: var(--neu-btn-shadow);
}

.btn.danger:hover {
  color: #dc2626;
  box-shadow: 8px 8px 18px #c2cedf, -8px -8px 18px #ffffff;
}

.btn.ghost {
  background: var(--bg);
  color: #64748b;
  box-shadow: var(--neu-inset);
}

.btn.ghost:hover {
  color: #1e293b;
}

/* 12-COLUMN NEUMORPHIC GRID */
.ui-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem 1.25rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }

@media (max-width: 540px) {
  .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 12;
  }
}

.field {
  display: flex;
  flex-direction: column;
}

.sub-hint {
  color: var(--muted);
  font-size: 0.825rem;
  font-weight: 500;
  margin: 0.4rem 0 0;
}

/* NEUMORPHIC PILL BADGE */
.pill {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: 14px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  background: var(--bg) !important;
  color: #3b82f6 !important;
  box-shadow: var(--neu-btn-shadow) !important;
  white-space: nowrap !important;
  width: auto !important;
  height: auto !important;
  min-width: max-content !important;
}

/* NEUMORPHIC CIRCULAR LED / CLOCK DIAL DISPLAY */
.big-num {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(4.5rem, 16vw, 8rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.04em;
  margin: 1.5rem auto;
  width: min(260px, 75vw);
  height: min(260px, 75vw);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: #1e293b;
  box-shadow: var(--neu-card-shadow), inset 6px 6px 14px rgba(255, 255, 255, 0.8), inset -6px -6px 14px rgba(194, 206, 223, 0.8);
  position: relative;
}

/* Outer concentric ring effect like the clock dial in the screenshot */
.big-num::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  box-shadow: var(--neu-inset);
  z-index: 0;
  pointer-events: none;
}

.big-num span {
  position: relative;
  z-index: 1;
}

.meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 600;
}

.flash {
  animation: flash 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes flash {
  0% { transform: scale(0.96); opacity: 0.8; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.err {
  color: var(--accent-red);
  background: var(--bg);
  box-shadow: var(--neu-inset);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.ok {
  color: #10b981;
  background: var(--bg);
  box-shadow: var(--neu-inset);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin: 1.75rem 0 1.25rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-inset);
  text-align: center;
}

.stats b {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
}

.tv-year {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #3b82f6;
  text-align: center;
  text-transform: uppercase;
}

.tv-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  text-align: center;
  font-weight: 800;
  min-height: 2.5rem;
  color: #1e293b;
  margin-top: 0.25rem;
}

header.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
}

a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* PROGRESS BAR STYLING */
.progress-box {
  margin: 1.25rem 0 1rem;
}

.progress-track {
  height: 12px;
  background: var(--bg);
  border-radius: 999px;
  box-shadow: var(--neu-inset);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.progress-labels span.active {
  color: #3b82f6;
}

.progress-labels span.done {
  color: #10b981;
}

/* SOUND TOGGLE BUTTON */
.btn-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: none;
  color: #3b82f6;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--neu-btn-shadow);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 0.75rem;
}

.btn-sound.active {
  color: #10b981;
  box-shadow: var(--neu-btn-active);
}

/* RECENT CALLED HISTORY ON TV DISPLAY */
.history-box {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px dashed rgba(255, 255, 255, 0.15);
}

.history-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.history-tag {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: var(--neu-btn-shadow);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}






/* TV: nombor lebih menonjol di skrin besar */
body:has(.tv-year) .card {
  padding: 2.25rem;
}
@media (min-width: 800px) {
  .tv-name { font-size: 2rem; }
}


