:root {
  --bg: #f0f5ff;
  --card: #ffffff;
  --accent: #0b63d6;
  --accent-light: #3aa0ff;
  --accent-dark: #094aab;
  --success: #00a86b;
  --warn: #ff6b6b;
  --muted: #ef0aa3;
  --dvr-red: #ff4d4f;
  --real-green: #00875a;
  --glass: rgba(255, 255, 255, 0.85);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, #e8f0ff 0%, var(--bg) 100%);
  color: #1252d3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.wrap {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 12px;
}
.card {
  width: 100%;
  max-width: 980px;
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(11, 63, 120, 0.12);
  transition: box-shadow 0.3s ease;
}
.card:hover {
  box-shadow: 0 16px 38px rgba(11, 63, 120, 0.22);
}
header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
header .logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 20px;
  user-select: none;
  box-shadow: 0 6px 18px rgba(11, 63, 120, 0.2);
}
h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: blue;
}
p.small {
  margin: 6px 0 12px;
  color: blue;
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 2px solid rgb(157, 231, 68);
}
.tab {
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-weight: 700;
  white-space: nowrap;
  color: var(--dvr-red);
  background: #edf6ff;
  transition: all 0.3s ease;
  flex-shrink: 0;
  user-select: none;
}
.tab:hover {
  background: var(--accent-light);
  color: white;
}
.tab.active {
  background: var(--accent);
  color: white;
  border-color: rgba(11, 99, 214, 0.25);
  box-shadow: 0 8px 24px rgba(11, 99, 214, 0.2);
}
.content {
  margin-top: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #e6eef7;
  border-radius: 14px;
  font-size: 15px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition: border-color 0.3s ease;
  outline-offset: 2px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-light);
}
.full {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
button {
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  min-width: 140px;
  transition: background 0.3s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(11, 99, 214, 0.25);
  user-select: none;
}
button:hover {
  background: var(--accent-light);
  box-shadow: 0 14px 38px rgba(58, 160, 255, 0.5);
}
button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 18px rgba(11, 99, 214, 0.3);
}
button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid rgba(11, 99, 214, 0.25);
  min-width: 120px;
}
button.secondary:hover {
  background: var(--accent-light);
  color: white;
  border-color: var(--accent-light);
}
button.ghost {
  background: transparent;
  border: 2px dashed #cbd7ee;
  color: var(--muted);
  min-width: 110px;
  font-weight: 600;
}
button.ghost:hover {
  background: var(--card);
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Rezultati */
#rezultati {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, #e7fff0, #fffff9);
  color: #064d24;
  border: 2px solid #b4e3c1;
  display: none;
  font-weight: 700;
  font-size: 16px;
  user-select: text;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.hint {
  font-size: 13px;
  color: var(--accent);
}

/* Butonat e mëdhenj dhe rreshtat për rezultat */
.big-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 255, 250, 0.95));
  border: 2px solid rgba(11, 99, 214, 0.1);
  box-shadow: 0 12px 30px rgba(3, 10, 20, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  user-select: none;
}
.big-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.big-cell {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.left-cell {
  max-width: 360px;
}
.center-cell {
  flex: 1.1;
  text-align: center;
  max-width: 420px;
}
.right-cell {
  max-width: 360px;
}
.cell-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

/* Butonat e mëdhenj */
.big-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 16px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(3, 10, 20, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  user-select: none;
  cursor: pointer;
}
.big-btn:active {
  transform: translateY(1px);
}
/* Butoni blu - jo i klikueshëm */
.big-blue {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
  color: white;
  cursor: default;
  box-shadow: 0 12px 30px rgba(47, 111, 214, 0.25);
}
/* Butoni jeshil - klikueshëm */
.big-green {
  background: linear-gradient(90deg, var(--success), #32d583);
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 168, 107, 0.4);
}
.big-green:hover {
  background: linear-gradient(90deg, #009858, #28b768);
}
/* Butoni neutral */
.big-neutral {
  background: linear-gradient(90deg, #e84e4e, #e34234);
  color: white;
  border: 1.5px solid rgba(11, 99, 214, 0.08);
  cursor: default;
}

/* Butoni jeshil djathtas (ok) */
.big-right-green {
  background: linear-gradient(90deg, var(--success), #32d583);
  color: white;
  cursor: default;
}
/* Tabela me numra tabular për timestamps */
.btn-timestamp {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

/* Responsive: bëj stukturën më verticale në telefon */
@media (max-width: 720px) {
  .wrap {
    padding: 16px 8px;
  }
  .card {
    padding: 18px 16px;
    box-shadow: 0 8px 20px rgba(11, 63, 120, 0.15);
  }
  .tabs {
    gap: 10px;
    margin-top: 16px;
    padding-bottom: 10px;
  }
  .tab {
    padding: 12px 18px;
    font-size: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  header .logo {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
  header h1 {
    font-size: 20px;
  }
  .big-row {
    flex-direction: column;
    gap: 16px;
  }
  .big-cell {
    max-width: 100%;
  }
  .big-btn {
    font-size: 18px;
    padding: 16px 20px;
    border-radius: 14px;
  }
  button {
    font-size: 16px;
    min-width: 100%;
    padding: 14px 0;
  }
  .actions {
    flex-direction: column;
  }
  #rezultati {
    font-size: 17px;
    padding: 18px;
  }
}

/* butonat e orës për simulim */
.time-btn{
  display:inline-block;
  width:140px;
  padding:12px 10px;
  border-radius:10px;
  font-weight:800;
  font-size:16px;
  border:none;
  box-shadow:0 6px 14px rgba(3,10,20,0.06);
  cursor:pointer;
}
.time-btn:active{ transform:translateY(1px) }
.time-btn.dvr{
  background: linear-gradient(90deg,#ff6b6b,#ff964d);
  color:#fff;
}
.time-btn.real{
  background: linear-gradient(90deg,#00a86b,#32d583);
  color:#fff;
}
/* siguri për ekran të vogël: butonat të mbushin rreshtin */
@media (max-width:480px){
  .time-btn{ width:100%; }
  .full > div[style*="flex:0 0 140px"]{ width:100%; }
}

footer {
    background: #3c9ae8; color: #f7f7f7; font-size: 0.96em; text-align: center;
    padding: 10px 0; margin-top: 30px; letter-spacing: 1px;
    border-radius: 0 0 20px 20px;
}

/* Fast result popup */
.fast-result-popup{
  position: absolute;
  min-width: 260px;
  max-width: 380px;
  background: #ffffff;
  border: 1px solid #dceeff;
  box-shadow: 0 8px 20px rgba(11,99,214,0.12);
  border-radius: 10px;
  padding: 12px;
  z-index: 1200;
  color: #0b2636;
  transition: opacity .12s ease, transform .12s ease;
  right: 12px; /* default position inside container */
  top: calc(100% + 8px);
}

/* Mobile: make it static and full-width below controls */
@media (max-width:600px){
  .fast-result-popup{
    position: static !important;
    display: block !important;
    width: 100%;
    box-shadow: none;
    border-left: none;
    border-right: none;
    margin-top: 10px;
  }
}
