*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"poppins",sans-serif;
}

/* Theme Colors */
:root{
  --bg1:#fff5f7;
  --bg2:#ffe4e6;
  --card:#ffffff;
  --text:#3b1f25;
  --muted:#a87b84;
  --accent:#f43f5e;
  --btn1:#fb7185;
  --btn2:#e11d48;
}

body.dark{
  --bg1:#190a0d;
  --bg2:#260f14;
  --card:#31161b;
  --text:#ffe4e6;
  --muted:#c9a2a9;
  --accent:#ff8fa3;
  --btn1:#fb7185;
  --btn2:#f43f5e;
}


body{
  background:
    radial-gradient(1200px circle at 10% 10%,rgba(255,255,255,.15),transparent),
    linear-gradient(135deg,var(--bg1),var(--bg2));
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
}

body.dark{
  background:
    radial-gradient(1200px circle at 10% 10%,rgba(255,255,255,.05),transparent),
    linear-gradient(135deg,var(--bg1),var(--bg2));
}

.container{
  color:var(--accent);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  backdrop-filter:blur(10px);
}


.container h1{
  display:flex;
  align-items:center;
  font-size:35px;
  font-weight:600;
}

.container h1 img{
  width:60px;
}

.container button{
  display:flex;
  align-items:center;
  background:linear-gradient(135deg,var(--btn1),var(--btn2));
  color:#fff;
  border:none;
  padding:15px 35px;
  font-size:16px;
  font-weight:500;
  border-radius:40px;
  cursor:pointer;
  margin:30px 0 20px;
}

.container button img{
  width:25px;
  margin-right:10px;
}


.note{
  display:flex;
  flex-direction:column;
  gap:15px;
  position:relative;
  width:100%;
  max-width:400px;
  margin:20px 0;
  transition:opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

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

.note-title{
  font-weight:500;
  font-size:18px;
  color:var(--text);
  background:var(--card);
  border-radius:8px;
  padding:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  outline:none;
}

.note-title:empty::before{
  content:"Title…";
  color:var(--muted);
  pointer-events:none;
}

.note-title:focus{
  box-shadow:0 0 0 1.5px var(--accent);
}

.note-date{
  font-size:12px;
  color:var(--muted);
  margin:-4px 0 6px;
  padding-left:2px;
}

.input-box{
  background:var(--card);
  color:var(--text);
  padding:20px;
  border-radius:8px;
  min-height:80px;
  line-height:1.5;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:break-word;
  padding-right:50px;
  box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.input-box:focus{
  outline:none;
  box-shadow:0 0 0 1.5px var(--accent);
}

.input-box:empty::before{
  content:"Write something…";
  color:var(--muted);
  pointer-events:none;
}

/* DELETE */
.note .delete{
  position:absolute;
  right:-23px;
  bottom:5px;
  width:20px;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
}

.delete:hover{
  transform:scale(1.15);
  opacity:.85;
}

/* ANIMATION */
.note.removing{
  opacity:0;
  transform:translateY(6px) scale(.98);
}

/* Transitions */
body,
.note-title,
.input-box{
  transition:background .25s ease, color .25s ease, box-shadow .25s ease;
}

/* Dark Theme */
body.dark .input-box{
  box-shadow:0 6px 18px rgba(0,0,0,.5);
}

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

body.dark .delete{
  filter:brightness(1.2);
}

/* THEME TOGGLE */
.theme-toggle{
  position:fixed;
  top:20px;
  right:20px;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  cursor:pointer;
  font-size:20px;
  background:var(--card);
  color:var(--text);
  box-shadow:0 6px 18px rgba(0,0,0,.2);
  z-index:2000;
  transition:transform .2s ease;
}

.theme-toggle:hover{ transform:scale(1.05); }
.theme-toggle:active{ transform:scale(.9); }

/* Responsive Design */
@media (max-width:500px){

  body{
    justify-content:flex-start;
    align-items:stretch;
  }

  .note-title{
    font-size:17px;
    padding:12px;
    white-space:normal;
    overflow:visible;
  }

  .note .delete{
    right:10px;
    top:10px;
  }

  .container{
    align-items:stretch;
    padding:20px;
    padding-bottom:100px;
  }

  .container button{
    position:fixed;
    bottom:20px;
    left:20px;
    right:20px;
    border-radius:50px;
    box-shadow:0 10px 25px rgba(0,0,0,.25);
  }

  .input-box{ font-size:16px; }
  .delete{ padding:8px; }
}
