/* =========================
   RESET
========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  min-width:0;
}

img{
  max-width:100%;
  display:block;
}

input,
select,
button,
textarea{
  font-size:16px;
  font-family:'Inter',sans-serif;
}

/* =========================
   BODY
========================= */

body{
  min-height:100vh;

  font-family:'Inter',sans-serif;

  background:
  linear-gradient(
    135deg,
    #dbeafe,
    #ede9fe,
    #fce7f3
  );

  display:flex;
  justify-content:center;
  align-items:flex-start;

  overflow-x:hidden;

  color:#111827;

  padding:
  max(20px, env(safe-area-inset-top))
  max(20px, env(safe-area-inset-right))
  max(20px, env(safe-area-inset-bottom))
  max(20px, env(safe-area-inset-left));
}

/* =========================
   GLOWS
========================= */

.bg-glow{
  position:fixed;
  border-radius:50%;
  filter:blur(100px);
  z-index:-1;
  opacity:0.45;
}

.glow1{
  width:320px;
  height:320px;

  background:#8b5cf6;

  top:-120px;
  left:-120px;
}

.glow2{
  width:280px;
  height:280px;

  background:#06b6d4;

  right:-100px;
  bottom:-100px;
}

/* =========================
   CONTAINER
========================= */

.container{
  width:min(100%, 980px);

  background:rgba(255,255,255,0.72);

  border:1px solid rgba(255,255,255,0.7);

  backdrop-filter:blur(14px);

  border-radius:32px;

  padding:32px;

  box-shadow:
  0 10px 40px rgba(0,0,0,0.12);
}

/* =========================
   HEADER
========================= */

.top-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;

  gap:20px;

  margin-bottom:30px;
}

h1{
  font-size:48px;
  font-weight:800;

  letter-spacing:-2px;

  color:#111827;
}

.today{
  margin-top:8px;

  color:#6b7280;

  font-size:15px;
}

/* =========================
   LANGUAGE SWITCH
========================= */

.lang-switch{
  display:flex;

  gap:8px;

  background:rgba(255,255,255,0.55);

  padding:6px;

  border-radius:16px;
}

.lang-btn{
  border:none;

  padding:12px 18px;

  border-radius:12px;

  background:transparent;

  color:#6b7280;

  font-weight:700;

  cursor:pointer;

  transition:0.25s;
}

.lang-btn.active{
  background:linear-gradient(
    135deg,
    #8b5cf6,
    #06b6d4
  );

  color:white;
}

/* =========================
   INPUT AREA
========================= */

.task-box{
  display:grid;

  grid-template-columns:
  repeat(auto-fit,minmax(160px,1fr));

  gap:15px;

  margin-bottom:18px;
}

.task-box input,
.task-box button,
select,
input[type="date"]{
  min-height:60px;

  border:none;
  outline:none;

  border-radius:18px;

  padding:0 18px;
}

/* INPUTS */

#taskInput,
#taskTime,
#taskDate,
select,
.search-box input{
  background:white;

  color:#111827;

  border:1px solid rgba(0,0,0,0.06);
}

#taskInput::placeholder,
.search-box input::placeholder{
  color:#9ca3af;
}

/* BUTTONS */

#addBtn,
#aiBtn{
  border:none;

  color:white;

  font-weight:700;

  cursor:pointer;

  transition:0.25s;
}

#addBtn{
  background:linear-gradient(
    135deg,
    #8b5cf6,
    #06b6d4
  );
}

#aiBtn{
  background:linear-gradient(
    135deg,
    #ec4899,
    #8b5cf6
  );
}

#addBtn:hover,
#aiBtn:hover{
  transform:translateY(-3px);

  box-shadow:
  0 10px 20px rgba(139,92,246,0.25);
}

/* =========================
   SEARCH
========================= */

.search-box{
  margin:24px 0;
}

.search-box input{
  width:100%;
  height:60px;

  border-radius:18px;

  padding:0 20px;
}

/* =========================
   STATS
========================= */

.stats{
  display:grid;

  grid-template-columns:repeat(3,1fr);

  gap:18px;

  margin-bottom:25px;
}

.stat-card{
  background:rgba(255,255,255,0.6);

  border-radius:24px;

  padding:25px;

  text-align:center;

  border:1px solid rgba(255,255,255,0.7);
}

.stat-card span{
  font-size:36px;
  font-weight:800;

  color:#111827;
}

.stat-card p{
  margin-top:8px;

  color:#6b7280;
}

/* =========================
   PROGRESS BAR
========================= */

.progress-container{
  width:100%;
  height:14px;

  background:rgba(255,255,255,0.6);

  border-radius:999px;

  overflow:hidden;

  margin-bottom:30px;
}

.progress-bar{
  width:0%;
  height:100%;

  border-radius:999px;

  background:linear-gradient(
    90deg,
    #8b5cf6,
    #06b6d4
  );

  transition:0.4s;
}

/* =========================
   TITLES
========================= */

.section-title{
  margin:28px 0 16px;

  font-size:14px;

  letter-spacing:2px;

  color:#6b7280;
}

/* =========================
   TASK LIST
========================= */

.task-list{
  display:flex;
  flex-direction:column;

  gap:18px;
}

/* TASK */

.task{
  width:100%;

  background:rgba(255,255,255,0.58);

  border:1px solid rgba(255,255,255,0.8);

  border-radius:24px;

  padding:22px;

  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:18px;

  transition:0.25s;

  animation:show .3s ease;
}

