:root{
  --bg:RGBA(15, 23, 42, 1);
  --fg: #E5EAF5;
  --card:#8458B3;
  --muted:#94a3b8;
  --accent:rgba(208, 189, 244, 0.6);
  --accent-2:rgba(132, 88, 179, 1);
  --pill:#0f172a;
  --glass: rgba(255,255,255,0.03);
  --radius:12px;
}
*{
  box-sizing:border-box;
  color-scheme: dark;
}
body{
  margin:0;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--bg);
  font-family: Roboto, "Helvetica Neue", Arial;
  color:var(--fg);
}

.container{
  width:100%;
  max-width:820px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius:16px;
  padding:28px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  backdrop-filter: blur(6px);
}

nav {
  max-width: 864px;
  margin: auto !important;
}

.nav-links {
  display: flex;
  gap: 8px;
  margin: 0 8px;
  padding: 16px 0;
  color: var(--accent);
  align-items: center;
  justify-content: center;
}

.nav-links a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:not(:last-child)::after {
  color: var(--accent);
  content: " / ";
}

h1{
  text-align: center;
  margin:0 0 12px 0;
  font-size:20px;
  letter-spacing:0.2px;
  font-weight:600;
  color:#f1f7ff;
}
p.lead{
  margin:0 0 20px 0;
  color:var(--muted);
  font-size:13px;
  text-align: center;
}
form{display:grid; gap:16px;}

.date-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(132, 88, 179, 0.1), rgba(255,255,255,0.00));
  border: 1px solid rgba(255,255,255,0.03);
}
.dp-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

/* Native date input styled */
.dp-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 8px 12px 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  background: var(--pill);
  color: #eaf3ff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: 0 6px 18px rgba(2,6,23,0.45);
  transition: box-shadow .15s ease, transform .12s ease;
  text-align: center;
}

/* Adjust native date arrow styling for WebKit browsers */
.dp-input::-webkit-calendar-picker-indicator {
  color: var(--fg);
  cursor: pointer;
}

.input-text-login {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 8px 12px 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: var(--pill);
  color: #eaf3ff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
  transition: box-shadow .15s ease, transform .12s ease;
  text-align: center;
  margin: 10px 0;
}

.loginbtn {
  margin: 20px 0 0 0;
  text-align:center;
}

.input-container{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(132, 88, 179, 0.1), rgba(255,255,255,0.00));
  border:1px solid rgba(255,255,255,0.03);
}

.question, .cycle{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(132, 88, 179, 0.1), rgba(255,255,255,0.00));
  border:1px solid rgba(255,255,255,0.03);
}

.q-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.q-title{
  font-weight:600;
  font-size:14px;
  color:#eaf3ff;
}

.options{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.options input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.option{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:40px;
  padding:0 12px;
  border-radius:999px;
  background:var(--pill);
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  border:1px solid transparent;
  transition: all .18s ease;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 4px 10px rgba(2,6,23,0.45);
}

input[type="radio"]:checked + .option{
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color:#02233b;
  transform:translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(96,165,250,0.12);
  border:1px solid rgba(255,255,255,0.06);
}

.cycle-selector {
    width: 50%;
    margin: 16px auto;
    height: 44px;
    padding: 8px 12px 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--pill);
    color: #eaf3ff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
    transition: box-shadow .15s ease, transform .12s ease;
    text-align: center;
    display: flex;
}

.option:hover{ transform:translateY(-2px); color:#fff; }

.scale-labels{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  color:var(--muted);
}

.actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:6px;
}
button.btn{
  background:linear-gradient(90deg, var(--accent-2), var(--accent));
  border:0;
  color:#042032;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(96,165,250,0.12);
}
button.ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
  color:var(--muted);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
}

button.date-nav {
  border-radius:999px;
  background: var(--pill);
  border-radius: 999px;
  color:var(--muted);
  font-size:14px;
  border:1px solid transparent;
  transition: all .18s ease;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 4px 10px rgba(2,6,23,0.45);
}

.chart-holder {
  background: white;
  border-radius: 15px;
  padding: 15px;
}

.statusbar{
  display:grid;
  grid-template-columns: 1fr 1fr 2fr 1.4fr 1.4fr; /* adjust as needed */
  gap:0;
  background:var(--pill);
  box-shadow: 0 4px 10px rgba(2,6,23,0.45);
  border:1px solid var(--pill);
  border-radius:12px;
  overflow:hidden;
  padding: 1vh 0;
}
.cell{
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.cell:not(:last-child){
    border-right:1px solid var(--muted);
}
.icon{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  font-size:18px;
  flex:0 0 auto;
  color:#9bd3ff;
}
.label{
  font-size:12px;
  color:var(--muted);
  line-height:1.1;
  margin-bottom:2px;
}
.value{
  font-weight:600;
  /*white-space:nowrap;*/
  overflow:hidden;
  text-overflow:ellipsis;
  font-size: 0.8em;
}

.day-delta{
  font-size: .65em;
  line-height: 1;
  vertical-align: super;
  margin-left: 2px;
  font-weight: 800;
  padding: 0.05em 0.45em;
  border-radius: 999px;
  position: absolute;
  background: rgba(255, 215, 80, 0.16);
  color: #ffd757;
  border: 1px solid rgba(255, 215, 80, 0.35);
}

.day-delta.plus::before,
.day-delta.zero::before{
  content: '+';
}
.day-delta.plus{
  background: rgba(255, 120, 120, 0.18);
  color: #ff6b6b;
  border-color: rgba(255, 120, 120, 0.35);
}

.day-delta.minus{
  background: rgba(255, 215, 80, 0.16);
  color: #ffd757;
  border-color: rgba(255, 215, 80, 0.35);
}

.day-delta.zero{
  background: rgba(0, 255, 0, 0.18);
  color: #10b981;
  border-color: rgba(0, 255, 0, 0.35);
}


#result { display:none; transition: box-shadow .18s ease; }
#result.success { box-shadow: 0 8px 30px rgba(46, 204, 113, 0.08); }
#result.error { box-shadow: 0 8px 30px rgba(255, 99, 71, 0.08); }
#result .output { color: var(--accent-2); }
#result.error .output { color: #ffb4b4; }
#result.success .output { color: #9ef0c9; }

@media (max-width:640px){
  .options{ gap:6px; }
  .option{ min-width:36px; height:36px; font-size:13px; }
  .statusbar{ grid-template-columns: 1fr; padding: 0 1vw; }
  .cell:not(:last-child){
    border-right: none;
    border-bottom: 1px solid var(--muted);
  }
}
