:root{
    --accent:#9370db; /* soft purple */
    --muted:#777;
    --bg:#fbf8ff;
    --card:#ffffff;
    --border:#222;
}

/* Basic reset */
html, body{height:100%}
body{
    margin:0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, #f7f5ff 0%, #fff 100%);
    color: #222;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    padding:28px;
}

.container{
    max-width: 760px;
    margin: 0 auto;
    background:var(--card);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(60,40,120,0.08);
    padding: 28px;
    position: relative;
    overflow: visible;
}

/* Header */
h1{
    margin: 0 0 6px 0;
    color: var(--accent);
    font-size: 28px;
    letter-spacing: -0.3px;
}
.subtitle{ 
    margin: 0 0 16px 0;
    color: var(--muted);
}

/* Day Sections */
.day{
    margin-bottom: 24px}
.day h2{
    color:var(--accent);
    font-size: 20px;
    margin-bottom: 12px ;
}

.day label {
    font-size: 16px;
    color: #a26cd4;
} 


/* Task list */
.tasks{
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.tasks li{
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Custom white checkbox look */
.tasks input[type="checkbox"]{
    /* hide default box but keep accessible */
    width: 18px;
    height: 18px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: white;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    flex: 0 0 22px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.02);
}

/* checked state: draw a simple checkmark */
.tasks input[type="checkbox"]:checked{
    background: white;
    position: relative;
}
.tasks input[type="checkbox"]:checked::after{
    content: "";
    position: absolute;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 12px;
    border: solid var(--accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg)
}

/* Label text */
.tasks label{
    cursor: pointer;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Controls */
.controls{
    display: flex;
    justify-content: center;
    margin-top: 18px;
}
#nextBtn {
    border:2px solid var(--accent);
    background:linear-gradient(180deg,#fff,#faf5ff);
    color:var(--accent);
    padding:10px 20px;
    border-radius:10px;
    font-weight:600;
    cursor:not-allowed; /* default */
    transition:transform .12s ease, box-shadow .12s;
    pointer-events: auto; /* ensures clicks are handled if enabled */
}

#nextBtn.enabled {
    cursor: pointer;
    pointer-events: auto;
}
#nextBtn[disabled] {
    cursor: not-allowed;
    pointer-events: none;
}
#nextBtn:disabled {
  background-color: #c2b5e8;
  cursor: not-allowed;
  opacity: 0.6;
}

#nextBtn:not(:disabled) {
  background-color: #7b3ff3;
  cursor: pointer;
  opacity: 1;
}




/* Confetti container absolute on top */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  animation: fall linear forwards;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(120vh) rotate(720deg); }
}


@keyframes spin {
    to {
        transform: rotate(720deg);
    }
}
/* responsive */
@media (max-width:600px){
    .container{padding:18px}
    h1{font-size: 22px}
    #nextBtn{width:100%}
}


/* progress bar */
#progress-container {
    width: 100%;
    height: 12px;
    background: #ddd;
    border-radius: 6px;
    margin: 20px 0;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: #9370db;
    border-radius: 6px;
    transition: width 0.4s ease;
}

#congratsMessage {
  display: inline-block;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #7b3ff3;
  padding: 12px 16px;
  background: #f8f3ff;
  border: 3px solid #d7bfff;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(123,63,243,0.2);
  animation: popIn 0.4s ease;
  width: auto;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
    
}


@media (max-width: 450px) {
    #congratsMessage {
        white-space: normal;
        font-size: 14px;
    }
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#resetBtn {
  display: none;
  background-color: #7b3ff3;
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0px 3px 6px rgba(0,0,0,0.2);
  transition: 0.2s ease;
}

#resetBtn:hover {
  background-color: #6b2de5;
  transform: translateY(-2px);
}

#resetBtn:active {
  transform: scale(0.97);
}