.task:hover{
  transform:translateY(-2px);
}

/* LEFT */

.left{
  display:flex;
  flex-direction:column;

  gap:10px;
}

.task-text{
  font-size:18px;
  font-weight:700;

  color:#111827;

  word-break:break-word;
}

.task-info{
  display:flex;
  flex-wrap:wrap;

  gap:10px;

  font-size:14px;

  color:#6b7280;
}

/* RIGHT */

.right{
  display:flex;
  align-items:center;

  gap:10px;
}

/* BUTTONS */

.done-btn,
.delete-btn{
  border:none;

  padding:12px 16px;

  border-radius:14px;

  color:white;

  font-weight:700;

  cursor:pointer;

  transition:0.25s;
}

.done-btn{
  background:#22c55e;
}

.delete-btn{
  background:#ef4444;
}

.done-btn:hover,
.delete-btn:hover{
  transform:scale(1.04);
}

/* COMPLETED */

.completed{
  opacity:0.65;
}

.completed .task-text{
  text-decoration:line-through;
}

/* CATEGORY */

.category-pill{
  background:rgba(0,0,0,0.06);

  padding:6px 12px;

  border-radius:999px;

  font-size:13px;
}

/* PRIORITY */

.high{
  border-left:6px solid #ef4444;
}

.medium{
  border-left:6px solid #eab308;
}

.low{
  border-left:6px solid #22c55e;
}

/* REMOVE ANIMATION */

.task.removing{
  opacity:0;

  transform:translateX(80px);

  transition:0.35s;
}

/* CALENDAR */

.calendar-box{
  margin-top:30px;
}

/* =========================
   CONFETTI
========================= */

.confetti{
  position:fixed;

  width:12px;
  height:12px;

  top:-20px;

  animation:fall 3s linear forwards;
}

@keyframes fall{

  to{
    transform:
    translateY(100vh)
    rotate(720deg);

    opacity:0;
  }

}

/* =========================
   SHOW ANIMATION
========================= */

@keyframes show{

  from{
    opacity:0;
    transform:translateY(15px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}

/* =========================
   TABLETS
========================= */

@media(max-width:992px){

  .container{
    padding:24px;
  }

  h1{
    font-size:40px;
  }

  .stats{
    grid-template-columns:1fr 1fr;
  }

}

/* =========================
   PHONES / IPHONES
========================= */

@media(max-width:768px){

  body{
    padding:14px;
  }

  .container{
    border-radius:24px;
    padding:18px;
  }

  .top-row{
    flex-direction:column;
    align-items:flex-start;
  }

  h1{
    font-size:32px;
    line-height:1.1;
  }

  .stats{
    grid-template-columns:1fr;
  }

  .task{
    flex-direction:column;
    align-items:flex-start;
  }

  .right{
    width:100%;

    display:grid;

    grid-template-columns:
    repeat(3,1fr);
  }

  .done-btn,
  .delete-btn{
    width:100%;
  }

}

/* =========================
   SMALL PHONES
========================= */

@media(max-width:480px){

  .task-box{
    grid-template-columns:1fr;
  }

  .right{
    grid-template-columns:1fr;
  }

  h1{
    font-size:28px;
  }

}
@media(max-width:768px){

  .lang-switch{
    width:100%;
  }

  .lang-btn{
    flex:1;
  }

  .task-box{
    grid-template-columns:1fr;
  }

  .task-box input,
  .task-box button,
  .task-box select{
    width:100%;
  }

  .task{
    padding:18px;
  }

  .right{
    width:100%;

    display:flex;
    flex-direction:column;
  }

  .done-btn,
  .delete-btn{
    width:100%;
  }

}
/* =========================
   IOS + IPHONE FIXES
========================= */

/* FIX IOS HEIGHT */

html{
  height:100%;
}

body{
  min-height:100svh;
  min-height:100dvh;
}

/* FIX GLASSMORPHISM ON SAFARI */

.container{
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* FIX BUTTON CLICK ISSUES */

button{
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* FIX INPUT ZOOM ON IPHONE */

input,
select,
textarea,
button{
  font-size:16px;
}

/* FIX LANGUAGE BUTTONS */

.lang-switch{
  position:relative;
  z-index:20;
}

.lang-btn{
  pointer-events:auto;
}

/* FIX TASK BUTTONS */

.right button{
  min-height:48px;
}

/* FIX OVERFLOW */

.container,
.task,
.task-box{
  overflow:hidden;
}

/* FIX TASK TEXT BREAKING */

.task-text{
  overflow-wrap:break-word;
  word-break:break-word;
}

/* SMALL IPHONES */

@media(max-width:480px){

  body{
    padding:10px;
  }

  .container{
    padding:16px;
    border-radius:20px;
  }

  h1{
    font-size:26px;
  }

  .task{
    padding:16px;
  }

  .task-box{
    grid-template-columns:1fr;
  }

  .stats{
    grid-template-columns:1fr;
  }

  .right{
    display:flex;
    flex-direction:column;
    width:100%;
  }

  .done-btn,
  .delete-btn{
    width:100%;
  }

}

/* TABLETS */

@media(min-width:768px) and (max-width:1024px){

  .container{
    width:100%;
    max-width:90%;
  }

  .task-box{
    grid-template-columns:
    repeat(2,1fr);
  }

}
.bg-glow{
  pointer-events:none;
}